Git Product home page Git Product logo

so_long's Introduction

42Lausanne
Project n°5 - so_long

This project is a very small 2D game. It is built to learn how to work with textures, sprites. And some very basic gameplay elements.

sprites: https://elthen.itch.io/ - @pixelthen

sprites: https://elthen.itch.io/ - @pixelthen

Goals

This project’s objectives are similar to all this first year’s objectives: Rigor, use of C, use of basic algorithms, information research etc.

As a graphic design project, so long will enable improve skills in these areas: windows, colors, events, textures, etc.

Run the program

git clone https://github.com/MarJC5/so_long.git
cd ./so_long/so_long #Move to the game folder
make && ./so_long ./map/bonus/small.ber  #Compile and Run the game

Mandatory part

  • The map will be constructed with 3 components walls, collectibles, and free space.
  • The player’s goal is to collect all collectibles present on the map then escape with minimal movement.
  • At every move the current number of movements must be displayed in the shell.
  • The player must be able to move: up, down, left, right.
  • You will use a 2D view (top-down or profile).
  • The game doesn’t need to be real-time.
  • player cannot move into walls.
  • The program displays the image in a window and respects the following rules:
    • The W, A, S, and D keys will be used to move the main character.
    • Pressing ESC must close the window and quit the program cleanly.
    • Clicking on the red cross on the window’s frame must close the window and quit the program cleanly.

Map

The map must be composed of only 5 possible characters: 0 for an empty space, 1 for a wall, C for a collectible, E for map exit and P for the player’s starting position.

This is a simple valid map:

1111111111111
10010000000C1
1000011111001
1P0011E000001
1111111111111

Bonus part

  • There’s some enemy animation (add M characters to map).
  • There’s some sprite animation.
  • The player can kill enemy by pressing P.
  • Movement count is directly displayed on the screen instead of shell output.

sprites: https://elthen.itch.io/ - @pixelthen

sprites: https://elthen.itch.io/ - @pixelthen

so_long's People

Contributors

marjc5 avatar

Stargazers

 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.