How would I make a platforming game where the screen continuously scrolls upward so if your caught at the bottom you die. Also if a certain time is elapsed the screen scrolls upward a certain amount.
Start of layout:
-> Set scrollY to Player.Y
-> Set scrollY to scrollY-scrollSpeed*dt
Player.Y > scrollY + windowHeight/2
(In the last one, I consider that the Player has it's origin point at the bottom (at its feet) if it's in the middle, just do
Player.Y > scrollY + windowHeight/2 - Player.Height/2
Develop games in your browser. Powerful, performant & highly capable.
You should put an invisable object in the centre of the screen, and set the game to scroll to it. Then have it move up the Y axis every x second/tick