Game Development Community

Re: Ships/Vehicles/Transportation

by Richard Van Stone · in Torque Game Engine · 11/12/2004 (10:06 pm) · 11 replies

I'm wondering how possible it would be to set this type of ship up in game. As a preface I'd like to mention I do /not/ want to use interiors as they are in game now, nor do I want to use a seperate object to represent the ship, and an interior to be the inside of the ship...that being said....


I want to create an object that can range in size from a singleman starship to something like the millenium falcon, to a complete space station. The difference with this particular object is that the starcraft they represent can move around in space, land on planets, and have players walk around inside them. I do /not/ want to have a mount point that players are just attached to. For instance

A: A single man star fighter (a mount point would be sufficient)

B: A millenium falcon ship (can hold up to 20 players) and it would have a bridge, weapons bays, a common room, maybe player bedrooms, and engineering room. All of which a player can freely navigate through.

C: A space station that players can move around through, as well as dock other ships to. This would be the biggest and probably could use interiors as they are in game.

How hard would it be to make an object that can move around freely and do what I need?

Thanks!

Rich

#1
11/13/2004 (3:52 am)
I dunno, how hard is it to write an interior or 3space renderer...? :)
#2
11/13/2004 (4:18 am)
Do you want people to be able to "walk" around inside your Milllenium Falcon while its flying?

This will require updates to the engine and was discussed in thread Topic: Moving around INSIDE vehicles?

There is some code there to mounting a DIF shape inside or to a DTS shape which might work if you just wanted the character to be mounted inside the vechile (such as a cockpit or galley.

Hope that helps.
#3
11/13/2004 (5:56 am)
You could do some camera tricks. like say have the DIF millenium Falcon somewhere in the level you cannot see it and when you enter a DTS version of the falcon you are teleported to the real DIF interior one via trigger. Then for the person to get in the cockpit you would need to make like a doorway or something so you can have that person teleport back to a dts version of it so you can put the camera in 3rd person to see the vehicle fly. I am sure there are some other creative way arounds and they may seem sloppy but it is easier then overhauling the engine. I too holpe in the future there is better support for DTS type collisions, but currently the collision mesh has to be very limited so DIF is the way to go if you are doing interiors.

I know that this is something you said you wanted to avoid but I just put it into detail for anyone else who may be in your same boat. :)
#4
11/13/2004 (6:49 am)
Some of has been playing SWG: Jump to light speed :D

I have to say the whole free moving space is a nice idea, but it could be hard task to achieve
#5
11/13/2004 (8:01 am)
Yeah....these are all ideas we discussed...but we don't want to use the diff object, or have the ship be linked to two things. I just want to work it so that the ship object is the ship as well. And no I haven't played Jump to lightspeed :P

I'm thinking a whole new collision class will have to be developed to handle ships/vehicles/transports of this nature. I'm still new to the Torque collission engine so I'm trying to learn a frame of reference of what we'd need to get this accomplished.
#6
11/13/2004 (8:30 am)
Start with the editor code. I can pick up any interior with my mouse, and zip it around the world quite quickly. A dts 'shell' could be added surrounding the dif, which would give you better access to the object as a whole, simplifying whatever vehicle code you needed to simulate.
Pretty much anything is possible with Torque, and is usually easier than folk like to make it out to be. It's just a matter of staring at the proper section of code until the solution hits you.
#7
11/13/2004 (9:25 am)
I take it that you're looking at a multiplayer game where other players will see the ship moving throuh space and therefore don't want to deal with objects the way they are currently set up. Loading an entire space station for a viewer seems to be an extreme amount of overhead to me. Maybe I'm misunderstanding what you're final objective is.
#8
11/13/2004 (10:53 am)
Basically it's going to be a small game where people can login to 'space' and be on any number of ships that we have. The ships have to be able to navigate through space, dock with each other /and/ let players move freely about inside as if they were terrain. So the system that is in place right now for objects most definitely wouldn't work, and I really don't want to work with moving interiors/linking interiors to objects....
#9
11/13/2004 (12:50 pm)
Why not track the ships and people separately? That way, people can login and get on their ship/station/etc (DIF object). The DTS's are tracked for docking purposes, etc. Make the full LOD of the DTS ship the same size as the DIF ship and then swap them out as you open the bay doors to allow people to move around between the two "interiors". The loading/unloading of DTS/DIF's would be the biggest asset management issue. And if you wanted the "movement through space" feel, then cheat by animating your skyboxes and checking your view distance to see if ships are within your view-space. Kind of like the way the train level was done in Soldier of Fortune. The train was stationary, but the skybox and ground textures were animated. From a dev position, it may seem like cheating, but from a player position you simply don't want to fall off the train because you think that you'll die.

Tracking the ship positions would be easy, swapping the DTS and DIF shapes will be more difficult.

Of course, you could start researching Melv's renderObject resource and completely code a complex modeling solution that is network ready and has LOD implemented.

I'm probably still way off-base with what you need, though.
#10
11/13/2004 (7:03 pm)
Would net traffic be an issue? I think it would as is with the engine, it would not only be tracking the position of the ship, but also the players movement at the same time through 3dspace.

However, doing as suggested above seems like a reasonable compromise, have them ouside seeing the ship, and when they board it, have them inside a dif, and mount them in the dts if they are flying it.

I have thought about the same kind of thing, but I think Matts idea seems to be reasonable.
#11
11/14/2004 (1:06 pm)
The biggest issue will be getting the client/server simulations to match up exactly so that people have a consistent experience, rather than getting lots of jittering and phantom collisions. It can be done efficiently, but it's hard. :)