Skip to content

42 cursus' so_long project. Start date: 28/02/2023. Finish date: 24/03/2023.

Notifications You must be signed in to change notification settings

mortinso/so_long

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

so_long

Final Grade: 120/ 100%

And thanks for all the fish!

GitHub code size in bytes GitHub top language GitHub last commit

1. About
2. Requirements
3. Installation
4. Running
5. Controls
6. Game Rules

💡 About

This project is a very small 2D game. Its purpose is to make you work with textures, sprites, and some other very basic gameplay elements. :)

You must create a basic 2D game in which a dolphin escapes Earth after eating some
fish. Instead of a dolphin, fish, and the Earth, you can use any character, any 
collectible and any place you want.

I took HEAVY inspiration from Pokemon games that I played as a kid. All sprites were downloaded from Spriters Resource and edited/scaled to meet my requirements.

Games used:

  • Pokemon Fire Red/Leaf Green
  • Pokemon Emerald
  • Pokemon Diamond/Pearl
  • Pokemon HeartGold/SoulSilver

✔️ Requirements

  • Linux
  • gcc
  • make
  • MinilibX and it's requirements

🛠️ Installation

Cloning the repository

git clone git@github.com:WudDoo/so_long.git

Compiling

To compile, run make at the root of the so_long directory.


🖥️ Running

Run the executable file followed by a valid map file. I added some basic map files but you can Example:

$ ./so_long maps/map1.ber

Using your own map files

You can run the game with a custom map file as long as it follows the Game Rules.


🎮 Controls

Arrow keys - Movement

Esc key - Closing the program


📝 Game Rules

The executable so_long will receive a map as the only argument, and this map must have a .ber filetype.

The file also must follow these rules:

  • The only accepted characters are:

    • P (player)
    • 1 (wall)
    • 0 (empty)
    • C (collectible)
    • E (exit)
  • The map must be rectangular, i.e. all rows must have the same length

  • There must be only one exit and one player, and at least one collectible in the map

  • The map must be surrounded by walls

  • There must be a valid path the player can take from the starting position, to the exit, collecting all colletibles.


If any of these checks fail, the game will end with Error\n followed by a custom message.

The goal is for the player to collect all the collectibles on the map before going to an exit in the least possible number of moves.

About

42 cursus' so_long project. Start date: 28/02/2023. Finish date: 24/03/2023.

Topics

Resources

Stars

Watchers

Forks