Skip to content

4KSHAT0p/the-true-fallacy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The-True-Fallacy

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

Features:

  • 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

Samples:

Screenshot 2023-06-05 002453

Screenshot 2024-08-04 182725

Screenshot 2024-08-04 190532

tt2

demmo.mp4

About SDL

  • 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.

How to Run it?

  1. 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.

  2. Clone the repository:

git clone https://github.com/4KSHAT0p/the-true-fallacy.git
  1. Run the game via:
mingw32-make -f MakeFile
./main

If you want to setup SDL2 from scratch

Setting up SDL2 on Windows:

  1. Download the "SDL2-devel-2.30.6-mingw.tar.gz" from here.

  2. 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.

  3. Copy the lib folder from the "x86_64-w64-mingw32" folder to the project directory as it is.

  4. 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).

  5. Do the same for: SDL_image , SDL_ttf , SDL_Mixer.

  6. Compile the project using the provided MakeFile or edit it according to your requirements.

  7. Run the Main.exe using ./main.

About

A game made with C language

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages