Handling infinite maps

Started by Tishu, September 11, 2011, 11:10:29 PM

Previous topic - Next topic

Tishu

Hello

I am trying to find out what would be the best approache for using a (very) large map. This is for a plane game, and the user needs to be able to fly around with very little restrictions.

I have thought about a few approaches for this:

  • Create a huge Map in Blender, export it, and hope the user won't see the end
  • Create a less huge Map, and add some limitations within the game that makes it impossible for the player to see the edges (for example traffic control sending fighter jets to take you down like in GTA
  • Use a seemless terrain 3D tile and repeat this as long as the user keeps going...

I know pretty much how to achieve 1 and 2, but not sure about 3. I thought I could have some basic tiles that I load in my game, and create them on demand with clone and place them in case they become visible. But this causes a few problems:


  • Drop in FPS when cloning an object? When disposing it when it is no longer visible?
  • Ability to place an object at runtime, accurately enough so that player does not see any space/overlap between the tiles
  • More difficult it seems, detecting when a surface becomes visible and what type of terrain should be there (mountain, sea, shore?)

I would be quite interested to read if anyone has ideas on this, specially the third bit on detecting what a new object should be created and placed at runtime. Anything available in JPCT in map tiling? Does anyones have any good experience in this?

Thanks
Nicolas

EgonOlsen

I did a very very basic form of this in Alien Runner, where you run on an endless track. But that's really simple, because there's only one direction of movement and no curves. I would rather go with 1) or 2), because i'm not sure that 3) is worth the hassle.

MrM

Or you could make your level on a sphere (like a planet), and have your plane fly around it, bound by radius from the surface of the sphere to the plane :)
You'd have to make your globe turn according to your plane's direction and speed though... You can fade stuff too far away like on Alien Runner, so not everything would be rendered, and fps wouldn't suffer so much.
Ah, but it's a wacky idea, just said it from the top of my mind :)

Tishu

True, but the issue is the radius of the sphere would have to be huge so that 1/ it appears rather flat and 2/ user does not get back to the airport too quickly by flying in the same direction :) Thanks for the idea though

EgonOlsen I think you are right, I will probably go for 2)

Thx
Nicolas