Patch: Town road layout

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Post Reply
User avatar
skidd13
OpenTTD Developer
OpenTTD Developer
Posts: 522
Joined: 03 Mar 2005 10:49
Location: Germany

Patch: Town road layout

Post by skidd13 »

There are a few diffrent town build road styles (and patches for them).
I think it's not really nice to use only one of them, so I mixed them and created an option to select the current style. Now I got so far, that I added real grid layouts.

You can switch between the layout during gaming!
  • Options:
  • build no more roads
  • original (min. 1 tile distance between roads)
  • better roads (min. 2 tile distance between roads)
  • 2X2 grid
  • 3X3 grid
[UPDATE]
...
- r9671 dev requested changes
- r9676 coding style
- r9769 coding style
- r9779 got into trunk

Use the nightly's (r9779 afterwards) for this feature.


Download (deprecated)
Linux binary
Windows binary Thanks to Desolator
Source patch
Attachments
option preview
option preview
screenshot #1.png (18.39 KiB) Viewed 16997 times
East: default<br />North: 2x2 grid<br />West: 3x3 grid<br />South: better roads<br />Center: No more roads
East: default
North: 2x2 grid
West: 3x3 grid
South: better roads
Center: No more roads
screenshot.png (33.75 KiB) Viewed 16992 times
test.diff
better_roads_r9676
(20.58 KiB) Downloaded 608 times
Last edited by skidd13 on 04 May 2007 16:33, edited 29 times in total.
What does that mean - the circumstances? I determine what circumstances prevail. -- Napoleon Bonaparte
---
If we cannot end now our differences, at least we can help make the world safe for diversity. -- John F. Kennedy
---
Our problems are man-made, therefore they may be solved by man. No problem of human destiny is beyond human beings. -- John F. Kennedy
User avatar
Wolf01
Tycoon
Tycoon
Posts: 2016
Joined: 24 Apr 2004 10:43
Location: Venezia - Italia
Contact:

Post by Wolf01 »

i find usefull the no-roads one, sometimes i don't want that a city grow by itself
DeletedUser21
Tycoon
Tycoon
Posts: 11501
Joined: 20 Sep 2004 22:45

Post by DeletedUser21 »

There should be something that allows towns only to build 2 x 2 style IMO.

Let's explain this:

Code: Select all

R R R R
R H H R
R H H R
R R R R
R = Road
H = House

Well anyway, the general idea is to stop towns creating roads close to eachother. (I find it ugly to see tonnes of dead/lose ends while towns always have some kind of structure in them in RL.) :wink:
User avatar
Wolf01
Tycoon
Tycoon
Posts: 2016
Joined: 24 Apr 2004 10:43
Location: Venezia - Italia
Contact:

Post by Wolf01 »

Mr. X wrote:There should be something that allows towns only to build 2 x 2 style IMO.

Let's explain this:

Code: Select all

R R R R
R H H R
R H H R
R R R R
R = Road
H = House

Well anyway, the general idea is to stop towns creating roads close to eachother. (I find it ugly to see tonnes of dead/lose ends while towns always have some kind of structure in them in RL.) :wink:
maybe you need eye glasses... no wait, no sun glasses :)
skidd13 wrote:[*]US styled (2 tile distance between roads)[/list]
DeletedUser21
Tycoon
Tycoon
Posts: 11501
Joined: 20 Sep 2004 22:45

Post by DeletedUser21 »

:oops: I skipped that part for some reason.
Whoops! :P

Well US styled is good, but the logic Whopper used in his towns should also be possible someday. (I hope so atleast. :wink: )
User avatar
White Rabbit
Tycoon
Tycoon
Posts: 1734
Joined: 22 Jun 2005 19:15

Post by White Rabbit »

I've dreamt about this patch... :lol:
Image
Chicago Rail Authority
Traffic Manager
Traffic Manager
Posts: 134
Joined: 09 Nov 2006 23:38

Post by Chicago Rail Authority »

Any chance that you could post a win32 *.exe against a recent nightly?

Thanks!
Many thanks to those who make OTTD and TTDP possible.
User avatar
skidd13
OpenTTD Developer
OpenTTD Developer
Posts: 522
Joined: 03 Mar 2005 10:49
Location: Germany

Post by skidd13 »

Chicago Rail Authority wrote:Any chance that you could post a win32 *.exe against a recent nightly?

Thanks!
I'm sorry I only use/have access to Linux.
Maybe it'll get in trunk soon. ;)
What does that mean - the circumstances? I determine what circumstances prevail. -- Napoleon Bonaparte
---
If we cannot end now our differences, at least we can help make the world safe for diversity. -- John F. Kennedy
---
Our problems are man-made, therefore they may be solved by man. No problem of human destiny is beyond human beings. -- John F. Kennedy
Chicago Rail Authority
Traffic Manager
Traffic Manager
Posts: 134
Joined: 09 Nov 2006 23:38

