progress is being made…

Alright, so I was hoping I’d be able to put all of this together fairly quickly, but things aren’t coming together quite as quickly as I had hoped. Of late I have been more or less reworking TwilightMMORL from the ground up. I spent a good 2 or 3 days entirely reorganizing the code, then I spend another little while reworking the way item drops work, and now I’m launching into a much bigger reworking of the world…

Code Reorg

Most people aren’t aware of this, but the TwilightMMORL codebase has its roots in the 2005-2006 timeframe. Obviously the game is entirely different in direction and scope now from what it was then, but all the player movement, combat, and world code was written at about that time frame. So the code is half a decade old at this point. Things have been tacked on and hacked in over the last 5 years, and periodically along the way I’ve done minor rewrites of some of those hacks. For example, I was unhappy with the way I had overloaded a few variables to support magical enchantments, etc, so a few months ago I did away with the entire magic system and rewrote it from the ground up. But at a fundamental level, the initial code organization and architecturing remained, and that was a real problem. I was quite a bit younger and less experienced as a programmer when I started this project, and things were simply not organized in keeping with my current best practices.

This inconsistency between how the TwilightMMORL code is architected, and how my modern projects are architected, grated on me. The thing that most particularly bothered me was having players, enchantments, and items all declared in player.h. That’s just not acceptable in my current frame of mind. Over the years I’ve really developed a particular methodology that calls for one-concept-per-file and a very strong decoupling of concepts. This became problematic recently, because the world loading code needed the dataset definitions, which depended upon player and item definitions, which in turn depended on other things and eventually it wrapped back around to requiring the world definitions. There’s nothing inherently unsolvable with that, it can all be addressed with the preprocessor, but at a conceptual level it’s revolting.

So, I burned a good solid weekend pulling everything out into roughly twice as many files as there were previously, fixing the dependency chains, and also renaming all the functions and putting them in more appropriate modules than sometimes they were currently in.

Drops Reworked

Also, I was unsatisfied with the haphazard way item drops were distributed amongst the various mobs. Originally (again, this dates back to 2005), all items were defined by hand, I picked their various attributes (such as to-hit, power, and magical enchantments) by hand, and wrote up the defs in the item definitions db. Obviously that’s a lot of work, and led to a very scattershot distribution of helmets, swords, etc etc. You might go 20 levels without finding a new katana. It was almost impossible to tell just by an item’s name whether it was better or worse than what you currently have, and it was just an ugly way to do things all around.

So I did away with it. I wrote up formulas for determining how much AC a suit of armor should provide for a given xlvl, etc. And at that point, once you have the formula, randomly generating the items is cake. So, armor and weapons are now randomly generated, according to some fixed formulas. With that system in place, it’s then really easy to have them be generated in sets. Every 3 levels you get an entire suit of armor (helmet, boots, cloak, etc). Similarly, every 3 levels you’ll get a new set of weapons (katana, sword, longsword, etc).

Now, this does screw up the current balancing of things. The armor curve is quite different, and I believe I erred on the side of perhaps making things too easy. I don’t see that as a big problem and I’ll buff up the NPCs in the future if that proves to be the case. But overall it’s a much nicer system and I really like it and am considering expanding it to other items, such as scrolls.

New World

This revamp is by far the biggest, and also the one nobody will see until I’m done with it. I am fortunate in that when I originally wrote the code, I did plan for multiple datasets. So all item defs, npc defs, quest defs, and everything is separate, according to the realm. At present, the only realm that exists is called Aezora, and when you log in to play, you’re playing with that dataset. Well, I don’t like it. I don’t like the way it’s organized, I don’t like the way it’s structured, and I don’t like the pathetic excuse it has for a story.

So I’m making a new dataset. It has a strong story, with solid mythos behind it. I’m thinking everything out, I’m adding quests that advance the story the entire width and length of the world. You will follow a solid quest progression all the way to a conclusion. At the same time, there will be optional quests and areas you don’t necessarily have to visit, but the way things are looking right now, the world will be much larger, there will be a coherent story from start to finish, and there will be many many times more instanced dungeons.

I’m really excited about it, but it’s going to take a long time before I’ll be in a position where I can roll it out. The existing Aezora dataset will remain on the server until the day I’m ready to release the new one, but at that point I think I’ll make Aezora go away, reset everyone’s accounts, and roll out the new world.

Advertisements

Tags:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: