Use pen for destructible ground to reduce lag


This is a watchable demo.
You may have noticed how slow all the 2D minecraft games made on Hopscotch lag a lot.
This is because of all the texts/objects being used.
I'll explain how to use pen to make destructible ground and still have minimal text for a character to stand on.

In this demo 20 dot clones are made along the screen bottom.
They move up 2 pixels when made drawing a brown trail/circle.
When the distance from the characters y position to the clones y position is less than 40 and the characters x position is less than the clones x position + 20 and greater than the clones x position - 20, the clone draws a white trail up/down to delete the brown circle it made and then the clone hides. The character can stand on the dot clones while they are visible. This is just advice for making pen objects that can be destroyed and still be detected until destroyed.

I hope this helps and gives ideas


Great topic!!

(Why do you have no crafts picture that's says MC?)


I don't know what u mean?


Ha!! You changed it!


Cool trick! This will be super helpful :D


Thanx Malie :slight_smile: !!!!!!


Here is the Hopscotch version.
If anyone wants to know how to do it.


I'll have to check le code.


Ooh that is a cool way to make the illusion of an 'object' disappearing! I will definitely keep that in mind for use sometime (will give you credit of course :slight_smile:)