ScratchData LogoScratchData
Back to dang's profile

mapTraversalTest01

DAdang•Created April 15, 2009
mapTraversalTest01
1
0
18 views
View on Scratch

Description

This is a test implementation of a simple collision detection routine for map traversal of a sprite. The technique is to figure out which way the sprite is going to try to move, then check a 180 degree arc around the sprite in that direction to see if we're about to bump into a wall - for this simple example I used white for open space and black for obstacle. Use the arrow keys to move the sprite around (currently one step at a time, sorry) and the sprite should stop when it's about to bump into an obstacle.

Project Details

Project ID490020
CreatedApril 15, 2009
Last ModifiedApril 15, 2009
SharedApril 15, 2009
Visibilityvisible
CommentsAllowed