Giter Club home page Giter Club logo

cub3d's Introduction

cub3d

In this project I create a dynamic 3D view of the inside of a maze using Ray-casting. This project is inspired by the worlf-famous eponymous 90's game, which was the first FPS (Fist Person Shooter) ever Wolfenstein 3D.

How to use it?

This project uses a tiny graphics library MinilibX. Systems requirements are specify here.

At the root of the repository run the command

make cub3d

If failure for any missing dependencies, install them and re-run the command. Upon success, an executable file named cub3d will be created. Run the command

# SYSNOPSIS:
# cub3d map [--save]

./cub3d maps/map1.cub

the flag --save is the only flag available, it's used to save the first rendered image of the inside of the maze in a bmp file named screenshot.bmp.

Flag omitted, a window displaying the dynamic 3D projection of the maze will open

Run With Docker

docker build -t cub3d .
docker run -v $PWD:/cub3d cub3d
sudo chown $(id -u):$(id -g) cub3d
Maze view

Use the keyboard as follow to move inside the maze:

up / w to move forward
down / s to move backward
a to move left
d to move right
left to rotate left
right to rotate right
esc to cleanly close and exit the program.

Configurations

The files holding the configuration of the maze is located in the directory maps.

R 948 480
NO textures/wall_1.xpm
SO textures/wall_2.xpm
WE textures/wall_3.xpm
EA textures/wall_4.xpm
S textures/lion.xpm
F 184,113,39
C 51,198,227

   1111111111111111111111111111
  11000000001100000000000000001
  10010000011100000111100010001
  100100000000000201  100010001
1110110000011100000111100010001
1000000000000000000000000000011
100000000011000001111111111111
111101100011110111
   1011001111101 11111111111
1111000011010101110000000001
1000000000000000110000001011
10200000000000001101010010011
111101111001010000200000W0001
10000000001111100000000000111
111000000001  1000010100011
  1111111111  111111111111

cub3d's People

Contributors

airseneo avatar ifackoen avatar

Stargazers

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