i’d be happy if we could get
* “unlimited” map size without physics (sprite swap method)
* limited map size with physics
i think that would be an appropriate trade off. although in the latter case presumably it’s going to be up to the user to optimize the amount of moving game objects etc vs map size.
but looking at eg GS again…
“without a lot of actors i know you can run around a game as big as 320x20000 and it works fine. As long as your actors dont pop on until they are close everything will be cool”
I just don’t know if there actually is a generic solution. If you look at something like Sonic (and Strille’s version) i’m sure all physics is not a continual integrated engine… it’s basically per tile-collision code, so you only need to worry about what’s on screen… presumably the world outside the screen doesn’t essentially exist as far as the engine is concerned
One thing to consider, though, when it comes to a continuous physics world as we have with Corona, is what do do with offscreen items. If you look at how it currently works if you drop an item off screen and print out it’s position it’ll continually fall “forever”. ie the physics engine still tracks it. How many objects can you have before this starts causing slow down? In particular though i’m thinking about a situation when i fire a ball at high speed so that it leaves the bounds of the screen, and it bounces off a wall further along my map (but not on screen)… really the ball would potentially bounce back, and therefore it’ll come back onto the screen again.
Some engines though would just delete the ball outside of a certain area, ie it would get deleted before it reached the wall further along the map
Again, i’ve discussed maintenance of off-screen physics here:
http://developer.anscamobile.com/forum/2010/11/22/scrolling-large-non-tiled-world-objects
I know i’m repeating posts a bit here… but just trying to point Ansca in the right direction for the good of their users
j
[import]uid: 6645 topic_id: 5033 reply_id: 16667[/import]