ScratchData LogoScratchData
Back to DerpyHead0's profile

Sprite raycaster

DEDerpyHead0•Created March 1, 2021
Sprite raycaster
10
7
329 views
View on Scratch

Instructions

WASD and arrow keys Turbowarp may improve performance for some people, but it doesn't seem to help as much as it does for most projects.

Description

making a sprite raycaster is pretty easy, but trying to make it look good and run well is pretty hard, especially considering you're stuck with scratch collision detection. the most ridiculous part of this is the smoothing, which is essentially a geometry FXAA that distorts corners because diagonals are covered in corners for whatever reason. a more simple improvement is the improved wall projection, most sprite raycasters use a cylindrical projection because it's the easiest to implement but this one correctly compensates so that distance is calculated by how far in front of the player instead of how far away, and x positions correspond with left/right distance from the player instead of angle.

Project Details

Project ID494678032
CreatedMarch 1, 2021
Last ModifiedMay 7, 2021
SharedMarch 2, 2021
Visibilityvisible
CommentsAllowed