Im making a dodgeball game and i dont want to make thousands of balls. How can i make infinite balls.
Thanks
Offline
You Can Duplicate It A Million Times
Offline
thank you monkeyblaster9 but i would like a nother answer
Offline
Copy the Dodgeball sprites then paste them.
Offline
is there a way to copy more than one at once
Offline
youvecatstobekitten wrote:
is there a way to copy more than one at once
No.
Offline
you just duplicxate it
gdhsdehdsjk
Offline
If you have a maximum of 5 balls on the screen at any one time then you only need 5 sprites.
Offline
You can try saving the positions in a list (lists: x, y, direction) and then have a single sprite go to that position pointing in the first direction on the direction list, move 5 steps then stamp, save the new position and then go to the next item on the list and repeat. Once you get through all the objects in the list, clear the screen and repeat the process. It starts becoming slow once you reach 5 or more stamps, but then you can divide the work with multiple sprites.
Of course there are probably ways to optimize this (like instead of using the move block, you can use an algorithm to update the positions and then have it stamp at the updated positions. (I'm not sure if this would be faster, but I think updating the screen takes longer than doing math equations and saving them to a list or variable.)
Other than that, you'll probably have to wait for Scratch 2.0 or use a Mod.
Offline