Tuesday, 12 May 2015

Double dragon

I've divided todo items to RPG and "engine" lists. The list for engine items is interestingly short and I'm working on it. Currently I'm writing a new save and load game which is bit of a complex thing, yet easy compared to the beast of RPG system.

When you add or remove something from a class that has to be saved you should add it to save/load routines. Guess who didn't do that? Well I think it's good to go through everything anyway to make sure absolutely everything is saved. Of course there are still some difficult parts, in particular the new level map class that replaced the old implementation.

A minor refactoring is going on with the level map vs. level, because I noticed the Level class has a double data of width and height which also the Level_Map has. Now.. I know, this doesn't sound like a big issue, but for me it is. I have always tried to remove double data as soon as I notice it exists. It's just something I hate even often it doesn't make the source code that much worse. Still it's always risky if there are doubles of some data, because you need to synchronize it.

When I get save/load ready it's an important step, because I can then start to test it in a way where the current situation is always loaded when I'm running the game. In the debug mode it's impossible to die so it makes long term testing of save/load possible.

No comments:

Post a comment