"So Long, and thanks for all the fish!"
Welcome to a small, simple, and fun 2D game project built using C and MiniLibX, designed as an introduction to graphics programming and game logic.
- Learn how to manage windows, events, textures, and basic gameplay elements.
- Practice working with sprites and maps in a grid-based system.
- Develop solid habits with memory management, clean code, and error handling.
- Improve your command of C, algorithms, and debugging techniques.
- Collect all items on the map, then reach the exit using the shortest path.
- Navigate the map with
W
,A
,S
,D
or arrow keys. - Movement count is displayed in the terminal.
- Uses MiniLibX to create a game window and render textures.
- Clean exit via
ESC
key or closing the window. - Smooth window handling (minimize, focus switch, etc).
- The map is a
.ber
file with the following characters:0
→ empty space1
→ wallC
→ collectibleE
→ exitP
→ player start
- Must be rectangular, enclosed by walls, and contain exactly one player start, one exit, and at least one collectible.
- The game checks for map validity and path accessibility.
- Instead of hardcoding a limit for the size of the window, the camera is following the player when the map is larger than the max display size.
make
./so_long your_map.ber