Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Mon Dec 18, 2017 5:20 am

All times are UTC




Post new topic  Reply to topic  [ 59 posts ]  Go to page Previous 1 2 3 Next
Author Message
 Post subject:
PostPosted: Sat Mar 12, 2005 10:17 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Mon Jun 09, 2003 6:21 pm
Posts: 4532
Location: /home/sweden
Minutes for the FRD special meeting of Mars 12, 2005 wrote:
Code:
        * VOTE: freedom or cell-based?
              A) True freedom: track endpoints can be placed anywhere
              B) Cell based: a limited set of track pieces are available, which can be placed on the cells of the map.
              C) "In between", as freedom, but the endpoints snap to a grid that is smaller or equal to the grid of the map.

                RESULT: a: 0 b: 0 c: 5
               
        * A long discussion about where to snap points will be located followed.
        * But we couldn't came to a decision, so we decided to postpone the decision until the coding phase.

_________________
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)


Top
   
 Post subject:
PostPosted: Fri Nov 17, 2006 1:47 pm 
Offline
Director
Director
User avatar

Joined: Fri Nov 17, 2006 12:45 pm
Posts: 541
Location: Oxford, United Kingdom
From what I can see you're both saying the same thing?

If you have five snappoints they defines the road/railway by the borders of the area it uses.

The method with four snappoints to each edge defines the road/railway by points on its centreline. By that I mean the centreline of the path a vehicle using it would follow.

Both give the option for 4 parallel lanes/lines.

I think vehicle path centrelines would be easier to calculate.


Top
   
 Post subject:
PostPosted: Thu Dec 07, 2006 7:07 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Mon Jun 09, 2003 6:21 pm
Posts: 4532
Location: /home/sweden
Note: "tracks" is not limited to train tracks, but can be either a road lane or a train track.


There have gone a long time since this discussion. I now want to change some in my proposal so that it will not be that "ugly" as some of you have mentioned.

The change is that snap-points are placed in the center of the sub-cells, instead of the edges. This means that the pattern will look better. As you see in the attachment.

I still think that the center of a track should be fited to a snap-point. This is because a track can be simplified to a line without a width which simply start at point A and end at point B. 4 snap-points for a single line would just make things complicated I think. I still don't think Steves proposal will work well with tracks that don't follow the two base axises. Please prove me worng.


This proposal does not have a snap-point in the center of the tile to handle buildings that cover the whole tile. I don't think that should not be allowed, I just did not include buildings in the proposal. It might be a good idea to add a point in the center aimed buildings, but maybe it might be better to handle buildings seperatated from tracks.


EDIT: I guess most people are tired of this discussions, and I'm fine with Steves proposal in that case, though I would not like to implement it since I cant see haw how you'll handle tracks of any other angle than the angles along the base axis with that proposal. (As far as I'v understood it uses four snappoints, one for each corner of a rectangular track piece. )


Attachments:
File comment: I've tried to make the attachment as accesible to color blind by describeing things in the attachment with arrows and text. Please tell me if that is not a good idea.
buildpoints.png
buildpoints.png [ 26.95 KiB | Viewed 9711 times ]

_________________
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Top
   
 Post subject:
PostPosted: Thu Dec 07, 2006 7:14 pm 
Offline
Traffic Manager
Traffic Manager
User avatar

Joined: Fri May 26, 2006 3:54 pm
Posts: 221
Location: Perth, Australia
Sorry to be a pain but could you provide more pictures of what you are trying to illustrate. Including what the tracks may look like when they are built, etc.


Top
   
 Post subject:
PostPosted: Thu Dec 07, 2006 7:58 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Mon Jun 09, 2003 6:21 pm
Posts: 4532
Location: /home/sweden
aarona wrote:
Sorry to be a pain but could you provide more pictures of what you are trying to illustrate. Including what the tracks may look like when they are built, etc.

No, no.. it is not a problem. It is better you ask and understand than if we choose my proposal and end up in a situation where we don't know what it actually mean.

The actual example
I've drawn a track in grey-blue. I guess the picture speeks for itself, if not ask!

The corners of the track are brighter to show that they concist of two pices than are joined togeather.

The zip-file
The Zip-file contains "snappoints_lange.xcf" and "snappoints_large_tracks.xcf". The first one is a base for future examples and the seccond is the source for the attached png-image.


Attachments:
snappoints_large_tracks.png [114.59 KiB]
Downloaded 258 times
snappoints_large.zip [100.67 KiB]
Downloaded 306 times

_________________
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Top
   
 Post subject:
PostPosted: Thu Dec 07, 2006 9:13 pm 
Offline
Traffic Manager
Traffic Manager
User avatar

Joined: Fri May 26, 2006 3:54 pm
Posts: 221
Location: Perth, Australia
I don't really have any problems with that.

I've modified an image from Google Maps, creating a grid with 32m spacings and comparing them to dual carriage ways (yellow, and with bus stop for good measure) and the train line (blue) and some local features (bridges, highway + freight rail line running perpendicular).


Attachments:
File comment: Google Image
google.png [580.45 KiB]
Downloaded 239 times
Top
   
 Post subject:
PostPosted: Fri Dec 08, 2006 9:04 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Mon Jun 09, 2003 6:21 pm
Posts: 4532
Location: /home/sweden
Is there any objections against my proposal or anything that is unclear?

It is not that I want to force it on you, but I think it is important to reach a decission soon so we can move on. Which proposal is not important. However as there are things that is unclear with Steves proposal I think those have to be cleared out before that proposal is elected.

I think the proposal should tell how the snappoints are layed out on the grid, but also what parts of the tracks that are snaped to the snap-points on the grid. At least to me it is still unclear how Steves proposal handle this.


Again, the importance is not who made the proposal but that we reach a clear decsision that hopfully is a good decission for the game too.

_________________
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)


