Zoning - Local Authorities

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

User avatar
Svip
Engineer
Engineer
Posts: 31
Joined: 11 Nov 2005 10:36
Location: Copenhagen, Denmark

Zoning - Local Authorities

Post by Svip »

While working on the idea to insert non-playable cars (such as personal cars) into the game (to give the cities life, and make the delay more realistic for buses and trams), I thought of the idea of motorways, which could be used with toll ways (which would mean a form of transportation, where you just actually don't transport people, but get themselves to do it, they just pay for riding your road. :P). But that got me thinking about how the local authorities should act on this. I thought that you should have permission to build the motorway from each local authority. And then it would be have some indicator that you could build here and here.

This is where the zoning idea comes in. It is an overlay over the usual gameplay map. Using the following legend, you can see where you can build, where you should avoid building, and so fort:

Inner border colour
  • Black - controlled, no opinion
  • White - not controlled by any local authority
  • Green - controlled, they like you enough so you can build
  • Red - controlled, they don't like you enough to make you build
Outer border colour
  • Green - you can build in this area
  • Red - you cannot build in this area (this is mainly for the case of a local authority actually liking you, but they won't permit you to build motorways or a competitor bought exclusive rights to their area)
And here is an image of how I think it could work. Making this overlay is a bit difficult in an 8 bit game. So I based it on the already existing markers when you build trees, roads and such.

Image

Now it is about 3 in the morning. So I am not in the mood for writing that much more yet. I have created any code yet, I'm afraid.

Also, I might could use blue and yellow for "like/dislike" you instead of red and green.
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: Zoning - Local Authorities

Post by DaleStan »

Just two quick little problems with that.
1) You can always build in an uncontrolled area.
2) Exclusive rights apply to station-pickup, not to construction.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
User avatar
Svip
Engineer
Engineer
Posts: 31
Joined: 11 Nov 2005 10:36
Location: Copenhagen, Denmark

Re: Zoning - Local Authorities

Post by Svip »

DaleStan wrote:Just two quick little problems with that.
1) You can always build in an uncontrolled area.
2) Exclusive rights apply to station-pickup, not to construction.
True. But perhaps the game should be modified as well. I mean, it does surprise me that I can still rave through their area and build railways, roads and change the shape of the land, despite being hated by the local authorities. I don't know, perhaps the local authorities should have more power in the game?

Also, then "cannot" build will also be applied to what your competitors own. For instance, you cannot build on their railways, except roads. But the zoning should also adapt to the tool you have selected. So if I select railways, and select the zoning tool, competitors' roads will still light up "green", while their railways will be "red". If you get my meaning.

It will also be a practical tool to quickly see where the local authorities are, etc.
User avatar
Wolf01
Tycoon
Tycoon
Posts: 2016
Joined: 24 Apr 2004 10:43
Location: Venezia - Italia
Contact:

Re: Zoning - Local Authorities

Post by Wolf01 »

DaleStan wrote:Just two quick little problems with that.
1) You can always build in an uncontrolled area.
2) Exclusive rights apply to station-pickup, not to construction.
you cannot build over transmitters or other player's constructions, even in an uncontrolled area :)
User avatar
Svip
Engineer
Engineer
Posts: 31
Joined: 11 Nov 2005 10:36
Location: Copenhagen, Denmark

Re: Zoning - Local Authorities

Post by Svip »

Here is my first screenshot. Right now you can only see where the local authorities are, and for some reason, it refuses to draw anything other than pink and white. I'll have to figure out the colouring part.
Attachments
Unnamed, 8th Jan 1940.png
Unnamed, 8th Jan 1940.png (128.01 KiB) Viewed 4147 times
User avatar
Nickman
Engineer
Engineer
Posts: 66
Joined: 27 Jun 2006 23:07

Re: Zoning - Local Authorities

Post by Nickman »

Looking good ;). But a bit crowded :D.

Keep up the good work ;).
User avatar
cmoiromain
Chief Executive
Chief Executive
Posts: 655
Joined: 15 Jan 2007 21:45
Location: FRANCE
Contact:

Re: Zoning - Local Authorities

Post by cmoiromain »

I definitely fancy this idea!
just a couple of suggestions to improve it IMO:

indeed this looks crowded, maybe a little coloured square in the middle would be enough, instead of a large square;

why use so many colours? you could just use green (or blue, green is difficult to see on the grass) when you can build, and red when you can't. And maybe orange when you can but the local authority dislikes you, so you are warned that you won't receive that much passengers etc...

