Skip to content

RaulSoftDev/so_long

Repository files navigation

so_long

so_long is a 42 Madrid Common Core project in which you will learn to use the miniLibX graphical library to create windows, images and to work with the keyboard and mouse events to eventually make your own game.

About the project

In the so_long project you will make a small game where you control a dolphin that must scape from the Earth eating fish. Instead of a dolphin, the Earth and fish you can use any character, place and collectibles that you want.

Mandatory parts

  • You have to use the miniLibX library and it must be compiled following the same instructions of the libft library.
  • The source code of your project must be compiled with a Makefile.
  • Your program must accept as argument a file that contains the description of the map with a .ber extension.

Instructions

  • The player has to pick up all the collectibles to exit the map by following the shortest path.
  • To move the player you must use the W A S D keys.
  • The player will move in any of this four directions: up, down, right and left.
  • The player can't walk into a wall.
  • After moving the player, the current steps must be printed on the terminal.
  • The game uses a 2D perspective view.
  • The game doesn't have to be in real time.
  • You can use any theme to make the game.

Compilation

Requirements

  • C compiler: gcc, cc, etc...
  • make utility.
  • libft library.
  • miniLibX library.

Make commands

  • make: compile project.
  • make clean: deletes compilation files except the executables.
  • make fclean: deletes all compilation files.
  • make re: executes make fclean and make.

Build project

  1. Clone the repository:

    git clone https://github.com/RaulSoftDev/so_long.git
    cd so_long/
  2. Build the project:

    make
  3. Play on a map:

    ./so_long maps/"map"