Game Development Community

Space trading/combat games like "Free Trader

by Nicolas McGregor · in Game Design and Creative Issues · 08/19/2007 (6:27 am) · 10 replies

I've often been tempted to start creating a space trading/combat game in the tradition of "Elite", "Free Trader" etc with the arcade-combat style of "Wing Commander". Not for commercial purposes, and not with a deadline in mind, more just for the fun of it. But I've always been a little reluctant to start, since I've found it very difficult to formulate a working plan of action regarding modelling the universe. I've played games such as "Free Trader" (at least i think it was "Free Trader"), where you approach a planet from a distance, and it gets bigger... and bigger... and bigger... It actually appears planet-sized. And I have no idea how this was done. I've also found it very difficult to find examples of how to create such a world for such a game.

In every engine I've purchased, the FPS tends to be the main focus of tutorials. I have a pretty solid idea of how to create an FPS game. However, a space-combat game, involving moving in 3 dimensions through remarkably large areas of "space", I'm not so sure how to do successfully. Does anyone have any thoughts on how to go about creating persistant massive worlds on such a galactic scale?

I'm not asking for code examples, more just a methodology of how to handle the 3d space involved. While one way of restricting the size of the game space involved would be to include "wormhole" travel or "warp speed" travel between separate galaxies, I love the concept of simply targeting a distant star in the HUD and flying in that direction, possibly taking hours or days or more in real-time to get there (if you were so inclined).

Unfortunately, my previous game-creating experiences have always taught me that vast open areas are a Bad Thing that will basically kill the framerate. So if anyone has any broad thoughts on how to successfully model a universe without the framerate going into single figures, I'd love to hear them. Again, I'm not asking for specific coding examples, rather, I'm interested in different design techniques that'd allow for the creation of such a game.

Thanks for your time.

#1
08/19/2007 (9:59 am)
All youd have to do is use the flying vehicle datablock i think, maybe with one or two changes. If you wanna start this up and maybe get a prototype, send me an email at bennikane@yahoo.com or bkimmel@charter.net, I can do some modeling and story/missions.
#2
08/19/2007 (11:33 am)
Quote:where you approach a planet from a distance, and it gets bigger... and bigger... and bigger... It actually appears planet-sized. And I have no idea how this was done.
I don't know how the professionals do this, but I would make a flash movie (or theora if you want) and use it to "simulate" getting close to the planet. Then, just fade out the movie to show the actual planet. You could even go so far as to show the player landing on the planet if that's what you want.
#3
08/19/2007 (11:16 pm)
Sounds like you're talking about "Battlecruiser/Universal Combat" or "Freespace." the Freespace 2 source code has been released to the public so if you used that a lot of hard work would be done.

i'm sure many games that use areas that huge use some type of LOD for high-polygon objects. I don't belive there were planets in Freespace but in Battlecruiser/Universal Combat there are & in Klingon Acadamy there's players with mods & whole solar systems. I never had a slowdown in any of those so it could just be that the the games have never been powerful enough to slow me down.
#4
08/22/2007 (8:17 am)
Well, you definately can't, for example, load even one solar system as one level. You can't specify star S to be at x/y/z coordinates x y z and planet P to be at i j k. I'd make a level for 'close approach' to each star or planet, which is loaded when you get close enough. When you're in 'interstellar' (or interplanetary) space, far away from anything, I'd simply keep track of the player's position relative to something else. Then you render bitmaps for all the celestial objects based on that information. Scale them by distance, etc. It'd be a lot of hard maths work, but in my unproessional opinion it's the only way to go about it. Unless you want something like Freelancer, where a planet is about two hundred metres across...

I eally like the idea of having to navigate. You don't just, going back to Freelancer, jump into a portal which takes you to another tiny little area of space to roam around. You actually have to point yourself at the star you want to go to, hit the hyperspeed button, and stop before you smack into it. Now you've got me thinking ;). How awesome would it be to do a full shipboard simulation? Buy a ship, hire a crew, walk round inside it and talk to people...
I guess that's been thought of before. Meh.

Slightly off topic, have you played Noctis? It's a space exploration game which has pretty much infinite numbers of planets. I'm not sure if they're procedurally generated or what, but it's awesome.
#5
08/22/2007 (11:00 am)
I don't really see why you can't contain a solar system in one level. The thing about large levels being unwieldy is that there is a lot of terrain and objects to render, and even when they're off-screen, the basic geometry still has to be loaded into memory.
With space, there's no terrain, only objects; and even then if you don't go overboard, not many of those when you're flying around.

