Coder Social home page Coder Social logo

cub3d's Introduction

Cub3D

This is a project for the 42 school curriculum, which is about creating a "realistic" 3D graphical representation

of the inside of a maze from a first-person perspective using the Ray-Casting principles.

Installation

To run this project, you need to have the miniLibX library installed on your system.

If you're on a Mac, it should already be installed. If not, you can get it from the official repo.

After that, clone the repository and run make in the root directory to build the executable file.

git clone https://github.com/rkedida/cub3D.git
cd repo
make

Usage

To run the program, you need to provide a valid .cub file as an argument.

For example:

./cub3D maps/map.cub

The program will display a window showing the 3D representation of the map described in the .cub file.

You can use the arrow keys to look around, and the W, A, S, D keys to move.

Press ESC or click the red cross on the window's frame to quit the program.

Map format

The map file must be in the format of .cub. The map must be composed of only 6 possible characters: 0 for an empty space,

1 for a wall, and N, S, E or W for the player’s start position and spawning orientation.

The map must be closed/surrounded by walls, and except for the map content, each type of element can be separated by one or more empty line(s).

Except for the map content which always has to be the last, each type of element can be set in any order in the file.

Each element (except the map) firsts information is the type identifier (composed by one or two character(s)),

followed by all specific informations for each object in a strict order.

Contributors

This project was completed by:

Robel Kedida @robelkedida

Shettima Ali @Shetteemah

Contributing

Contributions are welcome. Please open an issue or submit a pull request for any bugs/improvements.

cub3d's People

Contributors

rkedida avatar shetteemah avatar

Stargazers

Akshay Rasal (arasal) avatar  avatar Tam avatar

Watchers

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