Why does my player disappears when pressed jump? All indentations wrong or right?


So, I am a beginner to Py game and i was creating an Infinite Runner Game. Turns out it is not working at all and when i asked the Youtube creator what was happening he said the indentations were wrong. Spent 8 hours looking for them still cant figure out. So basically what is happening, i created the Game state called game_active and set it to True by default. And all of my blit functions, i stored them inside if game_active: then pasted all my code. In the output window i press Space key and it disappears then stops. It stops because i added the code if snail_rect.colliderect(player_rect): game_active = False. I dont know why is it not working. Pls help

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum