Game Development Community

Boundaries of the Torque universe.

by Chris "Dark" Evans · in Torque Game Engine · 07/19/2002 (12:28 am) · 6 replies

My team's next project is going to be space sim/RPG. I'm gradually getting things ready for us to start working on it.

A thought popped into my mind while watching TV:
What are the boundaries of the Torque universe? To be more precice, how far from position "0 0 0" can I travel before I can go no further?

What happens when I reach that point? Does the game crash? Buffer overflow?


lol, pretty uniqe question I guess :)

#1
07/19/2002 (12:33 am)
"Infinity and Beyond!"
#2
07/19/2002 (1:05 am)
LOL..
#3
07/19/2002 (1:30 am)
lol, seriously, it has to have some kind of limit. Memory can only hold so much.

Tomorrow when I have time I'll try and find the limit. Right now it's time for bed.
#4
07/19/2002 (6:06 am)
Chris,

This comes down to the question, "what is the floating-point magnitude?" as object translations are in floating-point. Although I can't account for any integer castings within the code, this would still leave a gigantic scope.

You could probably fly in a single direction for days/weeks without encountering a problem.

Now why you would want to do this is another question. ;)

Perhaps, "A day in the life of an exocet missile"?

- Melv.
#5
07/19/2002 (6:07 am)
Chris,

I believe the world coordinates are floats (32-bit), which means you can go pretty far away from 0,0 - but at decreasing resolution.

This shouldn't be a huge issue for you, since any space sim should be using relative coordinates and not absolute coordinates.

In this system, you break the universe up into 'cubes' of some known size (like 10Km x 10Km). Then everything within those cubes are positioned relative to the cube using a float. That leaves you plenty of resolution for precise placement/rendering.

Inter-cube resolution is still high enough for rendering, and the far-distant cubes (the 'resolution challenged') won't matter since they're culled from your render list.

If you *must* stick with absolute coordinates, at least use doubles (64-bit floats). Still, for large worlds (65,000 x 65,000 Km) you're going to get into resolution issues at the borders.

Hope that helps.
--Bryan
#6
07/20/2002 (12:49 pm)
I have modified sky.cc to become space.cc and have rendered a universe complete with all the observable stars to mag 4.0. I stripped out the terrain and skybox stuff to allow a universe type game area. I want to post my effort as a resource at some point but not quite there. Check this thread here. www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=2807
If you have any questions feel free to ask.

Wendell "wfbrown53" Brown