Traffic lights (r17455)

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
FooBar
Tycoon
Tycoon
Posts: 6559
Joined: 21 May 2007 11:47
Location: The Netherlands
Contact:

Re: Traffic lights (v2; r12812)

Post by FooBar »

Nice work, Roujin!

About that bug with four one-way roads facing away from the junction: I wouldn't bother too much to fix that, because vehicles wouldn't ever use that junction; they simply can't reach it! As soon as one makes the junction 'usable', the traffic lights will appear.

User avatar
SirXavius
Transport Coordinator
Transport Coordinator
Posts: 302
Joined: 28 Jun 2006 18:25
Location: Florida

Re: Traffic lights (v1; r12733)

Post by SirXavius »

Ar4i wrote:
SirXavius wrote:...
BTW, as far as "compiling" the new .diff file, i'll wait til its in an official release. I do not want to get into dismantling and "remantling" the gamecode...
OR can try to read a bit more, especially the first post in that page where you can download already compiled executable including the patch.
Okay, okay, i get it: i'm NOT the genius i think i am! :roll: Where is the non-.diff? I read the thread on applying .diffs and i really would like to avoid SVN and recompiling and all that! But i REEEALLLY want traffic lights! :P

Trond
Tycoon
Tycoon
Posts: 973
Joined: 25 Jan 2008 07:32
Location: Gamle Ørnenuten

Re: Traffic lights (v2; r12812)

Post by Trond »

..: Trond :.. because you deserve it! Image

The whole problem with the world is that fools and fanatics are always so certain of themselves,
and wiser people so full of doubts.
Bertrand Russell

MyGRFs: Norwegian Funny Town Names 4 | LOTR & WoW Town Names 2 | Islandic Town Names 1 | Random Norwegian Town Names
Favorites: GRFCrawler | ISR | WIKI | Now Playing: OpenTTD 1.3.2 w/YAPP 3.0-RC3.9ish

Yexo
Tycoon
Tycoon
Posts: 3653
Joined: 20 Dec 2007 12:49

Re: Traffic lights (v1; r12733)

Post by Yexo »

SirXavius wrote:
Ar4i wrote:
SirXavius wrote:...
BTW, as far as "compiling" the new .diff file, i'll wait til its in an official release. I do not want to get into dismantling and "remantling" the gamecode...
OR can try to read a bit more, especially the first post in that page where you can download already compiled executable including the patch.
Okay, okay, i get it: i'm NOT the genius i think i am! :roll: Where is the non-.diff? I read the thread on applying .diffs and i really would like to avoid SVN and recompiling and all that! But i REEEALLLY want traffic lights! :P
Reading a thread is difficult, isn't it? Page 4, first post.

User avatar
SirXavius
Transport Coordinator
Transport Coordinator
Posts: 302
Joined: 28 Jun 2006 18:25
Location: Florida

Re: Traffic lights (v1; r12733)

Post by SirXavius »

Yexo wrote:
SirXavius wrote:
Ar4i wrote: OR can try to read a bit more, especially the first post in that page where you can download already compiled executable including the patch.
Okay, okay, i get it: i'm NOT the genius i think i am! :roll: Where is the non-.diff? I read the thread on applying .diffs and i really would like to avoid SVN and recompiling and all that! But i REEEALLLY want traffic lights! :P
Reading a thread is difficult, isn't it? Page 4, first post.

I read thru all the pages and somehow i missed it. But let's be fair, he made it sound like it was the first page of that THREAD. :roll: i'm not dum, you know...

And to Trond:

:bow:

I bow to your wizardry and all-seeing eye....I would consider myself blessed but to suckle at the shadow created from the light of your Omniscience!



IOW, thanx, dude. :))

User avatar
Gedemon
Traffic Manager
Traffic Manager
Posts: 150
Joined: 29 Apr 2004 21:53

Re: Traffic lights (v2; r12812)

Post by Gedemon »

Roujin, it seems that the patch use a lot of CPU when there are road vehicles and 3-4 traffic lights in a city.

Do you notice it ?

User avatar
SirXavius
Transport Coordinator
Transport Coordinator
Posts: 302
Joined: 28 Jun 2006 18:25
Location: Florida

