ScratchData LogoScratchData
Back to TheLogFather's profile

Clone depth-of-field layering demo (no lists)

THTheLogFather•Created December 19, 2014
Clone depth-of-field layering demo (no lists)
177
131
3008 views
View on Scratch

Description

See comments inside for full details on how this project works. Click around on the background to spawn walking cat clones that march across the screen to the right, always layering correctly according to how far 'away' they are. This system does three main things... 1. Sizes the clones according to their Y position so higher clones look farther away, to match the grassy field background image. 2. No longer uses a list to find the layer... Instead, it sends a broadcast to ask all the existing clones to compare their Y positions with the newly spawned clone. By counting how many have Y position below the new one, we know how many layers to move. 3. Walks the clones at a speed appropriate for their 'distance'. Credit to @Locomule for the original demo idea. And to @griffpatch for the Scratch cat walk-cycle, of course!

Project Details

Project ID40603034
CreatedDecember 19, 2014
Last ModifiedSeptember 14, 2022
SharedDecember 20, 2014
Visibilityvisible
CommentsAllowed

Remix Information

Parent ProjectView Parent
Root ProjectView Root