I am working on a Rally style racing app and I would like to get some input on how to optimally lay out a few miles of roadway to race on with out the iPhone melting in my hands…
My approach is to divide the course into small prefab sections, 1/8 to 1/4 mile in length, and only have 1 or 2 visible at a time. As you leave one section and enter the next you will, after a short distance, hit a trigger that destroys the section you just left and before you would see the next section you would hit another trigger that instantiates the next section and so on.
Each course has many twists and turns as well as berms and hills so the next section to come in will do so before it would be visible to the player.
The triggers also act as the restart location for that section when the player goes off the road and gets stuck so they would never respawn in a section that is no longer there.
I’ve read up on Occlusion Culling which I think is perfect for indoor scenes but for large outdoor environments I’m not so sure about it’s use. It would seem to me that I would have better control doing it in this manner.
Also, would it be best to bring in all sections while the level is initially loading then destroy all but the first section and then start the race?
If all the objects are ready to roll (ie, just switching active on/off), you won’t experience slowdowns as the phone struggles to pull things into memory.
Of course, that also means you’ll need to be pretty thrifty on textures, etc. There’s not a huge amount of ram to play with.