Trying to make the game harder

I am working through the Jumper Jam course. I’m wanting to make the game harder so that every time it generates more of the level, the platforms will spawn further apart. I’m not really sure what I need to change or where I need to start looking in the code. I imagine it would be in level_generator code, but I don’t know what exactly I should change.

Hi,

not started the course as yet myself, so unfortunately i cant help with the specifics as yet.

hopefully someone can help more who is at the same stage of the course as you are.

I wont be able to get caught up with the course until next week myself, but looking forward to it :slight_smile:

The way i would probably do this is manipulate this var at the top of the script
var y_distance_between_platforms = 100

I would get the score value and as the score reaches a threshold change this value to increase the distance.

I would also probably try to manipulate this check in the level generation code around line 57 on my code and add an if statement to say if the current_score < 1000: then the dont change it but if its > 1000 && < say 5000 then change the variable to a higher value.

That is at least where i would start looking to modifiy the game at a quick reglance of the code :slight_smile:
Hope this helps

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms