Ultra Fast Efficiency Update(DDA)
Hello, everyone!
This is a major update regarding reducing lag. I implemented a method in raycasting called DDA (Digital Differential Analysis).
To keep things simple, raycasters work by moving rays along a grid with blank spaces and walls. Once a ray hits a wall, it reports how far it went. When all of the rays have hit a wall, the distance of all the rays is represented on the screen in a way that appears to be 3 dimensional.
The problem with this is that each ray has to check if it hit a wall at every point of its path, which is very laggy. DDA solves this by using math to calculate the position of the next grid-line intersection of the ray and jumps the ray right to that position. This makes it so that a ray that usually uses 63 checks would only have to use 2 checks.
As you can imagine, this reduces a lot of lag. You may be thinking there is some sort of drawback with the quality. The truth is the opposite: it increases the quality. Since DDA uses precise math, not only is it more efficient, but it can also pinpoint exactly where the next intersection is rather than moving the ray by a certain amount of units which is slower and less accurate.
Apologies for being a nerd 🤓
lil bro big game
Get Blaster Yar Enemies
Blaster Yar Enemies
#1 best 1st person shooter - play with your friends!
Status | Prototype |
Author | lil bro big game |
Genre | Shooter, Action |
Tags | 3D, Difficult, Dystopian, First-Person, Multiplayer, Psychological Horror, Shoot 'Em Up, Survival Horror |
Leave a comment
Log in with itch.io to leave a comment.