Skip to content

GiovannaCoqueiro/42cursus-so-long

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

42cursus

So Long

so

Inside this repository, you can see all the code that has been created for the So Long project, including the mandatory part and the bonus part.


Final score

so

Death animation

death

Victory animation

victory


Mandatory

Create a 2D game in which a character will escape a map after collecting everything it has to be collected.

Preparation

  • Use MinilibX.
  • Turn in a Makefile to compile your program and it must not relink.
  • The program must take as parameter a map file ending with the '.ber' extension.

Game

  • The player must collect every collectible present on the map and then escape through the exit.
  • The player must be moved by pressing AWSD keys or the arroy keys.
  • The player must be moved in 4 directions: left, right, down and up.
  • The player can't move into a wall.
  • The program must display the movement count in the terminal.
  • The game must be a 2D view.

Graphic management

  • The program must display the image in awindow.
  • The window must close and the program must quit when the user press ESC or click on the cross on the window.

Map

  • The map must be composed for five elements (6 if you implement the bonus part).
  • Char Element
    0 ground
    1 wall
    C collectible
    E exit
    P player starting position
  • The map must contain exactly 1 exit, 1 player starting position and at least 1 collectible.
  • The map must be rectangular.
  • The map must be surrounded by walls.
  • The map must have a valid path between the player starting position and the exit, and be able to collect all the collectibles.

Bonus

  • Add some enemy and make the player lose qhen they touch it.
  • Char Element
    X enemy
  • Add animation.
  • Diaplay the steps count on the screen.

Instructions to use

Clone this repository in you local computer using a terminal:
$> git clone git@github.com:GiovannaCoqueiro/42cursus-so-long.git [repository_local]

After cloning the project in your local reposiory you can run some commands you can find in Makefile:

  • $> make all: or just make compiles the project
  • $> make bonus: compiles the project
  • $> make clean: deletes the object files created during compilation
  • $> make fclean: executes the clean command and also deletes the binary created
  • $> make re: executes the fclean command followed by the all command

Than you can run the game with:

./so_long maps/<map_file.ber>

You can also create and run any map, if it follows the requirements.

About

42 so long project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published