Warning
Photosensitive Warning: This illuminated dance floor may feature flashing or strobing lights. People who are sensitive to flashing lights or have a history of photosensitive epilepsy may be at risk of seizures or other symptoms. Viewer discretion is advised.
If you experience dizziness, disorientation, or any other symptoms, stop the preview.
So_long_preview.webm
So_long is a 2D game where the goal is to gather every collectible to open the exit and escape. It is made from scratch with the help of MLX42.
It must have:
- A player.
- An exit.
- At least one collectible.
- Walls.
In the bonus part, it is required to have the following features:
- Add enemies, and the player loses when it touches any of them.
- Add sprite animations.
- Display the movement count on the screen.
Clone the repository and build the program
git clone https://github.com/ribana-b/so_long
cd so_long
make
Run the program
./bin/so_long ./maps/map.ber
Note
There are a bunch of maps in the maps folder, you can also create them. Just make sure that:
- The map is rectangular and surrounded by walls
- The player is able to win
- The map name ends with
.ber
extension. For exampleexample.ber
Key | Description |
---|---|
W, Up Arrow, K | Move up |
A, Left Arrow, H | Move left |
S, Down Arrow, J | Move down |
D, Right Arrow, L | Move right |
ESC, Q | Close the window |
If you wonder why I added h, j, k, l as controls, I'm just going to say vim enjoyer.
I made every sprite using LibreSprite. But I used these images as reference.
- Chopper: https://gifer.com/es/2g8o
- Blackhole: https://www.pinterest.co.kr/pin/black-hole-space-pixel-art-by-sezalilly--1056797868785814756/
- Cotton candy: https://www.shutterstock.com/image-vector/pink-cotton-candy-pixel-art-icon-1549034876
- Speaker: https://es.vecteezy.com/arte-vectorial/5146426-altavoz-en-pixel-art-estilo
- Kairoseki: https://www.pngwing.com/en/free-png-zrzud
If you are interested in checking my progress in 42 Common Core, I suggest you to take a look at My Common Core Projects