Top
   
 Post subject:
PostPosted: Fri Dec 08, 2006 9:42 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Mon Jun 09, 2003 6:21 pm
Posts: 4532
Location: /home/sweden
I appologize for dubble post, but I would like to answer parts of my own questions in my previous post which I find much more readable to do in a seperate post. I hope that is okay. PM me if not.

---

I realized that I had not fully clarify how diagonal tracks (where 45 degres is seen as a special case of diagonal tracks) would be threated.

The idea I have is that tracks got a certain width, for paralell tracks going in the dirrection of 0, 90, 180 and 270 degrees[1] tracks can be placed next to each other without some spacing between. This should not be because of a hack, but because the width is choosen so that this is possible. When choosing another dirrection/angle than 0, 90, 180 or 270 degrees the engine will just check that the tracks don't collide. This is illustrated in the attachment.

I understand that the concept of track width is a bit off-topic though I find it important for an answer of how so called diagonal tracks will be handeled.


[1] Degrees are on the unit circle mesured from the possitive x-axis. Asuming y is pointing upwards so that 90 degrees is pointing forward along the positive y-axis.

aarona:
Your google-map looks good. By simple messurement with a pen on the screen it seams that the highway/motorway of a total of four lanes takes one tile and the two rail tracks takes a half tile width and that four rail tracks including spacing would fit on one tile.

I guess that was what you wanted to show?


Attachments:
File comment: If you want the .xcf, PM, I'm to lazy to rename/zip it for now.
snappoints_large_diagonal_tracks.png
snappoints_large_diagonal_tracks.png [ 78.58 KiB | Viewed 9657 times ]

_________________
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Top
   
 Post subject:
PostPosted: Sat Dec 09, 2006 3:15 am 
Offline
Traffic Manager
Traffic Manager
User avatar

Joined: Fri May 26, 2006 3:54 pm
Posts: 221
Location: Perth, Australia
I can see the application of this to roads because they can have sharp turns however trains aren't as forgiving and if we go with a Bezier curve then the collision between tracks becomes a bit more tricky.

I propose a "Build Mask" where each sub-tile contains 1's and 0's in a 16-bit unsigned integer per tile. If there is something there, then the sub-tile gets a 1 and if there is nothing there then it gets a zero. It's exactly 2 bytes in length because by your diagram there are 16 sub-tiles.

Obviously there might be trouble with double tracks or "freeway" like roads so then we might have an option to build double tracks (a la RRT but not so crappy).

Can you see another solution which enables curves, which won't be so easy to calculate as now we have to solve two parametric curves with widths (I dunno, perhaps its a trivial task...)


Top
   
 Post subject:
PostPosted: Sat Dec 09, 2006 8:52 am 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Mon Jun 09, 2003 6:21 pm
Posts: 4532
Location: /home/sweden
With curves with fixed radius I think calculations will be simplificated A LOT since you will be able to use sin, cos, tan. Though I should add that I don't know how you would implement Beizer curves.

But we should keep in mind that this calculation is something that at max would be done once per cycle. But only in build track mode and when the pointing device have been moved. So therefore we have more cycles available than you have for a single train which you might have hundreds of. (Yes it might bee that all trains eat all available CPU and we got nothnig left for building.)

One way that pops into my mind is if for benzier it is possible to step along the curve going ~1/10 tile / step. At each step we need to know the 3d coordinate and the normal and tangent. Then we could make calculate the line going from the left side of the track to the right side. With some more linear algebra calculate the outer points of the tracks so that the distance between these two are the width and that they are the same distance from center.

The outer points are checked against the subcells and set the bit mask for the subcell they happen to be in.

Now we are in 3D-space so we also need to move up along the normal and mark the heigth, exactly how depending on how the mapstructure is made.


Perhaps this can be optimized A LOT, both in the way it is done and also by selecting a good step-length. A such optiziton might be to use a larger step-size and ceck the flag for whole tiles and only go into deitail when there are other objects close.

_________________
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)


Top
   
 Post subject:
PostPosted: Sat Dec 09, 2006 9:22 am 
Offline
TTDPatch Developer
TTDPatch Developer
User avatar

