A project involving the creation of a small 2D game with a graphical library. Using MiniLibX, the 42 graphical library.
This project is focused on developing a 2D game that can be interacted with using your keyboard. The task is divided into two parts: the mandatory and the bonus. Each of these parts is compiled and executed separately. The bonus section includes the same features as the mandatory part, along with some additional enhancements.
- Makefile will compile your source files. It must include 'all' and 'bonus' rules for the Mandatory and Bonus parts, respectively. It should not relink.
- You are required to use MiniLibX for this project.
- The program should be compiled using the following commands:
> ./so_long map.ber
> ./so_long_bonus map.ber
Warning
Maps must have the .ber extension
- The number of movements must be displayed in the shell.
- Pressing ESC or closing the window should result in quitting the program.
- The map must be constructed using five components: walls, collectibles (at least one), empty spaces, exits (at least one), and the player (only one). These five characters compose the map:
- 0 for an empty space
- 1 for a wall
- C for a collectible
- E for a map exit
- P for the player’s starting position
- To move the main character, use the W A S D keys:
- W to move up ↑
- S to move down ↓
- D to move right ➞
- A to move left ←
- Add X to the map for spawn patrols
- Make the player lose when they touch an enemy patrol
- Add some sprite animation.
- Display the movement count directly on screen instead of writing it in the shell.
Compilation is managed through the Makefile rules.
- If you use make command, the ./so_long executable file, will be generated.
- You can use make bonus command to generate the ./so_long_bonus executable file
> <install your mlx either Linux or MacOS in a folder called /mlx>
> make
> make bonus