Progress progress progress. Never enough, but more than before. Time for an update.
When you think about debt, you usually think about money. But its more generic meaning is simply “what you owe”. I’ve picked up the concept in the programming community that if you don’t keep your code in a tidy state, you will have to go back and clean it up … paying a kind of “time debt”.
So, that’s what I’ve been doing. I’ve found so much dead code in A&A. I’ve probably deleted 10 whole sub-systems with code related to the old MMO design. And I have not even started with the resource files that include unused items and screens.
But I’m learning there is a ton of “debt” in the form of confusing extra code that is no longer needed. So, I’m cleaning it out. Like a messy desk, I’m going through and getting rid of it all the junk and clearing everything off. By doing this, I really have learned/remembered that there are TWO networking systems in the game. One sits on the other. There is the old Client/Server network packet system that we try to use for the chat room and starting a game, and then we have the Synchronized Communications system (called SyncPack) that sits on top of that. The old Client/Server system really now only provides a few functions that SyncPack does not provide. As I cut out everything dead, I’m finding the networking code is getting simpler and simpler.
I still have a monster of a problem with the chat/guild rooms and more than 2 players, but I have narrowed it down.
My son is a big fan of Minecraft. Being like me, he’s learned a few things about programming using YoYo’s Game Maker Studio. He’s going to be good at programming — I can see it. Now he wants to make mods for Minecraft and he wants me to help him. Luckily, there are plenty of resources out there, so we’re stepping (slowly) through some tutorials and learning how it is done. Personally, I had not done much modding in my life, so I was curious how they were going to get around many of the problems of directly affecting the game’s logic code. The general answer is — hooks. Minecraft Forge has modified the Minecraft source code with plenty of hooks to allow people to create mods without having to change the base code.
This got me to thinking. How easy would it be to do this for A&A? Certainly there has to be some ways to do it? But A&A wasn’t written in C++, just plain C. Hmmmm….
So, I’ve been mulling over some simple concepts. How would a person add one new item? a weapon? a new creature and AI? Sure, there is still the map making, but what about adding new textures, environment objects, and animations?
This is leading me to think that it might be time to convert A&A’s files into a new format. Into a bunch of text or XML files. Graphics would be PNG files. .ZIP or directories can then be used to group resources. Scripts would be simple text compiled at load time. etc. In other words, make it so the community can edit everything.
If Minecraft can do it, so can we.
I also need help. For example, if we want to use PNG files, someone else may be able to pull in a library and make that work. Or make the maps load from text files and have their BSPs loaded at boot time. etc. I’m not picky. That’s why I’m going to jump the gun from my previous plans and put the source code out at GitHub.
But be warned! I’m still making huge changes to the code. Make a fork and watch out!
I’m choosing GitHub because I like the way it handles branches/forks of versions. I would like people to propose an idea, make a branch, prove it works, and then we’ll merge it back into the master. All are welcome to try.
Source code is released here: https://github.com/ExiguusEntertainment/AmuletsArmor
This is just a start, but we’ll see how it goes.
BTW, I was working on a utility to change all the code comment blocks into something that works well with Doxygen. Unfortunately, I had a computer crash that took out most of my work last night, so I couldn’t run the script yet. When this occurs, all the files will be changed and checked in. So you might want to just review it a bit first. Hopefully I can quickly rebuild and run the script this weekend.
Side Note: I also looked at the modding of Legend of Grimrock and found that to be another key example of modding — maybe even closer to A&A.
And for the music lovers out there, I found this nice piece by Solar Fields called “Phase 09 – Sombrero”. Spotify link: Solar Fields – Phase 09 – Sombrero on the album Solar Fields – Until We Meet the Sky. Enjoy!