There's an old game called Independance War 2: Edge of Chaos which does exactly this. Each solar system is one single level.
I think I even know how they did it too. At the top a level is simply an XYZ listing of coordinates for all celestial objects and 'locations' within the system. When you're not within X distance of any of these objects, they aren't even loaded into memory. (The exception here would be very large or bright objects like nebulae and the local sun/s)
As you approach a location, it's major objects (planets, stations, debris belt, asteroids, etc) are loaded into memory in a queue based on size. Depending on how optomized your engine is, this can either be very fast, cause a very slight pause (as in IWar2), or might cause a loading delay of a few seconds.
I believe that IWar2 hides it's loading delay within the visual mechanics of space travel, as the ship visually slows down as it approaches a destination, instead of dropping in instantly.

So, it's possible, just gotta understand how it all works and be creative.
#6
08/23/2007 (8:04 am)
What I meant by a 'level' was the usual sense of the worlds - a .mis file with commands to create each planet, star, asteroid, dust cloud, etc., and an xyz location for each of them. Unless you're dealing with a tiny system with a tiny star, I don't think Torque can take numbers large enough to specify all those locations :P. That is, if you want the usual 1 game unit = 1 metre.

If by 'level' you mean a continuous environment, then ideally I'd make the entire galaxy one 'level'. Like you describe, you record the locations of different objects and based on that, determine what objects should be rendered where.
#7
08/23/2007 (8:43 am)
The problem with representing a whole solar system in one level really doesn't have anything to do with rendering. It has to do with precision (or lack of) of floats at high values.

www.gamasutra.com/features/20020712/oneil_01.htm
#8
08/23/2007 (12:41 pm)
Thanks for the responses - certainly lots to think about. =)

I think you hit the nail on the head as regarding actual level design, Daniel. My limited experience of game design had me thinking in terms of loading a single "level" as a .mis file containing an entire system, and this just didn't seem a practical approach. Your concept of 'close approach' as a separate level is one I hadn't thought of. i find the idea very appealing. It would maintain the illusion of large masses within the bounds of huge spaces very effectively, I think.

While I certainly love the idea of continous environment, as Trace suggests is used in Edge of Chaos (which I dont think I've played, and might have to go find), I suspect my command of Torque doesn't quite approach that level of sophistication. But I think it was continous environment I had in mind. I seem to recall loving Free Trader, but being extremely frustrated by the limited area open to exploration at a given time.

I haven't yet looked at Noctis, but that's the second time I've heard it mentioned this week, as a friend of mine was raving about it - he also said it was awesome.

Many thanks again for the responses.
#9
08/24/2007 (9:48 am)
Whoah! Brilliant link there, ArmedGeek. Nicolas, you should probably check it out ;). It's really good. It's a link to the third part of a series. In the second part you can download an exe demo of the Earth and the Moon generated with dynamic LOD and at full scale. It's awesome. All he's got to do is add more detail to them...
It's a real shame his website doesn't seem to work. I'd have loved to get my hands on the most recent source code...

EDIT: Now I'm really interested in actually making a game like this. Which is really bad, 'cause I've already got a huge project on my plate. But the thing is, it looks like doing it the way described in the Gamasutra artice would require huge modifications to Torque. Even converting object positions to doubles rather than floats would be a pretty damn big task :P. Then (if I'm reading this right) there's changes to the usual way the camera renders, the way objects render, there'd probably be a large amount of pain in implementing ROAM for the planets...
So I reckon I'll sit back and let someone else handle it ;)

Or, if I really can't resist the idea any longer, I'll check out OGRE and see how well it can be modified. Or code the engine myself... (Ha. Ha.)
#10
08/27/2007 (2:52 pm)
Elite is a classic game, no doubt, and I am currently designing a remake of this remarkable game, with a significant amount of improvements for the PlayStation 2 Linux Development Kit and it is going to be called Elite Black Edition, and is located at here. It is intended to be able to allow travel to the entire contents of the Tycho 2 Star Catalogue, which currently stands at some 2.5 million differents stars.

Test code so far is providing between 800 - 1200 fps, with basic lighting, texturing and models, which is highly encouraging.

Have fun and may the source be with you.