The True Fallacy is a simple 2D fighting game developed with C language ,SDL2 and it's sub-libraries. The game features two characters that players can control to engage in combat within a beautifully rendered environment. This project serves as an introduction to game development concepts such as animation, collision detection, and sprite handling.
The game's characters are based on
-
Two Playable Characters: Each with unique animations and actions.
-
Collision Detection: Ensuring characters interact correctly with the environment and each other.
-
Stunning Backgrounds: Vibrant and immersive environments which change after every match.
-
Dynamic variation of colors: The color of health of each character changes from green to red based on average health of the players.
-
Simple Controls:
Press Enter to start the game.
For the male character named "Shiki Tohno" :
Key Action A Move Left D Move Right Space Jump X Attack For the female character named "Shiki Ryougi" :
Key Action 4 (numpad) Move Left 6 (numpad) Move Right 0 (numpad) Jump Enter (numpad) Attack
demmo.mp4
-
SDL2
Simple DirectMedia Layer – core graphics, input, and window handling. -
SDL2_image
Support for loading images like PNG, JPG, and others. -
SDL2_ttf
TrueType font rendering support for SDL2. -
SDL2_mixer
Multi-channel audio mixer for sound effects and music.
-
Make sure that gcc compiler (mingw32) is installed in your system. It may already be installed if you have written some C/C++ code in past.
-
Clone the repository:
git clone https://github.com/4KSHAT0p/the-true-fallacy.git
- Run the game via:
mingw32-make -f MakeFile
./main
-
Download the "SDL2-devel-2.30.6-mingw.tar.gz" from here.
-
Extract the files and copy the all header files from "x86_64-w64-mingw32/include/SDL2" folder to a new folder named "sdl" and move that folder to the project's include directory which I have already provided in the repository.
-
Copy the lib folder from the "x86_64-w64-mingw32" folder to the project directory as it is.
-
Now for the DLL files, copy the dll files present in "x86_64-w64-mingw32/bin" and paste them in the project directory (dont create new folder for these).
-
Compile the project using the provided
MakeFile
or edit it according to your requirements. -
Run the
Main.exe
using./main
.