HowTo/Build a drivable car

From TrainzOnline
< HowTo
Revision as of 17:24, 19 October 2011 by Windwalkr (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This HowTo guide explores some of the new functionality being introduced in TS12. The art and scripts used here are deliberately simple examples rather than a complex real-world example, so that we can show off the new technology in an easy-to-understand manner.


Contents

Concepts

The following concepts are demonstrated:

  • Creating a non-train scenery object with an interior.
  • Using a KIND Controlset asset with an interior script.
  • Using attachment meshes.
  • Moving map objects from script code.


Caveats

There are a few gotchas that developers should be aware of with these techniques:

  • Trainz is first and foremost a Train Simulator. While we like to allow creative individuals to have a fairly free rein with the capabilities of the game engine, we sometimes have to take a step back and make sure that developers aren't sacrificing important parts of the game (Train Simulation, performance, stability) in their effort to achieve specific goals (flexibility, advanced features.) We have not fully evaluated the scope of this technology at the current time and it's important to note that if we find the flexibility of this system leading to compromised performance then we will step in and add deliberate limitations to restore the status quo. Feel free to play, but don't go overboard.
  • There are a lot of features that should or could be added to improve on this example. We're sure that the community will be able to improve on this simple example and we'd love to see the directions that this technology is taken. We'll likely add new functionality in the future as well, but we're taking things one step at a time.


The Interior

Name: "TestCarInterior"
KUID: <kuid:523:1972943>
Desc: This asset is a simple interior mesh for our car. We don't provide any interactive controls at the current time, although you could add these in the regular fashion.

TBD: Breakdown of config file. TBD: Breakdown of script file.


The Car Scenery Object

Name: "TestCar"
KUID: <kuid:523:1972941>
Desc: This asset is a simple exterior mesh for our car. You can place this object into a route using Surveyor, and the user can take over control of this object in Driver. This asset uses the "TestCarInterior" interior, and has four wheel attachments which each use the "TestCarWheel" mesh.

TBD: Breakdown of config file.


The Car Wheel Mesh

Name: "TestCarWheel"
KUID: <kuid:523:1972942>
Desc: A simple wheel mesh. We split these off the body of the car, so that they can be rotated or even bounced up and down independently of the car body.


Creating a Route and Session

TBD: How to put these into the route and session.


Downloads

Personal tools