Uploaded April 2018 | Updated September 2026, 1 hour ago
My first playable game!
I created this following along to a great tutorial by Chili (youtu.be/KTyemy82Zqk). I only watched the first video so I figured out a reasonable amount of the code myself, plus I added a few extras:
- Can go off screen, teleporting to the other side, akin to how it used to play on the ol' Nokia 3210
- Eating "food" can grow the snake by more than one segment - useful to test the game and also to shorten the length of the game (I've used 10 segments in this video)
The game is a bit unresponsive due to using Sleep() as my game speed controller. Otherwise, it seems to work well!
My first playable game!
I created this following along to a great tutorial by Chili (youtu.be/KTyemy82Zqk). I only watched the first video so I figured out a reasonable amount of the code myself, plus I added a few extras:
- Can go off screen, teleporting to the other side, akin to how it used to play on the ol' Nokia 3210
- Eating "food" can grow the snake by more than one segment - useful to test the game and also to shorten the length of the game (I've used 10 segments in this video)
The game is a bit unresponsive due to using Sleep() as my game speed controller. Otherwise, it seems to work well!



![2D Game Engine in C++: [6] Perspective
This video expands the planes concept, allowing for corrected translation and scaling of sprites depending on which plane they exist on, creating a pretty cool sense of depth.
An example of this effect would be for clouds flying on top of the game world for a top-down game. As they would be closer to the camera, they would naturally move faster and be of different scales depending on how high up / close to the camera they are.
The Draw routine allows for all of an objects information in determining where it should be drawn, so the graphics calls are relatively simple to use in coding. Hopefully this will allow me to easily add in whatever graphics I need for my next game ideas, which will allow me to spend a lot more time on other game development concepts, e.g. AI.
I will release all code on GitHub once Ive finalised the engine - and have nice looking code to boot!
Using the Chili Framework: http://wiki.planetchili.net/index.php... - thanks Chili! 2D Game Engine in C++: [6] Perspective](https://i.ytimg.com/vi/IvUYPMLZ76Q/mqdefault.jpg)




![2D Game Engine in C++: [7] Lighting
This video expands the engine by adding in lighting - something that Ive been quite interested in ever since my first attempt at lighting in my Dungeons and Flagons game.
LightSources can be owned by GameObjects, which makes for implementing lighting around the game world quite easy.
Ive also been playing around with 2D normal maps, which will be demonstrated in the next video. It makes for quite the visual effect, particularly when the depth calculations are included!
I will release all code on GitHub once Ive finalised the engine - and have nice looking code to boot!
Using the Chili Framework: http://wiki.planetchili.net/index.php... - thanks Chili! 2D Game Engine in C++: [7] Lighting](https://i.ytimg.com/vi/LWs6klgHhd4/mqdefault.jpg)

