ScratchData LogoScratchData
Back to kriblo_test's profile

Example: Simple street map using the Pen

KRkriblo_test•Created September 20, 2021
Example: Simple street map using the Pen
10
6
71 views
View on Scratch

Instructions

Arrow keys to pan the map. Slider to zoom. Using the Pen, how do you draw a diagonal road on a scrolling map? This is what I came up with for my project The Village. In this example, I've added zoom, and simplified the code. The code might look daunting, but the math is actually quite simple, and mainly relies on the straight line equation to draw the diagonal lines within the rectangle of the "screen" constraints. I wish I had time to properly comment the code, but I don't, sorry ;) All code by me (@kriblo). The Village: https://scratch.mit.edu/projects/417540041/

Project Details

Project ID572494948
CreatedSeptember 20, 2021
Last ModifiedSeptember 22, 2021
SharedSeptember 20, 2021
Visibilityvisible
CommentsDisabled