A simple 2D platformer game built using raylib, featuring:
- A playable character (Scarfy) with animation and jumping mechanics
- Static platforms
- An enemy that moves and shoots projectiles
- C compiler (e.g., GCC)
- raylib installed
make(optional, for easier compilation)- Assets:
resources/scarfy.pngresources/soundEffect/singleFootstep.mp3resources/soundEffect/singleFootstep2.mp3
make
./scarfy_gamegcc main.c -o scarfy_game -lraylib -lopengl32 -lgdi32 -lwinmm
scarfy_game.exeLEFT / RIGHT Arrow: Move Scarfy left or rightSPACE / UP Arrow: Jump
- Animated character sprite with footstep sound
- Gravity-based jumping
- Collision detection with platforms
- Enemy ball that patrols and shoots projectiles downward
- Collision detection between bullets and the player
.
├── main.c
├── README.md
├── resources
│ ├── scarfy.png
│ └── soundEffect
│ ├── singleFootstep.mp3
│ └── singleFootstep2.mp3
- You can extend this game by adding collectibles, more enemy types, health system, or procedural levels.
- For infinite worlds, consider using procedural generation with chunk-based logic.
This project is open-source and licensed under the MIT License.