good luck with this patch, it looks pretty awesome!
I am little, ugly, and nasty. How do you do?
User avatar
Svip
Engineer
Engineer
Posts: 31
Joined: 11 Nov 2005 10:36
Location: Copenhagen, Denmark

Re: Zoning - Local Authorities

Post by Svip »

New screenshot, and lots of progress.

Description of screenshot:
The town in upper right dislikes me.
The town in the lower left likes me.
The town in the upper left doesn't know me.
Attachments
Penbridge Transport, 24th Jan 1940.png
Penbridge Transport, 24th Jan 1940.png (203.83 KiB) Viewed 4016 times
Tom0004
Chairman
Chairman
Posts: 822
Joined: 01 Jul 2007 22:33
Location: Manchester, UK

Re: Zoning - Local Authorities

Post by Tom0004 »

i like this idea, it allows you to see if the local town will let you build.

prehaps a switch in the building tools, to toogle this on and off ?
User avatar
belugas
OpenTTD Developer
OpenTTD Developer
Posts: 1507
Joined: 05 Apr 2005 01:48
Location: Deep down the deepest blue
Contact:

Re: Zoning - Local Authorities

Post by belugas »

I've raised this opinion on IRC, and I still feel it is the case.
I do not think it is usefull to do any special process when the town does not know who you are.
You should perform the highlight only on towns where your activities have affected (good or bad) the local authorities.
As a bonus, it would be less demanding on the system.
If you are not ready to work a bit for your ideas, it means they don't count much for you.
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
User avatar
Svip
Engineer
Engineer
Posts: 31
Joined: 11 Nov 2005 10:36
Location: Copenhagen, Denmark

Re: Zoning - Local Authorities

Post by Svip »

Okay, you have complained it was too crowded. I've done something about it now.

However, I am still "mapping" where towns are, even if they don't care about you, the real reason I wanted to write this originally was to see where towns was, instead of click the query all the time.

Though, I have removed the "can build here" colour (as that seems rather obvious) and the "no town here" colour as well.

Take a look. As some of you will probably also notice, the colour scheme have been updated as well. Just to use "better" colours. :>

EDIT: The white select tiles in the picture are me trying to build a bridge, mainly to show off that you can now actually see where you're building with the zoning on.
Attachments
Tronburg Springs Transport, 8th Mar 1930.png
Tronburg Springs Transport, 8th Mar 1930.png (162.46 KiB) Viewed 4092 times
User avatar
belugas
OpenTTD Developer
OpenTTD Developer
Posts: 1507
Joined: 05 Apr 2005 01:48
Location: Deep down the deepest blue
Contact:

Re: Zoning - Local Authorities

Post by belugas »

Much better indeed :)
The crowded concern was more related to the fact that the information should be pertinent, and not saturated.
This is what i meant.
Like... only show what is important and obvious (as you mentionned) :wink:
If you are not ready to work a bit for your ideas, it means they don't count much for you.
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
User avatar
AlienDNA
Engineer
Engineer
Posts: 97
Joined: 12 Apr 2004 08:53
Location: Leiden, Netherlands

Re: Zoning - Local Authorities

Post by AlienDNA »

This is a nice idea, and I like where it is going. But...

the squares give me a headache. So many squares everywhere!!!

Wouldn't it be a better idea to use a single-colored overlay, that just covers the entire square? It would of course have to be transparent, or you wouldn't be able to see through. If you color it very mildly, you'd be able to see the zone-effects, without turing the entire area in some Toyland lookalike thats's rather hard on the eyes.

Definitly keep developing this, because it will be usefull!
"I'm gonna rip his leg off and kick him with it!", Sanjuro, Shogo-MAD
User avatar
KrevRenko
Engineer
Engineer
Posts: 104
Joined: 25 Mar 2005 14:28

Re: Zoning - Local Authorities

Post by KrevRenko »

AlienDNA wrote: the squares give me a headache. So many squares everywhere!!!
I think the squares look just fine. Overlays could ruin visibility of some objects on tiles and are just not worth it I'd say.
User avatar
Svip
Engineer
Engineer
Posts: 31
Joined: 11 Nov 2005 10:36
Location: Copenhagen, Denmark

Re: Zoning - Local Authorities

Post by Svip »

Okay, I am ready to release the patch. As well as its grf, as that is required to use the patch. If you are working with patches, you know what to do. ;)

