The game, engine and more
Hey there!. welcome to my first post of my dev blog thingy.
I’ve been working on a tiny game for like some months now. But because I’m reeeeeeeally lazy I’ve always keep delaying features for the game. So I’m starting this blogs to make a deadline for myself to deliver at least a little bit of content or just to improve the code week by week (And also to practice English writing). And of course, what a better day to write them than fridays (Inspired by factorio’s blogs). So, in summary these blogs are a way for me to keep track of what I’m doing and also keep myself away from laziness.
So this game is just a normal 2D platformer. Nothing more nothing less. It’s the same game than this one: youtube trailer That I tried making in Java, and ultimately failed and burn myself out. Making a game (even a simpler one like a platformer) in java without game knowledge. Only knowing OOP and also not knowing simple programming practices, tricks and patterns is bad. At least you’ll need to have a lot of willpower to succeed or plan everything from the beginning.
Anyway, here I am trying to make the same game with as little as possible in C++ and OpenGL.
I am currently using libraries like stb_image
for loading images, OpenAL
for sounds, freetype
to load fonts, cute_tiled
to load maps from “tiled” maps (.tmx from tiled program). And finally Flecs
.
In the beginning I did try to make my own ECS, but I’m clearly not that good. Then I try using and remaking one from a SFML book. But this one was too slow. So in the end I opted for Flecs. I think is good enough and it’s fast enough for my needs (actually is waaay faster than I thought it was). I guess, if I ever need better performance I’ll just hardcode everything in a DOD way.
So here you can see the game in action right now. There is only the player and the tiles drawing in the background (notice how it is not drawing some tiles due to a bug in my camera implementation). For the next friday I want to make the next implementations:
- Make the map darker to resemble night time. –> Add one an ambient color to each layer of the map.
- Add the collisions to the player –> Add an array of collisions, probably 1Byte per tile because I could store which type of collision is.
- Create a directory or a path to get all the sprites and animations together so I can add more to a texture pack easily.
And that’s it. If I end up implementing something else, then that’s a bonus.
Bye!