Skip to content

tperraut/PFA-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Doom motor in OCaml

Install

Use git clone and make in main folder

Usage

./projet_pfa [map_path] [options]

Keys

FR mode

  • ESC : quit
  • z : move forward
  • q : move left
  • d : move right
  • s : move back
  • a : rotate left
  • e : rotate right
  • c : change between 2D and 3D view
  • l : change language between US and FR
  • m : toggle minimap
  • p and o : change player view

US mode

  • w : move forward
  • a : move left
  • q : rotate left

the other keys are unchanged

Options

  • -mode <2D | 3D> 2D or 3D display

  • -lang <FR | US> FR or US lang

  • -fov <NUMBER> field of vision (angle de vision)

  • -hov <NUMBER> height of vision (hauteur de vision)

  • -rs <NUMBER> rotation speed

  • -scale <NUMBER> scale of the 2D map

  • -map set a minimap in the lower left corner

  • -step <NUMBER> set the distance between two steps

  • -time <Day | Night> Day or Night display

  • -persp <FPS | RPS> FPS or RPS perspective

Collision Solution

Collisions are managed first by calculating the player's new position and then by searching the existence of an intersection between the walls (segments) and the player's movement (speed vector).

Sun and Moon

The sun and the moon change position when we rotate the player

Bugs

  • The player can pass through some corners.
  • When the player and some walls are very close, with a certain angle, to each other, the wall disappears. But the player cannot cross.
  • The sun and the moon move correctly only when the rotation speed of the player is 10

Thanks

Big thanks to Mr.Roux for debugging and explanations


By Dimitrios Christaras-Papageorgiou & Thomas Perraut

About

Doom motor in Ocaml

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published