Help reducing lag

Hi,
I’ve recently made a 3D raycaster (link) Snap! Build Your Own Blocks
but it is extremely laggy! How do I reduce the lag?

You're not using the distance variable, and your step size is too small.
https://snap.berkeley.edu/snap/snap.html#present:Username=orion_aboy&ProjectName=3D%20raycaster%20v0.1

There is actually a reporter for getting the ray length to a sprite

image

This is much faster because you don't need to move steps.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.