Giter Site home page Giter Site logo

42-cub3d's Introduction

Cub3D

Description

Cub3D is a project that aims to create a 3D game using the raycasting technique. The project was developed using the C language and the Codam 42MLX library. The Game is inspired by the world-famous game Wolfenstein 3D, which was developed by id Software in 1992. The Game is a maze game where the player has to find the exit while avoiding the enemies. you can fight the enemies using the gun that you have, but be careful, you have limited ammo.

Note:

The project was developed and tested on a macOS system, and it may not work on other operating systems.

Installation

Pre-requirement if you are in a macOS you need to have gltw you can install it using brew:

brew install glew
  1. Clone the repository
git clone https://github.com/abouabra/42-Cub3D.git
  1. Navigate to the project folder
cd 42-Cub3D
  1. Run the make command
make
  1. Run the game
./cub3D maps/bonus.cub

Usage

The game has a few maps that you can play, you can find them in the maps folder. You can also create your own map and play it using the game.

The game can be closed by pressing the 'esc' key or by clicking the red cross on the window.

Map

The map is a simple text file with the following characters:

  • 1 for the wall
  • 0 for the empty space
  • N, S, E, W for the player's starting position and direction
  • (space) for the empty space

Controls

The player can move using the WASD keys. shooting is done by pressing the space key. you can move the camera using the arrow keys or the mouse.

Screenshots

Screenshot 1

Screenshot 3

Screenshot 4

Final Note

If you have any suggestions or improvements, feel free to open an issue or submit a pull request.

42-cub3d's People

Contributors

abouabra avatar

Stargazers

Daniel Bruno avatar  avatar

Watchers

 avatar

Forkers

dsfb

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.