"... one way roads can't have junctions."

Got an idea for OpenTTD? Post it here!

Moderator: OpenTTD Developers

Post Reply
Eddi
Tycoon
Tycoon
Posts: 8271
Joined: 17 Jan 2007 00:14

Re: "... one way roads can't have junctions."

Post by Eddi »

not enough map bits to store the one-way-status of each road bit individually.
User avatar
adf88
Chief Executive
Chief Executive
Posts: 644
Joined: 14 Jan 2008 15:51
Location: PL

Re: "... one way roads can't have junctions."

Post by adf88 »

What about the m4 ? It seems to be free.
:] don't worry, be happy and checkout my patches
Eddi
Tycoon
Tycoon
Posts: 8271
Joined: 17 Jan 2007 00:14

Re: "... one way roads can't have junctions."

Post by Eddi »

that is reserved to store the roadtype-IDs (similar to railtypes), but implementation of that has been stalled by a serious case of reallife.
User avatar
adf88
Chief Executive
Chief Executive
Posts: 644
Joined: 14 Jan 2008 15:51
Location: PL

Re: "... one way roads can't have junctions."

Post by adf88 »

The doc says that some other bits are free. Maybe at least one of them can be used? Three bits (we have two already) is a lot of junctions. Four bits can cover possibly all usable junctions.

I'm sure it was discussed previously. Does anyone have a link to the conversation? I can't find it.
:] don't worry, be happy and checkout my patches
Rubidium
OpenTTD Developer
OpenTTD Developer
Posts: 3815
Joined: 09 Feb 2006 19:15

Re: "... one way roads can't have junctions."

Post by Rubidium »

Conceptually a junction, for it to make sense, has at least two directions in which a vehicle travels. As such it is not a pure one-way road, which is what this error is about. There is furthermore not enough space to properly display the direction of the roads at the junction, and even if it did have enough space it would require extra sprites. On top of that, a junction would have three or four one way exits/entrances meaning you need 8 bits (4*2) and having 4 one way signs on a single junction might be a bit too much.

Likewise a one-way road can be seen as a signal that is always green and can only be passed from one side. For rails you can't have signals on junctions, so why would we add them to roads? Which immediately results in the question whether "signals" should be at the edge of tiles instead of the middle of tiles, but that requires massive changes in the game engine that are probably not worth the effort.
User avatar
adf88
Chief Executive
Chief Executive
Posts: 644
Joined: 14 Jan 2008 15:51
Location: PL

Re: "... one way roads can't have junctions."

Post by adf88 »

I don't think the problem with sprites is big, quick example:
one_way_junction.png
one_way_junction.png (27.17 KiB) Viewed 1655 times
I was thinking of something like a predefined set of junctions and letting to peek them similarly to stations. There is no need for 0-way (closed) entrances/exits. There is no need for "all-in" or "all-out" junctions. Not all possible combinations have to be available. 4 bits is enough for 16 X-junctions and 64 T-junctions. That's a lot. I know this solutions is somehow incomplete but having no one-way junctions at all is more irritating then not having just some of them.

I realise that there are other problems and some work to do, but the sprites and the bits are not so hard to resolve.

// EDIT
Ah, one more, the comparison to signals. An empty track can be seen as a track with green signals in each way. Road not. An empty road junction does not allow to travel in each way like a rail junction. So the problem does not exist in case of rails, but it exist in case of roads.
:] don't worry, be happy and checkout my patches
maquinista
Tycoon
Tycoon
Posts: 1828
Joined: 10 Jul 2006 00:43
Location: Spain

Re: "... one way roads can't have junctions."

Post by maquinista »

I miss "One way curves", they could help to protect my motorways from AI attacks.
Sorry if my english is too poor, I want learn it, but it isn't too easy.[/list][/size]
Post Reply

Return to “OpenTTD Suggestions”

Who is online

Users browsing this forum: No registered users and 15 guests