Even though the game I'm working on is not finished, here are things that I am aiming to do better for my next project:
* Actually plan out the basic structure of the code before writing: This may come to a shock to you, but I only plan the game design and I write the code on the fly without planning out the code structure before writing it. Though I forgot how to drawl UML diagrams.
* Use object-oriented state machines: I have been putting off doing this for YEARS, despite knowing the advantages OO state machines have over enums and switch statements. I plan to at least use this for game modes because using traditional state machines for those creates an unorganized mess. OO state machines also seem to make code more reusable which is a plus.
* Put animations into their own objects: It should make it easier to organize them that way, especially when some animations are only played once while others are looped. It's also something that I have been putting off for years.
* Write my own timer class: SFML's clock class has no method to pause the timer. Only restarting the timer entirely, which means that it's still going even if the game is paused. I should write my own universal clock class to accommodate for that. The only reason why I haven't done that now is because not many things in my game use a timer and if they do, it doesn't really break the experience that much if pausing somehow interrupts them.
* Implement better RNG: I've noticed that C and C++s built-in random functions work differently than what I'm used to. I think in higher-level languages like C#, Java, and Python, the call to the standard random function/method increments the seed for the next call, while in C and C++ it just uses the current time as the seed, so if multiple calls are made in the same millisecond, they will give the same results. My game uses custom RNG for level generation, but enemy AI still uses rand/srand.
The blue sword can now be purchased in the dungeon shops.
#gamedev #gamedevelopment #indiegamedev #indiedev #indiegames #indie #SFML #cplusplus
@Dan_Ramos
Hacking the Dreamcast VMU to Watch Shrek
https://www.youtube.com/watch?v=LUSvDkp82pE