Saturday: Game finished, things learnedI was able to finish my second Pyweek game in total. Instead of having goal to win I try to improve my games development knowledge. So here you go!
My goal this year was to learn vector graphics with Inkscape (yeah, all graphics are made by my in this game, without using any others sprites or other media).
About the game
You are solder (like in Medal of Honor game) put in the place without weapons and enemies all around you. You need to find way to get weapon first and kill enemies taking bullets from the map.
What I have learned this week
Here are couple of things I have learned:
- Angle calculation and player sprites rotation with pygame.
- Proper setup and calculation for FPS.
- AI responsiveness based on things they currently "see".
- Optimisation and profiling using cprofile. I have increased map like 4 times and FPS dropped from 60 to 30. Using cprofile Python module I restored back to 60 FPS and even increased map couple time after then without FPS drop.
- Camera following.
- Many nice things to do with Inkscape. As Photoshop lower it is very hard to allow other editors be in my life ;)
I hope you will enjoy this, even this game is not so professional. And if you would like to see source code it's here: my GitHub profile (pull requests are welcome).
So what will be next year?
I will try to do isometric game (so yeah, probably will stay with Pygame). There are so many game techniques to try.
I have optimised game couple of times, and made it too much optimised. Enemies in the game not moving or doing anything once they are out of the screen. So yeah, just stay in the same place, and you will notice that when enemies will go out of screen, they never come back :D
For the next time
Great thing that I have learned for the next time is that I started game all wrong. Instead of focusing on the idea and planing what features game will have, it would be much better to start own MVP from drawings. Once you have all elements on the screen painted and you think it's looking good and peoples will play it - only then you should start doing the game.
I finished the gameplay and then decided - hey, I need to add "game opening", mission pages and "game over" screens. Well, my code needed to be hacked for these things, so it's not very nice. If would have prepared those screens as the first thing when planing the game - it would be much easier to think in the future. So if you are reading this, please consider it for the next time you will start the game.