Page 5 of 7

Re: Streets & Road Vehicles

Posted: 01 Apr 2014 16:22
by lukasz1985
The thing is that you can't beat the math. You either have to get wasted space or make unrealistic appearing of roads.
That's simple square math: 1, 1.41 and halves of this values are not natural. The only good compromise I've found is the way SC4 does it.

Re: Streets & Road Vehicles

Posted: 01 Apr 2014 17:01
by smallfly
Changing the graphics...
diag_concept.png
diag_concept.png (128.82 KiB) Viewed 23900 times
... so that diagonal lanes have a width of 1.06 and horizontal lanes a width of 1.00 ...

... and creating the modules with the in-game-module-editor leads to this in-game view:
diag_concept_in_game.png
diag_concept_in_game.png (172.88 KiB) Viewed 23900 times
As Loco has correctly stated, code changes were not necessary.

But since I dont want the cars to not-use the center line of the road I will adjust their positions. This needs some recoding, but the diagonal logistics nodes are only used for diagonal roads and tracks. Thus its totally acceptable to adjust their intra-tile-positions.

One problem left are diagonal single-lane roads - as well as single-lane tracks. They will have a small gap before other diagonal roads/tracks/etc. follow.
diag_single_lane.png
diag_single_lane.png (17.8 KiB) Viewed 23900 times

Re: Streets & Road Vehicles

Posted: 01 Apr 2014 19:15
by LocoMH
lukasz1985 wrote:The thing is that you can't beat the math. You either have to get wasted space or make unrealistic appearing of roads.
That's simple square math: 1, 1.41 and halves of this values are not natural. The only good compromise I've found is the way SC4 does it.
That is almost true. With this new method, though, one reaches a road width of 1.5/2*sqrt(2) which equals as smallfly pointed out roughly 1.06. Seems close enough, doesn't it?

@smallfly: how are the nodes placed, anyways? Maybe by allowing a pixel fine placing, you can avoid those last problems. And maybe you could code "internodes", meaning the path will run through these nodes, yet they don't define the end of the path.

Re: Streets & Road Vehicles

Posted: 01 Apr 2014 19:50
by smallfly
LocoMH wrote:@smallfly: how are the nodes placed, anyways?
https://www.youtube.com/watch?v=_lSru4foyMo

But the "normal" player wont create own modules. The module editor is meant for fast module creation for people who want to build exceptional/missing modules.

Re: Streets & Road Vehicles

Posted: 01 Apr 2014 20:05
by LocoMH
Nice! Good to see another video, thanks. I see the procedure now and realize the problem involved here. I'm sure, you'll work it out, though ;)

Re: Streets & Road Vehicles

Posted: 02 Apr 2014 01:47
by glenjimen
This is so awesome!!
I'm glad at least one of my ideas helped you design better looking 45 degree roads!

That module creator in the video looks fantastic, I can't wait to give it a try myself.

You rock smallfly :bow:

Re: Streets & Road Vehicles

Posted: 02 Apr 2014 04:13
by rsdworker
looks nice - so maybe you couold show some more like how to add lanes and such?

Re: Streets & Road Vehicles

Posted: 02 Apr 2014 08:32
by lukasz1985
LocoMH wrote:
lukasz1985 wrote:The thing is that you can't beat the math. You either have to get wasted space or make unrealistic appearing of roads.
That's simple square math: 1, 1.41 and halves of this values are not natural. The only good compromise I've found is the way SC4 does it.
That is almost true. With this new method, though, one reaches a road width of 1.5/2*sqrt(2) which equals as smallfly pointed out roughly 1.06. Seems close enough, doesn't it?

@smallfly: how are the nodes placed, anyways? Maybe by allowing a pixel fine placing, you can avoid those last problems. And maybe you could code "internodes", meaning the path will run through these nodes, yet they don't define the end of the path.
No, it's always true, because in the end if you still going to place another pierce of road next to the other - you will get into the issue again.

Re: Streets & Road Vehicles

Posted: 02 Apr 2014 09:26
by LocoMH
I don't get your point. The only time one wastes just a little bit of space is when using an odd number of lanes diagonally. Otherwise no waste, just a road width that is slightly higher than the one going horizontally/vertically.

