GithubHelp home page GithubHelp logo

idleira / so_long Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 652 KB

a small 2d game in c, developed using minilibx - a graphics library used in 42's curriculum.

Makefile 4.15% C 84.73% Roff 10.79% Perl 0.33%
2d-game 42born2code 42projects 42school c mlx42 so-long so-long42 42

so_long's Introduction

so_long - @42Wolfsburg

this was my first graphical project in 42 curriculum.

asset pack used: Sprout Lands by Cup Nooble ʕ•́ᴥ•̀ʔっ

description

so_long is a small 2d game, created using the MiniLibX graphics library.

we get familiar with mlx and work with textures, sprites, and some other very basic gameplay elements.

the player’s goal is to collect every collectible present on the map, then escape chosing the shortest possible route.

these are some resources i used:

2d game programming in c tutorial: snake

a comprehensive guide to so long

exploring so_long game: a dive into 2D game development

so_long bonus map

MiniLibX

the minilibx is a C library used for rendering graphics, primarily used by 42 students.

this library is built on top of the X Window System API, to provide a simple programming interface suited for beginners.

here are some resources in case you wanna get familiar with it:

42docs - MiniLibX;

getting started with the minilibx;

pixel drawing with the minilibx;

how to run so_long

  1. clone this repository: git clone [email protected]:idleira/so_long.git so_long

  2. all of the following commands should be run in the root of the directory: cd so_long;

  3. this project is divided in 2, mandatory and bonus, parts.

    • to run mandatory (basic character movement and item collecting) part, use make;

    • to run bonus (on-screen move counter and enemy patrol) part, use make bonus.

  4. run the game with a map of your choosing from /maps: ./so_long maps/map1.ber

maps

simple so_long map i provided some valid and invalid maps in the maps folder, however you're welcome to create your own.

the program will run any map as long as it passes all the requirements:

  1. map file has to end with the .ber extension;

  2. the only valid characters are:

    P (player);

    1 (wall);

    0 (empty cell);

    C (collectible);

    E (exit);

    V (enemy in bonus).

  3. there must be ONE exit, ONE player, and at least one collectible on the map;

  4. map must be rectangular, i.e. all rows must have the same length;

  5. map must be closed, i.e. surrounded by walls.

my final grade:

image

so_long's People

Contributors

idleira 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.