Joined: Fri Mar 07, 2003 1:10 pm
Posts: 3602
Location: Germany
I am just curious and have some questions:


How will trains/road vehicles handle these bezier constructs?

I remember to read that a curves get smoothed, but say I have a train running (like TTD) and start to change a junction with a connection to the next bezier part with a train on it. The smoothing algorithm will change the style of my rail part (the one with the train) and then it derails my train :?:

About Trainz, if I remember well only in the editor you can change rails and don't have trains running at this time. Thats a huge difference comparing you have actually vehicles that use the structures you are editing.

Graphical, how will these kind of rails look like?


Top
   
 Post subject:
PostPosted: Sat Dec 09, 2006 11:07 am 
Offline
Traffic Manager
Traffic Manager
User avatar

Joined: Fri May 26, 2006 3:54 pm
Posts: 221
Location: Perth, Australia
eis_os: Obviously tracks cannot be changed once they are built! They have to be demolished first, or extended from the previous end point.


Top
   
 Post subject:
PostPosted: Sat Dec 09, 2006 5:30 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Mon Jun 09, 2003 6:21 pm
Posts: 4532
Location: /home/sweden
We will have a planing mode which will operate on a copy of s the map. Perhaps the user selects which area to work on so that only that part of the map is dublicated.

Inside of planing mode I guess existing curves can be modified and when you apply the plan the game blocks the entrances and wait untill the area is cleared and then reconstruct the rail. I can see many isusses with this that have to bee solved such as dead locks that means that the area never gets cleared. But some sunch thing need to be done as there will be a planing mode that build things when you're done planing.

But lets try to keep somewhat on topic.

_________________
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)


Top
   
 Post subject:
PostPosted: Sun Dec 10, 2006 11:12 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Mon May 02, 2005 11:05 am
Posts: 15415
Skype: XeryusTC
Location: localhost
aarona wrote:
eis_os: Obviously tracks cannot be changed once they are built! They have to be demolished first, or extended from the previous end point.

I don't agree with that, being able to drag control points is very usefull when you want to make quick addaptions to your tracks, imagine that you want to move a control point by one tile... Ofcourse it should only be possible when in build mode.

_________________
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


Top
   
 Post subject:
PostPosted: Sun Dec 10, 2006 11:23 am 
Offline
Traffic Manager
Traffic Manager
User avatar

Joined: Fri May 26, 2006 3:54 pm
Posts: 221
Location: Perth, Australia
XeryusTC wrote:
Ofcourse it should only be possible when in build mode.
That's what I was saying. Or at least...trying to.


Top
   
 Post subject:
PostPosted: Sun Dec 10, 2006 1:55 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Mon Jun 09, 2003 6:21 pm
Posts: 4532
Location: /home/sweden
I have not recived any objections against the 4x4 grid of snappoints, all located in the center of their sub-cell, that I proposed. I have not recived any votes for either of the two proposals. I take the absense of objections/votes an okay. Unless there come verry soon I say that the final dicission is to go with the 4x4 grid of snap-points that I proposed. (I hope I don't clamp on anyone, just want to get a decission fast so we can move on.)

I'll ask Hyronymus to unlock the other thread about map coordinates. Perhaps we way create a new thread about build mode or so if there are things that is unclear and need to get decided.

_________________
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)


Top
   
 Post subject:
PostPosted: Sun Dec 10, 2006 2:05 pm 
Offline
Traffic Manager
Traffic Manager
User avatar

Joined: Fri May 26, 2006 3:54 pm
Posts: 221
Location: Perth, Australia
I'm for it.


Top
   
 Post subject:
PostPosted: Mon Dec 11, 2006 10:01 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Mon May 02, 2005 11:05 am
Posts: 15415
Skype: XeryusTC
Location: localhost
I think that it could work, it gives the people some freedom, but not too much. Just like in the average dictatorship :twisted:.

_________________
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


Top
   
 Post subject:
PostPosted: Mon Dec 11, 2006 10:11 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Tue Dec 03, 2002 10:36 am
Posts: 13161
Location: The Netherlands
XeryusTC wrote:
I think that it could work, it gives the people some freedom, but not too much. Just like in the average dictatorship :twisted:.

LOL, and that remark comes 24H after the death of Pinochet. Anyhow, I'm all for it too Zuu.

_________________
Image
Dutch Trainset for OpenTTD | Dutch Trainset Topic | Combined Roadset v0.10


Top
   
 Post subject:
PostPosted: Mon Dec 11, 2006 4:29 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Tue Mar 30, 2004 12:30 pm
Posts: 16663
Location: Almere, The Netherlands
This is probably a stupid question, and I probably missed something, but I'm gonna ask it anyways 'cause I don't get it;

Why are we dividing tiles into smaller 'snappoints', instead of just using smaller tiles?

_________________
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."


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 59 posts ]  Go to page Previous 1 2 3 Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000-2017 phpBB Limited

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2017.
Hosted by Zernebok Hosting.