GithubHelp home page GithubHelp logo

bensouchet / wolf3d Goto Github PK

View Code? Open in Web Editor NEW
15.0 3.0 0.0 14.26 MB

School Project - Graphic - Raycasting Game

License: Other

Makefile 1.38% C 90.97% C++ 0.62% Objective-C 7.03%
wolf3d raycasting raycaster school42 textures floor-casting libmlx ao ambient

wolf3d's Introduction

Wolf3D

Wolf3D is a program developed for my learning course at 42 school.

The objective of this project is to recreate the principle of ray casting of the famous game Wolfenstein.
For this we have to realize in C all necessary functions without using graphic libraries (except the Libmlx library required to create a window on MacOS provided by the 42 school).

PS : This game has not a real goal, you can simply explore the mazes.

Several options are available (see Keyboard shortcuts or/and Mouse controls sections for more infos) :

  • Move in any directions (sideways movements included)
  • Rotation with keys (or mouse position)
  • Textured Mode (with floor and ceil casting)
  • Walls collision (with an slight realistic offset)
  • Minimap with rotation according to the player rotation
  • Fire Torch Lighting simulation (in Normal & Hardcore Mode only)
  • Several songs (with Selection of track / Play / Pause and Stop options)
  • Hardcore Mode & Easy Mode
  • Ambient occlusion

Install & launch

git clone https://github.com/BenjaminSouchet/Wolf3D ~/Wolf3D
cd ~/Wolf3D && ./wolf3d maps/good/Maze_Medium.w3d

You have to launch the program with a parameter. This is the name of the map you would like open at the execution of the program. This parameter as to be the name of a valid map, below the list of available maps :
maps/good/Basic_00.w3d
maps/good/Basic_01.w3d
maps/good/Maze_Small.w3d
maps/good/Maze_Medium.w3d
maps/good/Maze_Large.w3d

Example :

Open one maze map ⇣

./wolf3d maps/good/Maze_Large.w3d

Keyboard shortcuts

Description  Key(s) 
Close the program (aka quit/exit)  esc 
Reset all the changes made  clear 
Hold to run faster  shift 
Enable or disable the mouse controls  M 
Make a step forward  ▲  or  W 
Make a step backward  ▼  or  S 
Make a step to the left  A 
Make a step to the left  D 
Rotate to the left  ◄  or  Q 
Rotate to the right  ►  or  E 
Hardcore Mode Switcher  H 
Easy Mode Switcher  Z 
Play / Pause the current song  P 
Switch to the first song  1 
Switch to the second song  2 
Switch to the third song  3 
Switch to the fourth song  4 

Mouse controls

Description  Action 
Change the view according to the mouse position in the window  Move the cusor in the window 
Rotate to the left  Stay the cursor in left side of the window 
Rotate to the right  Stay the cursor in right side of the window 

Contact & contribute

If you want to contact me, or fix / improve this project, just send me a mail at [email protected]

wolf3d's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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