|A walk in the park|
This time, however, it is about a game.
I have been using the Godot engine for quite some time, but rarely created anything with it. So I decided to take 3-4 days to simply finish a game, no matter how it will turn out.
Turned out to be a small 5-10min game. Mistakes were made. But a lot of reusable code was made as well, and I have realized that it was a great exercise.
I will have to create more games like these in order to gather enough experience and reusable-code.
If you are trying to create games, let me give you advice you have probably heard before. Start small. Start small, and create a lot. Make reusable code and carry it over from project to project. Use GitHub or GitGud to store your code.
In a lot of cases, it simply boils down to experience. There is a lot of Ad-hoc things when it comes to writing game code so a lot of the time, you simply will not be able to create reusable code. I struggled to accept this since I was being told, by everyone, that OOP is the only way to go. It isn't. In fact imperative style programming is down right necessary when it comes to games. Not everything can be reused. And not everything should be reused. Sometimes you just need to get something done. Such as starting music when the second level is introduced. Or placing the player back into the game scene in the rare occurrence he gets pushed out of bounds. All of these things must be placed in some kind of main routine that handles unexpected or one-time events. Objectifying everything will lead you to madness and you will not get anything done.
If there is enough interest, I might go further in detail about this. I have learned a lot from making this game.
But not really enough to make the types of games I'd like to.
So if you are a struggling game developer, don't worry, you are not alone. It surely is not a walk in the park.