Code Monkey home page Code Monkey logo

so_long's Introduction

42 Madrid project: so_long

The objective

This project is a tiny 2D game. Its purpose is to practice with textures, sprites, and some other very basic gameplay elements.

The proyect uses Minilibx, a graphical library created by 42 Paris for 42 students. If you need more documentation about this library you can click here.

How to install

Just 4 simple steps:

  1. Copy the repositoire: git clone https://github.com/telufulu/so_long telufulu_so_long
  2. Go to the directory: cd telufulu_so_long
  3. Compile the program: make
  4. You have a lot of diferent maps in assets/maps/, but you can start trying this command: ./so_long assets/maps/example.ber

To "unistall" it, just execute the command make fclean

How to play

The player’s goal is to collect every collectible present on the map, then escape chosing the shortest possible route.
You can use W, A, S, D keys to move, or the arrow keys.
Once you collect all the coins, you can reach the exit and finish the game. In this case, the exit is the purple tower and the collectives are coin bags.

If you want to exit the game early, just press ESC key.

Custom maps

You can draw you own map, but it must obey some rules:

  1. The map can be composed of only these 5 characters:
    • 0 for an empty space,
    • 1 for a wall,
    • C for a collectible,
    • E for a map exit,
    • P for the player’s starting position.
  2. It must contain 1 exit, at least 1 collectible, and 1 starting position to be valid.
  3. It must be rectangular.
  4. It must be closed/surrounded by walls.
  5. It must end with the extension .ber

Here you can see and example of a map

example2.ber example1.ber

If you need something, you can reach me by Slack or email me

so_long's People

Contributors

telufulu avatar

Stargazers

DaNieL avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.