ScratchData LogoScratchData
Back to gtoal's profile

3d graphics demo for MadMoss using pen

GTgtoal•Created October 28, 2014
3d graphics demo for MadMoss using pen
17
8
512 views
View on Scratch

Instructions

Look at the source to see how the corridors are drawn from back to front. This is an example of the use of Painter's Algorithm. It's simpler than raycasting, but a little more expensive in CPU terms, but as long as it redraws fast enough, does that matter nowadays? A small amount of shading is applied as a depth cue.

Description

See discussion at http://scratch.mit.edu/discuss/topic/50892/ It should be possible to tweak this code to allow you to move through the maze smoothly rather than jumping to the next maze square, since the drawing is done one x pixel at a time. (An alternative rendering scheme is demoed at http://scratch.mit.edu/projects/31586220/ which stamps each level of the corridor with a scaled sprite)

Project Details

Project ID31569616
CreatedOctober 28, 2014
Last ModifiedOctober 28, 2014
SharedOctober 28, 2014
Visibilityvisible
CommentsAllowed