Thanks to visit codestin.com
Credit goes to github.com

Skip to content

markelberg/Doom_Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Doom_Python (in progress)

(Recommended tutorials: https://lodev.org/cgtutor/raycasting.html, https://www.youtube.com/watch?v=4gqPv7A_YRY)


Initial Setup

Currently, I implemented the initial setup: the map, the player and the logics of player-wall collision and movement using basic trigonometry to update the player's coordinates. Knowing the angle of the player's direction and the speed of his movement, we can update the coordinates of the player (dx, dy).

movement_croquis
preview


Raycasting logic (player's FOV)

I implemented the raycasting logic so the FOV-rays also check when a collision occurs and optimize the mathematical parts of the code using Numpy and Math libraries.

For each ray in the FOV we need to get its intersection point with the wall. Knowing the map functions as a grid, we're going to search for vertical and horizontal intersections in each "square" of the grid to check if it has collided against a wall. We calculate separately the horizontals and verticals intersections of the grid-map using trigonometry.

ray_croquis preview2

About

Creating a "3D" Doom-style game in Python with raycasting technique

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages