So Long is a project where you will develop a 2D game using the MiniLibX, with textures, sprites, and basic gameplay mechanics. This project introduces you to graphical programming and event handling in C.
Just clone the repo
Make inside the repo
to execute : ./so_long your_42_login map_you_would_use.ber
(the 42login is used for add your score in scoreboard) You can send me your score and i'm gonna add it inside the scorboard file (With the default map).
The main goal is to program a game where the player must collect all items on the map and escape through the exit while adhering to the following constraints:
- Use MiniLibX for graphical rendering.
- Write the program in C, following strict coding standards (Norm).
- Properly manage memory (no memory leaks).
- Validate and parse maps in the
.berformat.
| Program Name | so_long |
|---|---|
| Submission Files | Makefile, *.h, *.c, maps, textures |
| Arguments | A map in the *.ber format |
| Allowed External Functions | open, close, read, write, malloc, free, perror, strerror, exit, MiniLibX functions |
| Libft Allowed | Yes |
| Description | A game where the player collects items and escapes a labyrinth. |
- The map must:
- Be rectangular and surrounded by walls.
- Contain at least one exit, one collectible item, and one starting position.
- Follow a valid structure (
0, 1, C, E, P).
- The W, A, S, D keys are used to move the player.
- Each movement is counted and displayed in the terminal.
- The window must close properly via
ESCor clicking the window close button.
- Add patrolling enemies that can defeat the player.
- Display the move count directly on the game window.
- Animate sprites to enhance aesthetics.
Compile the program with the provided Makefile: make ./so_long maps/example.ber The program should display a window containing the map and allow user interaction.
Good luck and enjoy working on this project!
Feel free to add a issue if you find it and i will fix it. (Leak, Error, Missing feature, etc...)
-
🇬🇧 This project has an educational purpose and you should under no circumstances copy and paste. Cheat is bad. Dont cheat
-
🇫🇷 Ce projet a un but educatif et vous ne devez en auccun cas faire du copier coller. Tricher c'est mal. Ne trichez pas
©42Perpignan(bepoisso)




