So I decided to make an interesting game Snake - yes, i mean, the typical one, the "Snake", but then, there were a few problems that the snake's tails did't move, so here i'm introducing, the total new version of Snake : SNAKE-HEAD. Enjoy it, tadaaaa :>
1. New README
2. New comment:
3. New ending background (Press any key to restart -> Press r to restart):
4. Replay: Press r to change status from endBackground(2) to startBackground(0)
5. Change loadImage function of PlayerObject:
6. free ThreatObjects used (the game object that inherits from BaseObject) :
- Lazy Foo' Tutorials - Collision Dectection, Init the game's basic form
- phattrienphanmem123az - The Main Source as checking map, separating class code, clipping spritesheets, ...
- How To Make A Game In C++ & SDL2 From Scratch! - A Tutorial from Let's Make Game, implementing on main.cpp
- A menu start and a menu end
- Press any key to start. Replay by pressing r
- Different music in the end
- Effect sound: collect coin, touch enemies
- Enemies choose random directions ()
- Count point
- Different spritesheets for different directions (left, right)
- main.cpp is easy to follow (init -> loadMedia -> (game-loop(handleEvent->update->render)) -> end)
- Implementing inheritance, virtual function ()
- Seperated files for different purposes
- Utils.h storing: (preprocessor directive), (basic properties of the game (which are constant values)) and (functions that commonly used)
- (Resource File) storing resources in game (media, map, font)
- Implementing lessons learnt: reading files (using fstream), using pointers (in order to save memory, optimize proj), using class, ...
This is a really simple game to play!
- press any key to start
- using your arrow keys,
- control a snake,
- try to collect coin and strawberry,
- avoid touching border and enemies
- press r to replay
SDL version 2.0.12 including:
- SDL2
- SDL2_image
- SDL2_mixer
- SDL2_ttf
Check my youtube channel for the demo of the game: https://www.youtube.com/watch?v=BpjX6KBRW_c
Open source
- Updating optimization
- Updating the high score
- Not really creative