Giter Site home page Giter Site logo

wildfrenzy / 42_cub3d Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 6.57 MB

It is a group project, inspired by the world-famous Wolfenstein 3D game, which was the first FPS ever. Our goal is to make a dynamic view inside a maze, using ray-casting.

Makefile 4.58% C 95.42%
42 42berlin 42cursus 42projects cub3d cub3d-42

42_cub3d's Introduction

About The Project

It is a group project, inspired by the world-famous Wolfenstein 3D game, which was the first FPS ever. Our goal is to make a dynamic view inside a maze, using ray-casting.

Subject requirements

  • You must use the miniLibX
  • Display different wall textures that vary depending on which side the wall is facing (North, South, East, West).
  • The left and right arrow keys of the keyboard must allow you to look left and right in the maze.
  • The W, A, S, and D keys must allow you to move the point of view through the maze.
  • Pressing ESC or on the red cross on the window’s frame must close the window and quit the program cleanly.
  • Your program must take as a first argument a scene description file with the .cub extension.

Scene:

  • 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
  • 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 and separated by one or more empty line(s).
  • Each elements (except the map) first information is the type identifier, followed by all informations:
    • Texture:
      • NO, SO, WE, EA - North, South, West, East

        ex: NO ./path_to_the_north_texture

    • Floor color:
      • identifier: F
      • RGB colors in range [0,255]: 0, 255, 255

        ex: F 220,100,0

    • Ceiling color:
      • identifier: C
      • RGB colors in range [0,255]: 0, 255, 255

        ex: C 225,30,0

Usage

To start program:

  1. Clone repo
  2. Download and install MLX42 library inside of Cub3D repo: https://github.com/codam-coding-college/MLX42
  3. make
    ./cub3D maps/0.cub

cub3d example

Useful links

  1. https://lodev.org/cgtutor/raycasting.html
  2. https://lodev.org/cgtutor/raycasting2.html
  3. https://lodev.org/cgtutor/raycasting3.html
  4. https://lodev.org/cgtutor/raycasting4.html

42_cub3d's People

Contributors

bmacmaho avatar bmacmaho42 avatar wildfrenzy 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.