Post by Chicago Rail Authority »

skidd13 wrote:I'm sorry I only use/have access to Linux.
Maybe it'll get in trunk soon. ;)
Perhaps another forum member would be willing to post/PM a win32 *.exe (with your permission, of course) :)

Sounds like a great patch - can't wait to try it out!
Many thanks to those who make OTTD and TTDP possible.
User avatar
MeTo
Traffic Manager
Traffic Manager
Posts: 129
Joined: 06 Apr 2003 14:02
Location: UnL; Czech Republic
Contact:

Post by MeTo »

A very good patch :) However.... if there are no roads in the town and I have set that I don't want towns to build roads.... that town builds one square of road... would it be possible to forbid towns to build even this ?
User avatar
cmoiromain
Chief Executive
Chief Executive
Posts: 655
Joined: 15 Jan 2007 21:45
Location: FRANCE
Contact:

Post by cmoiromain »

why do you want towns to build 0 bits of roads? :?
If you really want to destroy towns, then use the magic buldozer cheat and destroy the town ;)
User avatar
skidd13
OpenTTD Developer
OpenTTD Developer
Posts: 522
Joined: 03 Mar 2005 10:49
Location: Germany

Post by skidd13 »

MeTo wrote:A very good patch :) However.... if there are no roads in the town and I have set that I don't want towns to build roads.... that town builds one square of road... would it be possible to forbid towns to build even this ?
So you want town to grow without roads?

I hope it'll get at first "as it is" (style or dev requested changes excluded) into trunk.

After that other town layout's such as yours could be implemented and added.
What does that mean - the circumstances? I determine what circumstances prevail. -- Napoleon Bonaparte
---
If we cannot end now our differences, at least we can help make the world safe for diversity. -- John F. Kennedy
---
Our problems are man-made, therefore they may be solved by man. No problem of human destiny is beyond human beings. -- John F. Kennedy
User avatar
MeTo
Traffic Manager
Traffic Manager
Posts: 129
Joined: 06 Apr 2003 14:02
Location: UnL; Czech Republic
Contact:

Post by MeTo »

cmoiromain : I expected a question like that :) Well.... how to write it quickly... :) I have played TT and all its versions for years.... My goal is currently to BUILD.... to create some traffic system and to adjust cities as well.... I don't care about the original main thing - money.... the same it is with towns.... So, for example.... I want to have a large desert.... yes.... I can delete towns in the scenario editor.... but.... what if I want to create some "desert city" once ? No way.... there will be no town.... I know, I can remove the only square of road (+ two buildings) in all "empty" towns again, again and again.... but if I play a 2048*2048 map, I would be always removing roads :) I play this great game just for fun :) So I don't need to keep the reality at 100%.
I agree, this function may look extremely useless for someone.... (well.... like the townsbuildnoroads function, at the beginning it didn't seem to be done once, so I really appreciate that somebody created it, many thanks to him)... but... it is not written anywhere that everyone has to keep the same way of playing this game.... and furthermore, nobody makes anyone to use that :)
skidd13 :
"So you want town to grow without roads? "
If I remove houses and roads in some town..... it is not a "town" anymore, for me.... it is just a "sign" with some name, which can be used to create a town, sometimes.... but it doesn't have to...
It would be nice if there is a possibility to create a town while playing the game.... but it is not needed, it would be just enough to definitely forbid towns to build roads... even the one road...
In the first townsbuildnoroads patch (from Spoot), towns did not build one road. But all newer versions do that :( (But the first one is not compatible with todays new versions of OTTD)
User avatar
skidd13
OpenTTD Developer
OpenTTD Developer
Posts: 522
Joined: 03 Mar 2005 10:49
Location: Germany

Post by skidd13 »

MeTo wrote:If I remove houses and roads in some town..... it is not a "town" anymore, for me.... it is just a "sign" with some name, which can be used to create a town, sometimes.... but it doesn't have to...
It would be nice if there is a possibility to create a town while playing the game.... but it is not needed, it would be just enough to definitely forbid towns to build roads... even the one road...
In the first townsbuildnoroads patch (from Spoot), towns did not build one road. But all newer versions do that :( (But the first one is not compatible with todays new versions of OTTD)
Ah I get your point.
My patch can stop the city's from growing during the game and enable it again.
That is a diffrent thing (from coding view). You want a patch to destroy and/or create towns.
What does that mean - the circumstances? I determine what circumstances prevail. -- Napoleon Bonaparte
---
If we cannot end now our differences, at least we can help make the world safe for diversity. -- John F. Kennedy
---
Our problems are man-made, therefore they may be solved by man. No problem of human destiny is beyond human beings. -- John F. Kennedy
User avatar
MeTo
Traffic Manager
Traffic Manager
Posts: 129
Joined: 06 Apr 2003 14:02
Location: UnL; Czech Republic
Contact:

Post by MeTo »

I wrote it would be nice to have a patch where it would be possible to add a town :) But it would be really enough to forbid towns to build even the only piece of road :) I played it in this way with the first version of townsbuildnoroads patch and I was satisfied :) I mean, during the game.... I know that your patch is applied also if I generate a new game.... but if I destroy the last piece of road once, I don't want the town to create it again....
Last edited by MeTo on 30 Mar 2007 15:30, edited 1 time in total.
User avatar
skidd13
OpenTTD Developer
OpenTTD Developer
Posts: 522
Joined: 03 Mar 2005 10:49
Location: Germany

