GithubHelp home page GithubHelp logo

whymami / so_long Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 5.65 MB

In this project, we'll code a simple 2D game to get familiar with the mlx library and UI in general.

Makefile 2.25% C 77.08% Objective-C 11.41% Roff 8.33% Perl 0.26% Shell 0.67%

so_long's Introduction


So_Long


About the project

The objective of this project is to create a small 2D game where the player has to collect all the collectibles and go to the exit.

GAME RULES

  • The game we choose must follow a set of rules. The executable so_long will receive a map as the only argument, and this map will have a .ber filetype.
  • Only P (character), 1 (wall), 0 (ground), C (collectible), and E (exit) will be accepted characters in our map.
  • The map must be rectangular, i.e. all rows must have the same length
  • There must be at least one exit, one player, and one collectible on the map
  • The map must be closed, i.e. surrounded by walls
  • If any of these checks fail, the game must end with Error\n followed by a custom message.
  • The goal is for the player(s) to collect all the collectibles on the map before going to an exit in the least possible number of steps

Installing and running the project

Clone this repository: git clone https://github.com/whymami/so_long.git

Compilation

To compile the project, run the following command make Run the following command to compile the bonus part make bonus

Usage

To start the game, ./so_long maps/map2.ber

If you compiled the bonus part

./so_long_bonus maps/map_bonus/map2.ber

Structure of the map

Character Description
0 Ground
1 Wall
P Player
E Exit
C Collectable
X Villain

Controls

Keyboard Action
W Moving Up
S Moving Down
A Moving left
D Moving right
ESC, Close the game

Images:

Mandatory part


Bonus:

so_long's People

Contributors

whymami avatar byzarsln avatar

Stargazers

 avatar Aleyna Kölük 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.