Skip to content

BarbaraC12/raycast

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 

Repository files navigation

RAYCASTING

I used this tutorial as resource to apprehend Cub3d from 42 Cursus. Link to my workspace TRELLO and here a link to PIKUMA website

raycast_js

Raycasting from pikuma tuto in JavaScript.

To see what code does:

Open index.html in your favorite browser like Chrome, Brave or Firefox.

What code does at end of JS part:

img

  • Player can move Up and Down
  • Player can change his direction to the Left and Right
  • We can look all ray of vision (FOV) to player ( 60 degrees)
  • All rays are traced until they collide with one wall
  • Player can move in the map and see the render
  • Possibility of having several walls of differents colors

Render step by step

img

ETAPE 1. Map construction

img

ETAPE 2. Map with the player's position and all the vision rays traced

img

ETAPE 3. Rendering the map in '3D vision'

img

ETAPE 4. Rendering with shadow effects

img

ETAPE 5. Rendered with the possibility of having walls of different colors

About

Raycasting from pikuma tuto in JavaScript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published