Game Development Community

Sphere based terrain

by Nicki Vankoughnett · in Torque Game Engine · 08/18/2006 (7:55 am) · 25 replies

I have had it in my head for a while that I want to try to modify the game so that it can handle levels which are basically large spheres. Obviously, this is going to be a non trivial undertaking.

My initial goal is to get the game to procedureally generate a large sphere and to adapt the game engine so that it can be used correctly (such as making sure gravity accellerates to the center of the sphere instead of downward. This will in turn require that I find a way generate a terrain file with a sphere world that the game can render.

The problem thus far is that there is a great deal of code for the terrain editor, but I have yet to see anything that even slightly resembles a vertex list for the terrain.

For the moment that I really dont care much about being able to edit the sphere in the editor. I just want to be able to generate a .ter file. Where do I need to be looking to get an idea of how terrain geometry is stored / compiled?

(Last note: I am just using the Torque Game Engine, not the Shader engine. I have seen some posts refering to an 'atlas' editor / format that I suspect is for the shader engine.)

END COMMUNICATION
Page «Previous 1 2
#1
08/18/2006 (11:07 am)
Because there is no vertex list in TGE's terrain. It's nothing but a heightfield. Youl'd be better of writing something entirely on your own then trying to modify TGE's terrain. Or moving to TSE and seeing if you can hack something like that out with Atlas, which at the very least _might_ be possible.
#2
08/18/2006 (11:59 am)
Well, at some level, verticies or faces have to be generated for rendering and / or collision. If modfying a terrain file is out of the question, I can still try to kludge something else in. I still need an idea of where to start looking, however.

END COMMUNICATION
#3
08/18/2006 (4:06 pm)
Well you asked about writing a .ter file, and that isn't much more than a heightmap. Unless you want to try to apply some sort of spherical warping pass to TGE's terrain, I can't see any reason why you should be messing with it. I don't even know if something like that is possible either.

There's really no way something like this is going to be easy... it would require significant rewriting of any existing classes, to the point where it's probably cleaner to write your own. I would perhaps focus on getting the spherical type of gravity working first with some kind of test object, like a roughly spheroid .dif or something as a focal point.
#4
08/18/2006 (6:52 pm)
That will basically be my intent at this point. And I have no doubts that this will be a non trivial modification.

Anyway, thanks for the info.

END COMMUNICATION
#5
08/18/2006 (6:59 pm)
Look in the terrain directory. All the files starting with terr are for terrain, and terrRender.cc is probably what you want.

Good luck - it took me over a year to fully grok that code. :)
#6
12/06/2006 (7:22 pm)
Have you made any progress on this?
a spherical terrain is something i am very interested in
#7
12/06/2006 (10:50 pm)
Good luck with that.
It sounds pretty tough, but far from impossible.
And on the bright side, if you can pull it off you'll have an entire genre to your self!
I don't think there's a single game on the market that's doing this.
#8
12/07/2006 (8:20 am)
Infinity (http://fl-tw.com/) are doing something like this
I'm not sure if you can land on the planets and go for a walk which was my intention with spherical terrain
#9
12/07/2006 (8:48 am)
Why not just use a model, there are tons of games that model the terrain... Its the physics that i think would be the problem.

Take a look at Ratchet and Clank: going commando.


image.com.com/gamespot/images/2003/ps2/ratchet2/1111/ratchet_screen008.jpg
image.com.com/gamespot/images/2003/screen0/914659_20030829_screen005.jpg
Some times i think programmers go the road most complicated...
#10
12/07/2006 (10:06 am)
Using a model lag like crazy, especialy if its a planet sized model
#11
12/07/2006 (10:35 am)
I cant not see the point in using planet sized Sphere based terrain. Unless your out in the ocean, or on top of high mountains the world appears to be flat. A game player is seldom in a situation that allows them to see the terrain in a perspective where flat is not acceptable.

What would be cool is Sphere based terrain, where the terrain is on the INSIDE of the sphere, sorta like a man made planet, RingWorld thing- or explore the Hollow Earth Theory.
#12
12/07/2006 (10:41 am)
Sure you cant see its a planet when you stand on a mountain
but when you fly into space.....
#13
12/07/2006 (10:45 am)
Someday i plan to make a game based on planetoid-sized torroids.

ah, someday..
#14
12/09/2006 (7:34 am)
You could do something like what xcom did years ago..
www.itsmalta.net/archives/games/abandonware/strategy_war/ufoenemyunknown.pngsome sort of gui that has a globe but has the actual game play on a flat surface. I'm actually working on something like this for my project so anyone else thats looking to do this let me know and we can put some resources together.
#15
12/17/2006 (9:33 pm)
Quote:I don't think there's a single game on the market that's doing this.
There was a long time ago Populous3, as a matter of fact that's what brings me to this thread, I'm interested in recreating it in Torque, and would find this resource handy also :)

Now I know that some of you'll be rightfully saying 'No don't recreate a game, copyright issues', to that I reply, this is a personal project that won't be public. The only way I'd make it public is if I got the right to do so from EA, but that's prolly not happening (For free at any rate)...

-edit- Right now I'm taking the more simplistic approach of having the camera loop back to the other side of the map onMissionAreaLeave(), I might add whatever camera features I can try to make an illusion of sperical terrain later.

-edit- It's looking ok-ish with some bugs to work out to make it transition more smoothly
#16
12/20/2006 (8:51 am)
A planet sized sphere seems a waste of time - you can't tell it's a sphere and would take an army of artists.

The illusion of a spherical world might be the easiest way. It'd be easy to do a fish-eye lens in Torque, which looks spherical, and the terrain automatically wraps on it's self.

But I'd like to see an asteroid size world. A race track on a 1-mile asteroid sounds like fun, maybe even with tunnels, maybe so many tunnels it looks like a sponge. I was working on my own 3-D engine last year, and I could probably modify it to do that.
#17
12/20/2006 (3:22 pm)
An army of artists, what gives you that idea?
#18
12/21/2006 (8:39 am)
Planet Earth is about 200,000,000 square miles - so if each artist could a square mile a day, it would take 10,000 artists 10 years to populate the surface if you don't do oceans or deserts.
But maybe something like Second Life would be interesting - get a million subscribers to draw their own world then release the map as a game board, with yearly updates.
#19
12/21/2006 (1:33 pm)
Attempting to map Earth would be madness

i was thinking of planets more like mars so they could be progressively generated but with 1 key area with the buildings etc
#20
12/21/2006 (11:17 pm)
Anything bigger than Hawaii would probably be futile. But progressive generation might be a good idea. The engine I'm working on here has the map size of Torque, but the terrain and thousands of trees are placed semi-randomly. That would be easy to map across a gigantic space, so each 1-mile quad is randomly generated but will be the same each time. It would only need to draw the 4 quads in view at any given time but they could appear in endless sucession.
Page «Previous 1 2