Skip to content

A python raycasting implementation, with pseudo 3D rendering

Notifications You must be signed in to change notification settings

joao-pedro-braz/raycasting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Raycasting

Description

This project is a Python implementation of raycasting, with an attempt of 3D rendering the 'casted' scene.

Dependencies

This project uses Pygame and Numpy, both of which can be installed via pip, by:

pip install pygame
pip install numpy

Drawing Mode

On Drawing mode you can use your cursor to place obstacles that will block the rays. To place an obstacle, simply click and hold your left mouse button (the cursor's current position will be one of the edges of the obstacle), drag it to another place and let it go.

Controls

Movement

  • W => Move Forwards
  • A => Move Left
  • S => Move Backwards
  • D => Move Right

Rotation

  • Left arrow key => Rotate Left
  • Right arrow key => Rotate Right
  • Up arrow key => Move scene up
  • Down arrow key => Move scene down

Interaction

  • Q => Toggles drawing mode
  • R => Reset scene

Running

Finally, you can run the project by executing the main.py file. For instance, by typing the following on the terminal:

python3 main.py

About

A python raycasting implementation, with pseudo 3D rendering

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages