Endless Spiral Draw


#1

It was asked in a recent topic why Spiral Draw stops working after you've drawn for a minute or so.

This is because the Hopscotch app runs out of objects. The most you can use (clones plus original objects on the stage) is 512. So what's a Hop to do? Just keep restartng the project? Naw, where's the coding fun in that. We can re-invent Spiral Draw so that when Hopscotch runs out of clones, it pulls the old clones from the rear of the line and re-uses them at the beginning.

All code that follows is in this project:
Endless Spiral Draw

Summary:
Create all clones as the project loads & position them off screen. Reposition them to last touch position as you draw. Continue by repositioning first clones when you run out.





Note: Modulo is simply the remainder of a division operation. So any index less than 512 just gives that same index as the remainder. When the index gets to 512, then 512/512 = 1 so the remainder is 0 and the index is reset to the first clone.

@IKeudin


Weird Spiral glitch
#2

Cool idea! Good luck on coding that

First like and reply lol


#3

Finally done with all the edits :laughing:


#4

This is really helpful!
I find it annoying for the 512 limit clone rule, so this is really great!


#5

Great job!!! BTW how did you edit dat?


#6

@ValueGamesStudio
Thank you. Edited with an app called... wait for it... Photo Editor :wink::smile:


#7

Great topic! Really useful!