hi all, how do i make an automatic scrolling game horizontally?
i mean the scroll start at the beginign of the game.
thanks
every tick: scroll to x: scrollx + ([speed eg: 10] * dt)
Hope that helps! and it pauses the scroll when game is paused thanks to *dt
thanks a lot and how to make the speed progressive?
no one?
Use a "speed" variable instead of "10" and increase it depending on the level, time, etc.
Try this tutorial
https://www.scirra.com/tutorials/1027/p ... -scrolling
Develop games in your browser. Powerful, performant & highly capable.
how to use a speed variable???
variable speed = 10
Every x seconds set variable speed to speed + whatever
every tick: scroll to x: scrollx + ([variable speed] * dt)