ScratchData LogoScratchData
Back to grandpasp's profile

Test Bitmap Pixel Detection

GRgrandpasp•Created July 15, 2023
Test Bitmap Pixel Detection
1
1
15 views
View on Scratch

Instructions

In this project I try to demonstrate my trial-and-error test of a Sprite with a 1-pixel Bitmap Costume (the Pixel Hunter) executing a <Touching Color ?> block to detect the presence of another Sprite (the Pixel Target), also with a 1-pixel Bitmap Costume.

Description

Each of the 2 Sprites has 16 Costumes. Each Costume is a single pixel "dabbed" with a size 1 brush in 1 of 16 (4x4) pixel locations around the "insert" point. Every Costume of the Pixel Hunter is matched with every Costume of the Pixel Target. Both are located at Center Stage (0,0), In addition, 2 scenarios are used when positioning the target. One test simply positions the target and it stays visible while the Hunter is trying to detect it. The other test Stamps the costume and then hides. I would have expected those 2 actions to give the same result. They do not! The 3 "grids" on the stage represent the Costume Editor view. The grid on the right shows 1 Costume of the Hunter at a time. Each of the other grids show the result of all 16 costume tests. A "Found" costume shows Green. An "Un-Found" Costume shows Red.

Project Details

Project ID874895773
CreatedJuly 15, 2023
Last ModifiedJuly 29, 2023
SharedJuly 29, 2023
Visibilityvisible
CommentsAllowed