Minutes for the FRD special meeting of Mars 12, 2005 wrote:
Code: Select all
* 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.
Moderator: Transport Empire Moderators
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.
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. )
- 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 (26.95 KiB) Viewed 14198 times
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.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.
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 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.
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).
- Google Image
- (580.45 KiB) Downloaded 239 times
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.
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 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.
 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.
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?
- If you want the .xcf, PM, I'm to lazy to rename/zip it for now.
- snappoints_large_diagonal_tracks.png (78.58 KiB) Viewed 14143 times
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...)
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.
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?
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.
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.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'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.
LOL, and that remark comes 24H after the death of Pinochet. Anyhow, I'm all for it too Zuu.XeryusTC wrote:I think that it could work, it gives the people some freedom, but not too much. Just like in the average dictatorship .
Why are we dividing tiles into smaller 'snappoints', instead of just using smaller tiles?
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."
Users browsing this forum: No registered users and 1 guest