Welcome to the "So Long" project! This project is part of the curriculum at 42 School and is aimed at deepening your understanding of working with C and developing a simple 2D game.
- Introduction
- Goals
- Requirements
- Getting Started
- Usage
- Project Structure
- Building the Project
- How to Play
- Resources
- Contributing
- License
The "So Long" project is a basic 2D game where the player must navigate a character through a maze to reach the exit while collecting items along the way. The game is built using the MiniLibX library and is an excellent introduction to game development concepts, including rendering, event handling, and basic AI.
- Gain proficiency in working with MiniLibX.
- Understand 2D game mechanics.
- Practice handling inputs, rendering graphics, and managing game states.
- Develop problem-solving and debugging skills in C.
Before you begin, ensure you have met the following requirements:
- A working installation of MiniLibX.
- Basic knowledge of C programming.
- Familiarity with Makefiles.
- Access to a UNIX-based environment (e.g., macOS or Linux).
To get a local copy of the project up and running, follow these simple steps:
- Clone the repository:
git clone https://github.com/yourusername/so_long.git
Make sure you have installed the required dependencies for MiniLibX. You can install MiniLibX with the following commands:
- For Linux:
sudo apt-get install libxext-dev libx11-dev libbsd-dev
make
This will generate the so_long executable.
./so_long [map_file.ber]
Replace [map_file.ber] with the path to your .ber map file. A sample map file is usually provided in the maps directory.
Follow these simple steps to navigate through the game:
- Move Your Character: Use the arrow keys ⬆️⬇️⬅️➡️ to move your character around the map.
- Collect Items: Aim to collect all the items 🌟 scattered throughout the map.
- Beware of Enemies: Keep away from enemies! Contact with any enemy will result in a game over 🚫.
- Reach the Exit: Successfully navigate to the exit 🚪 after collecting all items to win the game.
- Game Over Conditions: The game ends if your character touches an enemy or fails to collect all items before reaching the exit.
Master these steps to excel and enjoy the game!