18/11/22 Removing the ground


Today I aimed to make the ground disappear after a specific point, as well as making the bottom of the screen a kill zone for the player.

I have changed the ground to being a singular sprite rather than a sprite group to make the code easier to understand.

The ground stops if it disappears off the screen, also the game will end if the player falls off the bottom. Furthermore, when introducing this method the player would be forced left when touching the ground. Therefore, to combat this, I have set the velocity of the player on ground level to 230 to stop them moving left (line 209)

The result of today’s code can be seen here:

falling off the bottom
disappearing ground

Leave a Reply

Your email address will not be published.