ScratchData LogoScratchData
Back to gtoal's profile

Ray-casting experiment V2

GTgtoal•Created February 8, 2016
Ray-casting experiment V2
11
5
1409 views
View on Scratch

Instructions

OK, this version is better (by raycasting to every square in the matrix, rather than just the edges) but it is still missing some cases, as in the startup example (right hand edge, row above the player). I think it's a <X vs <=X bug... Cursor keys to move the red square around. The main image doesn't change, I haven't written that part yet. (And now I have https://scratch.mit.edu/projects/159332081/ I probably never will)

Description

remixed from my own project https://scratch.mit.edu/projects/97005201/ todo: optimise by raycasting surrounding 8 squares and then pushing deeper only at the edges and gaps. Every time you hit a block you can eliminate many blocks directly behind it.

Project Details

Project ID97075028
CreatedFebruary 8, 2016
Last ModifiedMay 6, 2017
SharedFebruary 8, 2016
Visibilityvisible
CommentsAllowed