So here’s something I’ve been waiting an awful long time to see; I’ve finally reached the end of the massive AI refactoring job that has been consuming so much of my spare time over the past few months (that’s overstating it; I’ve really only been feeling up to outside-of-work coding for a few hours per week, so this hasn’t actually taken up all that much of my time), and have merged it back into the main development trunk of MMORPG Tycoon 2.
What does this mean? Well.. not a lot, immediately; mostly it’s doing the same things that it was doing before, just with much more well-organised code. There are probably a few new bugs in the AI which weren’t there before (as this new implementation hasn’t been as extensively tested as the old one). But the architecture of the system is much, much better now.
For example, the handling of human-controlled PCs and AI-controlled PCs move through almost identical code paths. This means that human-controlled PCs now receive experience points and level up and get quest completion credit, the same way that AI-controlled ones do. The Bartle type of a PC is now stored on the subscriber, not on the individual character.. which means that no matter how many alts a subscriber makes, they’ll all have the same Bartle type, as you’d expect (which wasn’t the case, before). Similarly, the various desires (“socialise” vs “gain level”, etc) are now on the subscriber instead of on the PC, so a subscriber could now theoretically meet a desire to socialise by logging in with a different character, which was not previously possible.
But more important than that, all of the AI logic has been pulled apart into clean(er) modules, so it should now be much, much easier for me to insert new AI behaviours, such as adventuring as a party or as a guild.
I have also begun work on supporting different xp allocation mechanisms. Previously, MMORPG Tycoon 2 allocated experience points to every PC who thought they were attacking a monster when it died, whether or not they actually ever hit it (and similarly, any PC who chose to run away after damaging the monster would receive no XP if it was killed immediately afterward). Now, monsters keep track of who has damaged them, and award XP to those PCs. This also will be important for supporting party-based adventuring.
So what’s up next? Well, I’m really wanting to push ahead with some world editing interface work, and I’m thinking really hard about whether the MMORPG Tycoon 1-style spline roads are really a good choice, here, or whether a more traditional “tile grid”-based road system would make more sense for a game that’s played from this close up. The problem with spline roads is that a slight movement to a long road can require huge amounts of terrain modification — often I have to rebuild almost a quarter of the visible terrain in order to cope with a path that’s now taking a slightly different direction. Maybe the simple tile grid layout would help localise changes more. Although I really do like the freeform paths, I must confess.
Anyhow, moving on! There’ll be some general life news later in the week, as well. Further details then!