Simple game logic and 2D graphics
What is so_long?
so_long is a graphics project where I created a simple game using the MinilibX library and C programming language. This project was an exercise working with graphics, event handling and game development concepts.
The maps are defined as text files, where a character corresponds to a tile. For example: 0 = floor, 1 = wall, P = player start position etc (see the shell emulator screenshot at the bottom of the page). The maps are rigorously validated to be error-free by the program. A recursive flood fill algorithm will make sure that there is a path for the player to get to all of the collectable items.
For the visuals, I took inspiration from the classic Wolfenstein 3D. Using Blender 3D and Photoshop, I created my own modernized top-down 2D interpretation of what the original game might have looked like in 2D.
Key Objectives
- Create a simple game with basic graphics and controls
- Use MinilibX library for graphics rendering
- Implement event handling for keyboard and other events in a graphical environment
- Manage and update game state based on player input
- Create and animate sprites and backgrounds
Project Structure
- Main function: The entry point of the program that initializes the game loop
- Asset handling: Loading and validation and parsing of map and other data from files
- Game loop: A continuous cycle that handles events, updates game state, and renders frames
- Sprite management: Functions to load, draw, and animate game objects
- Collision detection: Implementation of collision checks between game elements
Screenshots
Game running in a Window in Debian
Additional info printed in shell emulator
Links