Giter Site home page Giter Site logo

42_so_long's Introduction

42 so_long

small

Utilization

Cloning

Run the following command to clone the repo and build the executable:

git clone https://github.com/michmos/42_so_long.git && cd 42_so_long && make

Running

Run the executable with the map-path as an argument. You can chose any map from the maps directory or create your own map.

./so_long maps/map1.ber

Navigating

Use WASD to navigate the player through the map.

Goal

You are ocean cleanup. Collect all the trash from the ocean and reach the exit without catching any fish.

About the project

Demonstration

failure2 big

Task

The task was to create a 2D game with a player, items and an exit. The program takes the path to a map as an input and checks the validity of the input with regard to criteria such as:

  • the map must be rectangular
  • the map must be surrounded by walls (1s)
  • there is only one player and one exit and at least one item
  • there must be a valid path from start to end
  • ...

The bonus part required animations, randomly moving enemies and a step count.

Learnings

This project introduced two new things:

  • it was my first graphical project allowing me to learn about colors, pixels and animations.
  • it was also the first project where we could use an external library (in our case MLX42) and everything that comes with it (documentation ;), hooks, leaks in the library, git submodules etc.)

Theme

I went for an ocean cleanup theme but the project architecture allows to change the theme by just changing the images in the texture directory (as long as you stick to the same formalities - rows on a sprite sheet represent a different variation, all variations on a sprite sheet have the same amount of frames ...)

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.