Hope you enjoy. Named 0.7 for good measure.

I just tested the patch with the newest revision of the svn trunk. And it works flawlessly (i.e. it compiles and runs).

To activate the patch, go to the Options menu (the one with the screwdriver) and there should be a new menu piece. Only in English and Danish for now.

EDIT/UPDATE:
Next mission is to add a gui window that would allow you to pick specific things to zone. So you don't have to see the authority zoning while just wanting to see where you can't build. Also allow for other possibilities of zoning, like cost for building a track/road on tiles, rating from cheap to expensive via reasonably.

The gui window should also include some legend.
Attachments
zoning0.7.diff
(11.11 KiB) Downloaded 579 times
innerhighlight.grf
(6.79 KiB) Downloaded 602 times
User avatar
MHTransport
Engineer
Engineer
Posts: 97
Joined: 25 Mar 2004 00:32

Re: Zoning - Local Authorities

Post by MHTransport »

The display is a bit two busy. If you are going to build there are only a couple of things that stop you.
1 Hostile Authority (over rules everything)
2 Unremovable Object (e.g. coal mine)
3 Zoning Lookout (e.g. too many airports) - depends on current building object
4 Terrain

These are in order as 4 you can change and 3 you can build something else. You don't have to draw them in combo as the overrule each other.

Everything else is building allowed so no border needed.

And you might want to consider the Civ4.3 approach of drawing a diagonal hatching across the square rather than just a border.
A better OS: http://ubuntu.com/
Soon an even better OS: http://haiku-os.org/
User avatar
MHTransport
Engineer
Engineer
Posts: 97
Joined: 25 Mar 2004 00:32

Re: Zoning - Local Authorities

Post by MHTransport »

Looking at it in Gimp. I think the blue border on the inside makes it seem really heavy. Perhaps a softer colour.

You could also do some border removal so that neighbouring tiles share a border.
A better OS: http://ubuntu.com/
Soon an even better OS: http://haiku-os.org/
User avatar
Svip
Engineer
Engineer
Posts: 31
Joined: 11 Nov 2005 10:36
Location: Copenhagen, Denmark

Re: Zoning - Local Authorities

Post by Svip »

MHTransport wrote:1 Hostile Authority (over rules everything)
2 Unremovable Object (e.g. coal mine)
3 Zoning Lookout (e.g. too many airports) - depends on current building object
4 Terrain

These are in order as 4 you can change and 3 you can build something else. You don't have to draw them in combo as the overrule each other.

Everything else is building allowed so no border needed.
Indeed, that's why I want to separate them. One for watching where you can build. And one for watching where the local authorities. And a small GUI window where you can easily turn each on and off.
MHTransport wrote:Looking at it in Gimp. I think the blue border on the inside makes it seem really heavy. Perhaps a softer colour.
Perhaps. But that would require some GRF change. And thus I am not in the mood for that as of right now. But I shall look into a softer colour.
MHTransport wrote:You could also do some border removal so that neighbouring tiles share a border.
I am not exactly sure what you mean here. Could you be more precise?
User avatar
MHTransport
Engineer
Engineer
Posts: 97
Joined: 25 Mar 2004 00:32

Re: Zoning - Local Authorities

Post by MHTransport »

[quote="Svip"]I am not exactly sure what you mean here. Could you be more precise?[/quote]

IF the box above does not have a border THEN draw the top border
IF the box left does not have a border THEN draw the left border
draw the right border
draw the bottom border

This means you never get a left and right border within a couple of pixels, i.44e not | || | always | | |.

Notice that the tile grid border follows this visual rule.

It would be better to continue the right and bottom lines if the top or left is skipped.

IF the box above does not have a border THEN draw the top border ELSE draw a higher right
IF the box left does not have a border THEN draw the left border ELSE draw a longer bottom
draw the right border
draw the bottom border
Attachments
A very rough example of partial border drawing.
A very rough example of partial border drawing.
partial border.png (8.89 KiB) Viewed 25800 times
A better OS: http://ubuntu.com/
Soon an even better OS: http://haiku-os.org/
User avatar
Nickman
Engineer
Engineer
Posts: 66
Joined: 27 Jun 2006 23:07

Re: Zoning - Local Authorities

Post by Nickman »

I don't like the half boxes...

They look broken to me :D.

What you could do is only make an outline, so not draw ALL the squares, but only the ones on the outside?
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 5 guests