GithubHelp home page GithubHelp logo

42_so_long's Introduction

So_long

Banner

"The goal of this project is to code a 2D game using the MiniLibx."

Table of contents

Introduction

This project is a very small 2D game. Its purpose is to make you work with textures, sprites, and some other very basic gameplay elements. With this project, we embark on a foundational computer graphics project aimed at cultivating essential skills in window management, event handling, color representation, texture rendering, and related aspects. Leveraging the MiniLibX library, an internally developed toolset, this endeavor provides a structured platform for navigating tasks such as window creation, image manipulation, and user input management.

This project emphasizes rigor in C programming, application of fundamental algorithms, and research proficiency. It offers an opportunity to engage methodically with graphical programming concepts, fostering incremental skill development and reinforcing core principles in software engineering.

The code was written according to the 42 norm guidelines(norminette).
View Norm

Main game

Main Overview

Usage

Important!
Please note that due to potential incompatibilities with the MiniLibX library, this project may encounter issues when executed on certain systems. It has been specifically developed and tested on Linux Ubuntu 22.04, and its functionality on other platforms may vary.

  1. Clone the repository
git clone [email protected]:amauricoder/42_So_Long.git
  1. In your terminal, do make to compile the files:
make

This will download the external library and generate a so_long file in the root folder, this is the executable for the game.

  1. To start playing, go to your terminal and use the executable with a path to a valid map as argument:
./so_long maps/lady.ber
  1. This will open the window of the main game. Use the keys A,S,D,W or Arrows to move your character. The goal is to take all coins and go to the UFO.

BONUS

The Bonus section of this project was developed in compliance with the subject requirements, which stipulated the inclusion of animations, text strings on the screen, and the introduction of an enemy character. This is a more "open" project, so I've decided to to a little "multiplayer" experience with my project.
Bonus Overview

Bonus Usage

  1. Clone the repository
git clone [email protected]:amauricoder/42_So_Long.git
  1. In your terminal, do make bonus to compile the files:
make bonus

This will download the external library and generate a so_long_bonus file in the root folder, this is the executable for the game.

  1. To start playing, go to your terminal and use the executable with a path to a valid map as argument:
./so_long maps/lady.ber
  1. This will open the window of the bonus game. Use the keys A,S,D,W to control the PLAYER1 and the UP, DOWN, LEFT, RIGHT arrows to control the PLAYER2. In this game, PLAYER1's objective is to collect all the coins and successfully escape the game area. Meanwhile, PLAYER2's goal is to intercept PLAYER1 and prevent their escape. If PLAYER2 manages to make contact with PLAYER1, the game concludes, and PLAYER1 loses. Conversely, if PLAYER1 successfully collects all the coins and manages to escape, PLAYER2 loses the game.

Makefile Overview

In this project, the Makefile offers the following essential rules:

  • make: Download the MiniLibX to the library/ folder, compile the MiniLibX, compile the Libft and compile the project executable to so_long .
  • make bonus: Download the MiniLibX to the library/ folder, compile the MiniLibX, compile the Libft and compile the project bonus executable to so_long_bonus .
  • make clean: Cleans the .o files, preserving so_long.
  • make fclean: Completely cleans the directory by deleting all .o files and the executable so_long.
  • make re: Refreshes the executable so_long by recompiling everything.

License and Sincere Advice

View License

This is a complex project. Try to use this project as a model for you if you want. But, if you got to this point of the course, you are already able to create this project from your own. Believe, believe!

42_so_long's People

Contributors

amauricoder avatar ccosta-c avatar

Stargazers

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