Re: Streets & Road Vehicles

Posted: 02 Apr 2014 09:46
by lukasz1985
Do yourself a favor and try to place a single lane in a diagonal angle.
Then try to place annother one.
Then repeat this 10 times.

Even if you write an algorithm that alignes each lane - then you end with something that you didn't actually wanted.

Even writing such an algorithm is probably a lot of pain (even if only possible for an average experienced programmer) and possible not worth it at all.

Re: Streets & Road Vehicles

Posted: 02 Apr 2014 09:56
by LocoMH
And that's why for an even number of lanes, the 1.5/2*sqrt(2) are the lane widths. Thus two lanes together use exactly 1.5 diagonal pieces. Just as pictured on this and the last page. So really, your problems mentioned are not there - at least not the amount you're talking about.

Re: Streets & Road Vehicles

Posted: 02 Apr 2014 10:32
by lukasz1985
And there is this problem still left:

Image

Re: Streets & Road Vehicles

Posted: 02 Apr 2014 10:37
by LocoMH
You were the one saying that a four lane road is its own module compared to two two lane road modules. So this is no problem, following your argumentation. Also, this is just graphical, nothing involving coding.

Re: Streets & Road Vehicles

Posted: 02 Apr 2014 11:03
by lukasz1985
So now make 5 lane roads and hopefully you will get the idea what I'm talking about.

These modules are not intended to be lied in parallel so it's irrelevant if you miss the space.

Because every module is supposed to have it's own space, and like in reality - there is no point to lie down two parallel highways, instead - rebuild the existing by adding another n rows to it, but that is a completely different module

Re: Streets & Road Vehicles

Posted: 02 Apr 2014 11:12
by smallfly
lukasz1985 wrote:And there is this problem still left:
May I support you with a corresponding in-game screenshot.
two_curves_same_radius.png
two_curves_same_radius.png (113.38 KiB) Viewed 23815 times
And yeah. There is space. But thats absolutely realistic. Two curves with same radius always have a gap. And I think it looks quite nice, dont you?

And to be honest, the shown curve cannot be placed like that at the moment. How close a module can be built to another one is defined by the blocked areas (red) and the unblocked areas (green) of a module. Since there are only very simple unblockers available you cannot unblock a curved module pixel by pixel.
blocked_areas.png
blocked_areas.png (12.77 KiB) Viewed 23815 times

Re: Streets & Road Vehicles

Posted: 02 Apr 2014 11:19
by smallfly
lukasz1985 wrote:So now make 5 lane roads and hopefully you will get the idea what I'm talking about.

These modules are not intended to be lied in parallel so it's irrelevant if you miss the space.
odd_number_of_lanes.png
odd_number_of_lanes.png (120.75 KiB) Viewed 23815 times
The reason why its red (saying: cannot be build here) are the unblockers. Compare the red and green areas in module editor on this screenshot.

Re: Streets & Road Vehicles

Posted: 02 Apr 2014 11:48
by rsdworker
ah that's sense - so that's good to know

Re: Streets & Road Vehicles

Posted: 02 Apr 2014 12:14
by LocoMH
That's why there should only be modules with an even number of lanes! If you want an odd number, just build 2 lanes + 1 lane. It will have a gap, but it's the easiest and most useful solution, in my opinion.

Re: Streets & Road Vehicles

Posted: 02 Apr 2014 12:18
by smallfly
LocoMH wrote:That's why there should only be modules with an even number of lanes! If you want an odd number, just build 2 lanes + 1 lane. It will have a gap, but it's the easiest and most useful solution, in my opinion.
See the 3-lanes modules above? It consists of a 2-lane and a 1-lane module. So there doesnt have to be gap in every case. After implementing the new diagonal nodes needed for centering the diagonal paths I will upload a video showing all corresponding aspects of our discussion.

Re: Streets & Road Vehicles

Posted: 02 Apr 2014 13:10
by LocoMH
Alright, sounds good. I get the point - however, if you rotate those modules by 180 degrees, they're different. That could be a downside.