Bridge types & station designs

Development discussion about Transport Empire. Other discussion to General forum please.

Moderator: Transport Empire Moderators

User avatar
Purno
Tycoon
Tycoon
Posts: 16659
Joined: 30 Mar 2004 12:30
Location: Almere, The Netherlands

Post by Purno »

Steve wrote:I'm not sure if it's agreed upon, but I always imagine that route building system someone prototyped a while ago, where you can enter a couple of points and let the game draw the curve in for you (or maybe it didn't do that, can't quite remember). Curvy bridges are then just built around that track.
You mean using splines, like Trainz/TRS?
Contributor to the The 2cc Set and Dutch Trainset. Inventor of the Metro concept. Retired Graphics Artist.
Image Image
Download TT | Latest TTDPatch | OpenTTD | OpenTTDCoop | BaNaNaS: OpenTTD content system | 2048² OTTD scenario of the Netherlands
GRF Codec | GRF Crawler | GRF Maker | Usefull graphics & tools sites | NML Documentation Wiki | NFO Documentation Wiki
All my graphics are licensed under GPL. "Always remember you're unique, just like everyone else."
User avatar
XeryusTC
Tycoon
Tycoon
Posts: 15415
Joined: 02 May 2005 11:05
Skype: XeryusTC
Location: localhost

Post by XeryusTC »

Take a look here, a spline is basicly a line that follows the best route between a set of points.
Don't panic - My YouTube channel - Follow me on twitter (@XeryusTC) - Play Tribes: Ascend - Tired of Dropbox? Try SpiderOak (use this link and we both get 1GB extra space)
Image
OpenTTD: manual #openttdcoop: blog | wiki | public server | NewGRF pack | DevZone
Image Image Image Image Image Image Image
User avatar
Steve
Tycoon
Tycoon
Posts: 2085
Joined: 10 Jan 2004 20:19
Location: London
Contact:

Post by Steve »

I'm not sure exactly what the maths behind it would be, but after setting the points it would make a curve that kinda went around obstacles. That seems like too much work now that I think of it though.. Probably best to make a normal curve and let the user alter it to avoid stuff and reduce cost.
Either way I imagine the track is stored as lots of individual pieces, rather than the 2 pieces (plus anchors for the spline) and working it out every time.
Last edited by Steve on 20 Jun 2006 14:15, edited 1 time in total.
User avatar
aarona
Traffic Manager
Traffic Manager
Posts: 221
Joined: 26 May 2006 15:54
Location: Perth, Australia
Contact:

Post by aarona »

Steve wrote:I'm not sure exactly what the maths behind it would be, but after setting the points it would make a curve that kinda went around obstacles. That seems like too much work now that I think of it though..
XeryusTC's explanation wasn't perhaps the best.

Now let me completly confuse you guys...
Lets say you want to make the track go around the corner, then you chose two points (which are only a tile or so away).

If the track were to intersect an object, then we would reject the planners planned track (Error: Object in the way).

<maths>
The curve is simply the one which is C1-continuous (C0 and C1, that is, position and tangential component) and which satisfies the condition that a vehicle would take the least amount of time to pass over this track (cornering speed-restrictions in place, ie to prevent 90 turns).
It turns out there is a solution to this problem, albiet perhaps non-trivial (in the sense that it would be computationally expensive) with hills!

For those playing along at home: For two perpendicular lines the optimal connection solution is a cycloid.
</maths>
Steve wrote:Probably best to make a normal curve and let the user alter it to avoid stuff and reduce cost.
Either way I imagine the track is stored as lots of individual pieces, rather than the 2 pieces (plus anchors for the spline) and it works it every time.
Thats the way I had it in mind.
This is a raster solution.
XeryusTC's solution is vector based.
User avatar
XeryusTC
Tycoon
Tycoon
Posts: 15415
Joined: 02 May 2005 11:05
Skype: XeryusTC
Location: localhost

Post by XeryusTC »

It will probably be best to go for the Theme Park World solution: you place a few dots (or pylons), the game makes a cubic spline through it and the user can alter the heights of the pylons and their rotation. This makes a very powerfull but easy to learn system to make bridges.

Note: maybe we shouldn't use the dots as places for pylons as bridges do have different intervals.
Note2: a cubic spline is a curve that goes through every point in a way as smooth as possible http://www-math.bgsu.edu/~zirbel/la/spline_data.gif
Don't panic - My YouTube channel - Follow me on twitter (@XeryusTC) - Play Tribes: Ascend - Tired of Dropbox? Try SpiderOak (use this link and we both get 1GB extra space)
Image
OpenTTD: manual #openttdcoop: blog | wiki | public server | NewGRF pack | DevZone
Image Image Image Image Image Image Image
User avatar
Steve
Tycoon
Tycoon
Posts: 2085
Joined: 10 Jan 2004 20:19
Location: London
Contact:

Post by Steve »

This post gives an in-depth explanation of the system I imagine, with the entire thread being quite interesting.

http://tt-forums.net/viewtopic.php?p=233497#233497

Locked until the DD discussion arrives at this issue.
Post Reply

Return to “Transport Empire Development”

Who is online

Users browsing this forum: No registered users and 19 guests