1
General / Best technique to create infinite sidescroller
« on: November 16, 2023, 10:43:29 pm »
Hi all,
I couldn't find any thread regarding best techniques to create infinite sidescroller.
I thought there would be something like sf::View::set_loop(bool); function that would make it so that if you sf::View::move() outside of the view it would overflow to show start. But there isn't such a feature
For example think of a game like flappy bird, one would want to simply create 2xWidth render size view and infinitely scroll, add pipes as it goes along and view gets recycled
But just keeping bird steady and moving pipes is ok too I guess.
I couldn't find any thread regarding best techniques to create infinite sidescroller.
I thought there would be something like sf::View::set_loop(bool); function that would make it so that if you sf::View::move() outside of the view it would overflow to show start. But there isn't such a feature
For example think of a game like flappy bird, one would want to simply create 2xWidth render size view and infinitely scroll, add pipes as it goes along and view gets recycled
But just keeping bird steady and moving pipes is ok too I guess.