Hi,
I want to build a side-scrolling (jump and run) game that has an infinite level. Therefore I have to split the level up into smaller chunks.
My problem is to find out when a new chunk has to be loaded.
Imagine the following situation (the game actually is in 3D, not 2D):
![Game situation][1]
The yellow block can be deleted, because it is no longer visible. I'm using OnBecameInvisible to find out, if the block moved out of the camera's view.
But how do I find out when to load the next (blue) block? I tried playing around with the value of the X axis of the second to last block, but hardcoding this value will mess up the game when the aspect ratio changes.
Any ideas? :)
[1]: http://i41.tinypic.com/qs5j5t.png
↧