Skip to content

19Jillian89/So_long

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

so_long 🎮

Language Score Status Bonus 42

A simple 2D game built with MiniLibX as part of the 42 curriculum.
The goal of the project is to practice graphics programming, map parsing, and event handling.


📸 Demo

Here’s a preview of the game in action:

so_long demo


📝 Mandatory Part

  • The number of movements must be displayed in the shell.

  • The map must be rectangular. Here is a simple valid map:

1111111111111
10010000000C1
1000011111001
1P0011E000001
1111111111111
  • The map must be enclosed/surrounded by walls. If it is not, the program must return an error.

  • Pressing ESC or clicking the close button should quit the program.

  • The map can be composed of only these 5 characters:

0 → Empty space

1 → Wall

C → Collectible (at least one required)

E → Exit (at least one required)

P → Player starting position (only one)


🎮 Controls:

Key Action
W / Move up
A / Move left
S / Move down
D / Move right
ESC Quit the game
  • The W, A, S, and D keys must be used to move the main character.
  • The player should be able to move in these four directions: up, down, left, and right.
  • You are required to use MiniLibX for this project.

▶️ How to compile

  • The program should be compiled and executed using:
./so_long map.ber
./so_long_bonus map.ber

📄 License

This project is for educational purposes only and is part of the 42 Common Core curriculum. 42 Common Core curriculum,


🔗 If you found this project helpful or interesting, consider supporting it by starring ⭐️ or forking.

About

A simple 2D game built with MiniLibX

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published