Skip to content

A raycasting engine made in Python using PyOpenGL

License

ARYANTECH123/pythonRaycaster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

A Python raycasting engine made in openGL

This ia a simple python raycasting engine made in python. To run it, you must have Python3 and PyOpenGL.

Python can be installed from the website

To install PyOpenGL, you can go to the documentaion

Once both are ready and configured, download or clone ray.py and use python ray.py to run it.

Running the code

Once the program starts, you'll see 2 views : A 2D map with the player and all the rays, and a 3d, raycasted projection. Use WASD to move, and Q to teleport.

Playing with the code

The algorithm, though it may appear complex, is actually really simple and fast, and hence was used on many classic games like Wolfenstien 3D, to great effect on the limited hardware of the time. If you want to learn more about the algorithm, this guide is a excellant starting point.

In order to change the map, simploy edit the 64 element long world list. it is formatted so thet a 0 is a space and a 1 is a block.

Screenshots

img

About

A raycasting engine made in Python using PyOpenGL

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages