I moved a whole bunch of code around between files, trying to find a good configuration with as little dependency overlap as possible while giving each class or function access to the other classes and functions that they would need access to. It was a bit of a shuffle but I'm happy with how things are now. I'll most definitely do this a few more times over the lifespan of the project, but that's what you get when your aim is mostly short-term progress. The upside to this approach is that I'm fixing problems as they arise, rather then trying to set up a structure to prevent every problem I might possibly encounter. The later is the reason another project is currently in limbo. This whole experience should give me some great insight in how to structure a project, which will be invaluable the next time I start, or continue, a project.
To not bother you too much with specifics on this, let me just leave you with the schematic I drew which helped me organize my code in an adequate fashion.

The Cubewars editor currently only works to place world tiles, so you can make a maze to maneuver through or make jump puzzles or whatever. I'm currently getting the static_actor and goody classes to work as well, but that was a little less straightforward so I'm still on that. It should be implemented by next week. I've also figured out how backgrounds will be handled. In your level you can simply define which background # to use, and the game loads the bg#.bmp file that corresponds with that number. It's really simple stuff.

Though, on a last note, I do hope that I can do some more visible things in the coming week. It just feels more rewarding to say to yourself that you got X in the game.
See you then!
No comments:
Post a Comment