Page 1 of 1

[0.8.8] Close Diagonal Trains collide

Posted: Mon Jan 27, 2014 6:23 pm
by Balthazar
Trains setup like this:
1
Collide when running like this:
2
If this is intentional the game doesn't explain this to you in any way; it LOOKS like this is perfectly valid, you can place tracks as if it was valid, and signals wont bother each other even though it results in a collission.
Additionally you can place vertical and horizontal tracks right next to each other and it works just fine.
Something's wrong with this

Re: [0.8.8] Close Diagonal Trains collide

Posted: Mon Jan 27, 2014 6:42 pm
by kovarex
Shame on us, because it is wrong indeed and we didn't test this scenario.
We will try to do something with that (probably just tighten the collision box of train).

Re: [0.8.8] Close Diagonal Trains collide

Posted: Mon Jan 27, 2014 7:53 pm
by BurnHard
Hmm yes, the real underlying problem is that the diagonal rail should have an offset of one tile (2 tiles wide railway).

Attached picture shows that you can build the diagonal rails only with more space or less space than the horizontal or vertical rail. ...but not with the same distance.

Re: [0.8.8] Close Diagonal Trains collide

Posted: Mon Jan 27, 2014 8:00 pm
by BurnHard
i may have found a solution:

(EDIT: Solution 2 is better :D (Solution 1: Let us optionally build the straight only one tile long instead of 2. so we can get the needed space (the middle lane curve then starts one tile upwards and lies exactely between the other two. (I hope you understand what i mean).))

Solution 2: Let us place the rails as they are now with precision of one tile, not two. So I can overlay two 2-tile long tracks to one 3-tile long and align the curve and diagonal trail and solve this problem that way.

Second edit: Make the straight railtrack only one tile long /and 2 wide). As now it is not consistent, because the diagonal track needs at the moment more material (segments) per distance

Re: [0.8.8] Close Diagonal Trains collide

Posted: Tue Jan 28, 2014 12:48 am
by ssilk
I'm not sure, but if I would be a developer, my aim would be to have an automated rail-laying function. Click-drag, 200 tiles laid. Ready. The need for different tracks would be removed. Only one type of track is needed.

Re: [0.8.8] Close Diagonal Trains collide

Posted: Tue Jan 28, 2014 9:08 am
by kovarex
If you were a developer, you would have 1000 different things on your todo list :) and yes this is planned.

Re: [0.8.8] Close Diagonal Trains collide

Posted: Tue Jan 28, 2014 1:15 pm
by ssilk
Uhm, sorry Kovarex, it wasn't meant as offencement against development, was more thought into direction of BurnHard, to explain, that I was (and now be :) ) sure, that the current rails are not the targeted version and that there is no sense in thinking about length or different costs of tracks, now.

Re: [0.8.8] Close Diagonal Trains collide

Posted: Fri Jan 31, 2014 2:02 pm
by JackGruff
kovarex wrote:Shame on us, because it is wrong indeed and we didn't test this scenario.
We will try to do something with that (probably just tighten the collision box of train).
Will it fix this?

Image

Re: [0.8.8] Close Diagonal Trains collide

Posted: Wed Feb 05, 2014 2:19 pm
by kovarex
So I fixed that by making the collision box just slightly smaller.
Here is the testing scenario I used :)

Re: [0.8.8] Close Diagonal Trains collide

Posted: Wed Feb 05, 2014 2:25 pm
by BurnHard
Did you notice the clipping errors?

Re: [0.8.8] Close Diagonal Trains collide

Posted: Wed Feb 05, 2014 2:56 pm
by kovarex
I'm aware of the problem and it is not the simpliest one, as you can see I have been thinking about it long time ago already:
http://stackoverflow.com/questions/1112 ... ed-objects

Re: [0.8.8] Close Diagonal Trains collide

Posted: Wed Feb 05, 2014 3:08 pm
by BurnHard
Well don't waste your time with it now, there are more important things to do till release :)

Re: [0.8.8] Close Diagonal Trains collide

Posted: Wed Feb 05, 2014 3:58 pm
by FrozenOne
What if you treated long rotating objects not only as centers, but as a line (along their longest axis), whose equation you get from centroid and orientation?
Then calculating if other points (centroids) are below or above that line is simple geometrical problem and you get the right solution unless the object bases cross each other or surround themselves.

Re: [0.8.8] Close Diagonal Trains collide

Posted: Wed Feb 05, 2014 4:12 pm
by kovarex
BurnHard wrote:Well don't waste your time with it now, there are more important things to do till release :)
Don't worry, I know the priorities :)

Re: [0.8.8] Close Diagonal Trains collide

Posted: Wed Feb 05, 2014 5:59 pm
by FrozenOne
Any comment on my suggestion?
(You know, I'm so bored of learning for my tomorrow exam from computer graphics, so I'm seeking every distraction I can get :D )

Re: [0.8.8] Close Diagonal Trains collide

Posted: Wed Feb 05, 2014 6:06 pm
by kovarex
FrozenOne wrote:What if you treated long rotating objects not only as centers, but as a line (along their longest axis), whose equation you get from centroid and orientation?
Then calculating if other points (centroids) are below or above that line is simple geometrical problem and you get the right solution unless the object bases cross each other or surround themselves.
This solution is theoretically correct but.
a) There are more lines than one
b) There are up to tens of thousands of object at the same time and there is very little time to make the order.