You mean using splines, like Trainz/TRS?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.
Bridge types & station designs
Moderator: Transport Empire Moderators
Contributor to the The 2cc Set and Dutch Trainset. Inventor of the Metro concept. Retired Graphics Artist.
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."
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."
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)
OpenTTD: manual #openttdcoop: blog | wiki | public server | NewGRF pack | DevZone
OpenTTD: manual #openttdcoop: blog | wiki | public server | NewGRF pack | DevZone
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.
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.
XeryusTC's explanation wasn't perhaps the best.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..
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>
Thats the way I had it in mind.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.
This is a raster solution.
XeryusTC's solution is vector based.
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
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)
OpenTTD: manual #openttdcoop: blog | wiki | public server | NewGRF pack | DevZone
OpenTTD: manual #openttdcoop: blog | wiki | public server | NewGRF pack | DevZone
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.
http://tt-forums.net/viewtopic.php?p=233497#233497
Locked until the DD discussion arrives at this issue.
Who is online
Users browsing this forum: No registered users and 4 guests