ScratchStats LogoScratchStats

ScratchStats

Explore Scratch statistics and discover trending projects and creators.

Community

  • Apply for Verified
  • Apply for Reviewer

More

  • Donate
Not affiliated with Scratch.
Back to S65's profile

Optimized 3D Raycaster

S6S65•Created April 1, 2008
33
26
2,422 views
View on Scratch
View on TurboWarp

Notes & Credits

This is an optimized version of my raycaster. A raycaster creates a 3D rendering from a 2D map or array. It does this by shooting rays for each vertical line of the screen (for speed, this raycaster does every 4 vertical lines) and marks the distance from the player position to the wall (gotten from the ray). This raycaster also supports lighting. This optimized version is about 10x faster than my old one. I optimized the raycasting cycle by removing unnecessary variables that were being used, and also now 5 raycasters are working in unison, speeding it up even more. I didn't write the original code for this raytracer; the original code was written in BlitzBasic. I simply ported it over to Scratch and hugely optimized it.

Project Details

Project ID132779
CreatedApril 1, 2008
Last ModifiedApril 1, 2008
SharedApril 1, 2008
CommentsAllowed

Remix Information

Direct Remix SourceView Parent
Original ProjectView Root