Post by skidd13 »

MeTo wrote:I wrote it would be nice to have a patch where it would be possible to add a town :) But it would be really enough to forbid towns to build even the only piece of road :) I played it in this way with the first version of townsbuildnoroads patch and I was satisfied :) I mean, during the game.... I know that your patch is applied also if I generate a new game.... but if I destroy the last piece of road once, I don't want a town to create it....
Post a link to the patch, and I'll have a look at it.
What does that mean - the circumstances? I determine what circumstances prevail. -- Napoleon Bonaparte
---
If we cannot end now our differences, at least we can help make the world safe for diversity. -- John F. Kennedy
---
Our problems are man-made, therefore they may be solved by man. No problem of human destiny is beyond human beings. -- John F. Kennedy
User avatar
MeTo
Traffic Manager
Traffic Manager
Posts: 129
Joined: 06 Apr 2003 14:02
Location: UnL; Czech Republic
Contact:

Post by MeTo »

It is the first one, townscanbuildroads.patch
http://tt-forums.net/viewtopic.php?t=24661
On the second page there are two newer versions, but no of them forbids to build one piece of road....
User avatar
gkirilov
Chief Executive
Chief Executive
Posts: 696
Joined: 03 May 2005 09:32
Location: Othala

Post by gkirilov »

skidd13, are you sure it does only 2x2 squares? Because what you replied to Mr. X's question and what is your first post is different. There is this "min" which bothers me (i.e. it can be also 2x3 3x3 etc.). We need exactly 2x2 and nothing else. And if I am wrong can you please demonstrate a layout with only 2x2 squares filled with buildings.
OTTDCoop NewGRF Pack|Different sets of GRFs for TTDPatch (some of them work in OTTD) - 1|- 2|GRF sets for OTTD|OTTD nightly
Image
I hooked up my accelerator to my brake lights. I hit the gas, people behind me stop, and I'm gone.
Understeer is when you hit the wall with the front of the car. Oversteer is when you hit the wall with the rear of the car. Horsepower is how fast you hit the wall. Torque is how far you take the wall with you. Spoilers and bodykits are how much of the wall you take with you. Rollcages and windownets are how much of a mess you leave on the wall.
User avatar
skidd13
OpenTTD Developer
OpenTTD Developer
Posts: 522
Joined: 03 Mar 2005 10:49
Location: Germany

Post by skidd13 »

gkirilov wrote:skidd13, are you sure it does only 2x2 squares? Because what you replied to Mr. X's question and what is your first post is different. There is this "min" which bothers me (i.e. it can be also 2x3 3x3 etc.). We need exactly 2x2 and nothing else. And if I am wrong can you please demonstrate a layout with only 2x2 squares filled with buildings.
You are right. It is (2+x) * (2+y).
I never intend a grid, also I thought over it. I wanted to get rid of the ugly 1x1 and combine it with the stop towns from growing.
But I'll try to write a grid layout generator.
What does that mean - the circumstances? I determine what circumstances prevail. -- Napoleon Bonaparte
---
If we cannot end now our differences, at least we can help make the world safe for diversity. -- John F. Kennedy
---
Our problems are man-made, therefore they may be solved by man. No problem of human destiny is beyond human beings. -- John F. Kennedy
User avatar
skidd13
OpenTTD Developer
OpenTTD Developer
Posts: 522
Joined: 03 Mar 2005 10:49
Location: Germany

Post by skidd13 »

Patch updated.
Now it is a real 2x2 grid-layout!
What does that mean - the circumstances? I determine what circumstances prevail. -- Napoleon Bonaparte
---
If we cannot end now our differences, at least we can help make the world safe for diversity. -- John F. Kennedy
---
Our problems are man-made, therefore they may be solved by man. No problem of human destiny is beyond human beings. -- John F. Kennedy
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 20 guests