When building a deep systematic game, how do you go about documenting or keeping track of systems in engine and what is your experience?
Hey all, I'm currently building a city builder game and all the games I've built before have been alot simpler in terms of system depth. At this point there are so many systems with different things going on I was wondering what other people's experiences have been with this kind of thing and how they have handled documenting it effectively, commenting heavily or straight up not bothering to document etc.
Would love to hear peoples thoughts and experiences on this :)
Cheers!
Posted Jul 17, 2021, 9:32 PM UTC
Not that I've done too much documentation, but coding wise it's always good to do subclasses or Extensions of a class. So for instance you have an inventory. items that go inside the inventory extend from the items class. So potions extend of items inherits all the attributes of the item class as well as allowing effects or special stuff to also be added.
Weapons would also extend from the item class and have their own special things. If you were to make a magic sword that could cast a potion effect then you might create a subclass of weapons that has a variable of the class potions allowing for any potion effect publicly accessable through that class to be executed.
Same would work with ai. Each ai type would be a subclass of the main ai, so enemy and villager have the same base set of functionality given by the base class. Things like, move here, interact with that, play animation, switch state.
Then your goal is to program in a way that everything and every system is named clearly so when looking for scripts or a function within a script you know where to look.
If you are to override a function it's always good to put a comment at the base level of which subclasses aren't effected so when you change something in the base and it doesn't happen to a certain subclass you already know why.
If anything else stands out as confusing it might be good to add a comment, While it's still fresh in your mind. Rather than coming back to it and spending an hour or more trying to figure it out without breaking anything.
Most of the time I document things in the form of comments, that way if there is something that I need to read to remind me, I don't have to look through a book or different document to figure it out.
If you do have a lot of high level systems and mechanics in mind when developing the game, it might be good to have a place where all the ideas go before they become code. That way you can more accurately capture your vision of how the world should function so you can judge when and where you fall short of that vision.
The goal is to make a game that doesn't need documentation, or has as little as necessary, achieved by having intuitive and we'll structured systems. That way you don't have to spend time updating documentation and can actually work on the game.