AI used to explain this project
So Long is a small 2D game project that introduces you to computer graphics programming using the MiniLibX library. You'll create a basic game where a character collects items and navigates through a map to reach an exit.
Summary: This project is a very small 2D game. Its purpose is to make you work with textures, sprites, and some other very basic gameplay elements.
Version: 3
Create a 2D game where:
- A player character moves around a map
- Collects all collectible items
- Finds the shortest path to the exit
- The theme can be anything you choose (dolphin/fish is just an example)
| Component | Specification |
|---|---|
| Program Name | so_long |
| Language | C |
| Graphics Library | MiniLibX |
| Input | .ber map file |
| External Functions | MiniLibX, math library, ft_printf |
- 2D view (top-down or profile)
- Smooth window management
- Clean exit on ESC or window close
- Movement counter displayed in shell
- Map validation and error handling
| Character | Meaning |
|---|---|
0 |
Empty space |
1 |
Wall |
C |
Collectible |
E |
Exit |
P |
Player start position |
- Must be rectangular
- Surrounded by walls
- Exactly 1 exit
- At least 1 collectible
- Exactly 1 player start position
- Valid path must exist
- No duplicate characters (exit/start)
- WASD keys for movement (up, down, left, right)
- Arrow keys also allowed as alternative
- Cannot move through walls
- Movement counter updates after each move
- Collect all collectibles
- Reach the exit
- Follow the shortest possible route
- Smooth window handling (minimize, switch, etc.)
- Clean exit on ESC or window close
- MiniLibX images required for display
- 2D view implementation
- Window management with MiniLibX
- Event handling (keyboard input)
- 2D graphics programming
- Game loop implementation
- Map parsing and validation
- Pathfinding algorithms
- Texture and sprite management
- Game state management
- Map parser for
.berfiles - Game state tracker (collectibles, moves, position)
- Graphics renderer using MiniLibX
- Input handler for keyboard events
- Collision detection system
- Path validation algorithm
- Comprehensive map validation
- Clean error messages with "Error\n" prefix
- Proper memory management (no leaks)
- Graceful program termination
- Use official assets or properly credited resources
- Respect other artists' work when using external assets
- Test with various map configurations
- Ensure smooth performance without crashes
- Follow norm requirements strictly
Create your first 2D game while mastering graphics programming, event handling, and game development fundamentals with MiniLibX!
