- Home /
Infinite Sidescroller
What would be the best way in Unity iPhone to create a simple infinitely long level? The game would end when the player is loses.
I've seen functions like Application.LoadLevelAdditiveAsync or Application.LoadLevelAsync. But those are Unity Pro only, and not really for the iPhone. I could also just loop and instantiate prefabs, but how would I prevent the Position values that the player is at from getting maxed out?
Answer by duck · Mar 09, 2010 at 11:43 AM
You'd have to implement a sort of "treadmill" system, where the player is returned back to the world origin at regular intervals, and the ground, camera, & any other visible gameobjects are also moved at exactly the same moment, by exactly the same distance.
If done right, there should be no visible evidence that the move has taken place, and you can safely continue moving your player in the same direction!
Awesome. This sounds a lot simpler than strea$$anonymous$$g in new levels. Is there a good point on when to do the switch to make it seem all seemless?
Your answer
Follow this Question
Related Questions
Water wave ripple effect for mobile - koi pond 2 Answers
Polygon buffering/offsetting? 1 Answer
Procedural or Animated Textur in AirAttack Zeppelin Wreck (IphoneGame)? 1 Answer
Unity Procedural Examples on Android or iPhone 0 Answers
save meshfilter for retrieval even after app termination iphone android 1 Answer