jPCT-AE - a 3d engine for Android => Support => Topic started by: Tishu on September 11, 2011, 11:10:29 pm

Title: Handling infinite maps
Post by: Tishu on September 11, 2011, 11:10:29 pm

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:

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:

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?

Title: Re: Handling infinite maps
Post by: EgonOlsen on September 12, 2011, 08:42:20 pm
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.
Title: Re: Handling infinite maps
Post by: MrM on September 13, 2011, 04:03:09 am
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 :)
Title: Re: Handling infinite maps
Post by: Tishu on September 15, 2011, 09:54:45 pm
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)