Re: Traffic lights (v2; r12812)

Post by SirXavius »

Alas, i could not use it. I'm using OTTD under Win98SE, and it doesn't get listed in the .grf list in-game. I also tried using the compiled version but it's not for Win98...

...and my daydreaming continues :( ...

User avatar
SirXavius
Transport Coordinator
Transport Coordinator
Posts: 302
Joined: 28 Jun 2006 18:25
Location: Florida

Re: Traffic lights (v2; r12812)

Post by SirXavius »

Alas, i could not use it. I'm using OTTD under Win98SE, and it doesn't get listed in the .grf list in-game. I also tried using the compiled version but it's not for Win98...

...and my daydreaming continues :( ...

User avatar
Gedemon
Traffic Manager
Traffic Manager
Posts: 150
Joined: 29 Apr 2004 21:53

Re: Traffic lights (v2; r12812)

Post by Gedemon »

SirXavius wrote:Alas, i could not use it. I'm using OTTD under Win98SE, and it doesn't get listed in the .grf list in-game. I also tried using the compiled version but it's not for Win98...

...and my daydreaming continues :( ...
this grf is not to be activated in the list.

and BuildOTTD is the easiest solution for win98.

Roujin
Tycoon
Tycoon
Posts: 1884
Joined: 08 Apr 2007 04:07

Re: Traffic lights (v2; r12812)

Post by Roujin »

Gedemon wrote:Roujin, it seems that the patch use a lot of CPU when there are road vehicles and 3-4 traffic lights in a city.

Do you notice it ?
Thanks for your bug report, I think I have found and removed the cause (at least the slowdown I noticed with the old version in a quick test game was gone).

Also, trunk has undergone a savegame bump since the last version of trafficlights, so now is the first chance to see if my savegame version concept works. Basically, it should be able to load both older versions of this patch (e.g. v2) AND current trunk (r12905). Normally, a trunk savegame bump kills savegame compatibility for patches. I also tested this and it worked for me, but it was only a quick test, so if you stumble over savegame incompatibility, please report it.
Attachments
trafficlights_v2.1_r12905.diff
Traffic lights v2.1 for r12905
(44.39 KiB) Downloaded 326 times
* @Belugas wonders what is worst... a mom or a wife...
<Lakie> Well, they do the same thing but the code is different.

______________
My patches
check my wiki page (sticky button) for a complete list

ImageImage
ImageImageImageImageImageImageImage

User avatar
Gedemon
Traffic Manager
Traffic Manager
Posts: 150
Joined: 29 Apr 2004 21:53

Re: Traffic lights (v2; r12812)

Post by Gedemon »

Roujin wrote:
Gedemon wrote:Roujin, it seems that the patch use a lot of CPU when there are road vehicles and 3-4 traffic lights in a city.

Do you notice it ?
Thanks for your bug report, I think I have found and removed the cause (at least the slowdown I noticed with the old version in a quick test game was gone).
Yep, CPU usage back to normal, thank you. :)

User avatar
lead@inbox
Transport Coordinator
Transport Coordinator
Posts: 377
Joined: 28 Dec 2007 04:35
Location: Serge, Russia, Vladivostok
Contact:

Re: Traffic lights (v2.1; r12905)

Post by lead@inbox »

Let's continue an idea by traffic signs (max speed, city ahead, railway crossing and etc.)
signs-test.png
signs-test.png (3.04 KiB) Viewed 9944 times

Roujin
Tycoon
Tycoon
Posts: 1884
Joined: 08 Apr 2007 04:07

Re: Traffic lights (v3; r12951)

Post by Roujin »

New version v3! Grab it while it's hot :P

For changelog see first post.
Attachments
trafficlights_v3_r12951.diff
traffic lights v3 for r12951
(54.37 KiB) Downloaded 840 times
* @Belugas wonders what is worst... a mom or a wife...
<Lakie> Well, they do the same thing but the code is different.

______________
My patches
check my wiki page (sticky button) for a complete list

ImageImage
ImageImageImageImageImageImageImage

Roujin
Tycoon
Tycoon
Posts: 1884
Joined: 08 Apr 2007 04:07

Re: Traffic lights (v3; r12951)

Post by Roujin »

trafficlights_r13197_10

[Sync] r13197
[Documentation] Added some comments
[Codechange] Some new/changed functions; removed some dependencies

I've introduced a new versioning method for my patches, so don't wonder about that ;)
Attachments
trafficlights_r13197_10.diff
trafficlights #10 for r13197
(54.7 KiB) Downloaded 305 times
* @Belugas wonders what is worst... a mom or a wife...
<Lakie> Well, they do the same thing but the code is different.

______________
My patches
check my wiki page (sticky button) for a complete list

ImageImage
ImageImageImageImageImageImageImage

Roujin
Tycoon
Tycoon
Posts: 1884
Joined: 08 Apr 2007 04:07

Re: Traffic lights (v3; r12951)

Post by Roujin »

trafficlights_r13265_33.diff

[Sync] r13265
[Remove] Savegame versioning system was too much of a hassle.

I hope it doesn't upset anyone that I've removed the savegame versioning system. In fact, there have been some drastic changes to the settings (previously patch options) in recent trunk, and maybe there are more ahead. I might reintroduce it as soon as I'm convinced the settings system will stay as it is again.

Until then, I can't guarantee for savegame compatibility. To be specific, as soon as savegame version is bumped in trunk, savegame compatibility here will break. That said, this version will not load from any older versions of trafficlights. It will load from any clean trunk though.
Attachments
trafficlights.diff
trafficlights #33 for r13265
(52.24 KiB) Downloaded 194 times
* @Belugas wonders what is worst... a mom or a wife...
<Lakie> Well, they do the same thing but the code is different.

______________
My patches
check my wiki page (sticky button) for a complete list

ImageImage
ImageImageImageImageImageImageImage

Roujin
Tycoon
Tycoon
Posts: 1884
Joined: 08 Apr 2007 04:07

Re: Traffic lights (r13265)

Post by Roujin »

Updated to r13411.
No changes done.
Attachments
trafficlights.diff
trafficlights #38 for r13411
(52.45 KiB) Downloaded 502 times
* @Belugas wonders what is worst... a mom or a wife...
<Lakie> Well, they do the same thing but the code is different.

______________
My patches
check my wiki page (sticky button) for a complete list

ImageImage
ImageImageImageImageImageImageImage

AxelX
Engineer
Engineer
Posts: 2
Joined: 10 Nov 2008 14:57

Re: Traffic lights (r13411)

Post by AxelX »

Please uptade this patch. :bow:

2007Alain2007
Chief Executive
Chief Executive
Posts: 658
Joined: 11 Nov 2007 12:06

Re: Traffic lights (r13411)

Post by 2007Alain2007 »

Hi there I Am Going to start makeing a new patch pack At revision: 15465 and i would like to us your patch but i see its at r13411 will you be able to update it so i can inclued it in my patch pack

The errors i am geting are on:

debug.cpp line 34 to 35 and 61 to 62
debug.h line 51
road_cmd.cpp line 175
road_cmd.h line 12 and 13
road_gui.cpp line 653 to 655 and 657 to 668
road_map.h line 196 to 216
saveload.cpp is "not under version control" so "patching is not possible"
saveload.h is "not under version control" so "patching is not possible"
settings.cpp lines 58 to 60, 1077 to 1135 and 1397 to 1402
settings_type.h lines 171 to 176
For Community Integrated Version http://code.google.com/p/civopenttd/

hwndmaster
Engineer
Engineer
Posts: 4
Joined: 16 Jul 2009 10:09

Re: Traffic lights (r13411)

Post by hwndmaster »

Could you make a new GRF file with all recent changes please?

UPD: Or say how I can merge all .diff files to make the GRF?

Yexo
Tycoon
Tycoon
Posts: 3653
Joined: 20 Dec 2007 12:49

Re: Traffic lights (r13411)

Post by Yexo »

hwndmaster wrote:Could you make a new GRF file with all recent changes please?
This is a patch, which is very different from a NewGRF file.
UPD: Or say how I can merge all .diff files to make the GRF?
You can't.

To use a patch you have to compile the game yourself, or download some binaries compiled by someone else. More information on patching / compiling can be found in the sticky topic in this forum and on the OpenTTD wiki.

Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Whare and 7 guests