Scrolling-Wraparound landscape.
-
Just something I'm pondering on. How would you go about making a seamless scrolling landscape (like in the iconic arcade game Defender)
Is it possible using maps? I've tried using the old wraparound trick of Asteroids and having the ship appear at the left side when it goes off on the right but when the map instantly updates it's not good and rather jarring on the eye. (also rather fatal if the landscape is higher when it updates. haha)
How would do go about doing it and is it going to be absurdly complex?
-
Maybe I'm saying something stupid but couldn't you have a system where there are copies of the background and when the player nears the edge of one, the copy appears next to it? It appears as if the background is the same but it's actually the copy? You could make the furthest background disappear to save memory and it can reappear if the player goes that way again?
-
You could route all your drawing functions through a function
Something like
Where(x,y)
And it returns the new points according to the wrap around
It does take a bit of programming.
I had the same problem in maelstrom it started from asteroids but I solved it for the stars in the background first? I think.
Then I used that code to solve it for others. -
@Something said in Scrolling-Wraparound landscape.:
Maybe I'm saying something stupid but couldn't you have a system where there are copies of the background and when the player nears the edge of one, the copy appears next to it? It appears as if the background is the same but it's actually the copy? You could make the furthest background disappear to save memory and it can reappear if the player goes that way again?
That sounds like an idea, but I'm worried about stuff like memory leaks, certainly worth looking into though. thank you
-
@xevdev said in Scrolling-Wraparound landscape.:
You could route all your drawing functions through a function
Something like
Where(x,y)
And it returns the new points according to the wrap around
It does take a bit of programming.
I had the same problem in maelstrom it started from asteroids but I solved it for the stars in the background first? I think.
Then I used that code to solve it for others.Thanks but that sounds a little beyond my ability at the mo. ;)
-
Try this
-
ohhhh very clever! Thank you.