Coder Social home page Coder Social logo

so_long's Introduction

So_long

Score

project score

Description:

So Long is a small 2D game project developed in C language. The objective of this project is to create a basic computer graphics project focusing on window management, event handling, colors, textures, and basic gameplay elements. The game utilizes the MiniLibX graphical library for window creation, image rendering, and user input handling.

Features:

  • Player controls a character in a 2D environment.
  • Collect all collectibles present on the map and escape by choosing the shortest route.
  • Movement controls using the WASD keys.
  • Display of current number of movements.
  • Error handling for map validation and misconfigurations.

Map:

  • The map must be constructed with 3 components: walls, collectibles, and free space.
  • Map format consists of 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.
  • The map must contain 1 exit, at least 1 collectible, and 1 starting position to be valid.
  • Valid paths must be ensured within the map.
  • Map files should have the .ber extension and stored in the maps/ directory.

Example

11111111111111111
1E0000000000000C1
10100101001000001
10100100101010101
1P0000000C00C0001
11111111111111111

Graphic :

  • The program displays the game environment in a window.
  • Smooth window management is ensured, including switching to another window, minimizing, etc.
  • Pressing ESC or clicking on the window's close button quits the program cleanly.
  • The game utilizes images provided by the MiniLibX library for graphical elements.
  • Additional graphic features, such as sprite animation, can be implemented for bonus points.

Game screenshot

Usage:

Compile the project using the provided Makefile: make and run the executable with a map description file as a parameter.

./so_long maps/your_map.ber

so_long's People

Contributors

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