New map features

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
AlexG
Traffic Manager
Traffic Manager
Posts: 136
Joined: 04 Apr 2011 07:27
Location: Cluj Napoca

Re: New map features

Post by AlexG »

I don't know if I should post it here or elsewhere but it happens on the last trunk released with N.M.F. The error is bellow.
It happens when I've constructed a rail under a bridge (NuTracks with TBRS) and it wasn't the free grid to construct, but the bridge grid.
Attachments
Capture1.JPG
Capture1.JPG (21.58 KiB) Viewed 4629 times
User avatar
cirdan
Director
Director
Posts: 539
Joined: 07 Apr 2007 18:08

Re: New map features

Post by cirdan »

3298 wrote:Found another instance of the mass-replace missing a ReverseTrackdir (like with my trains in stations on page 4): Ships exit the wrong side of a shipyard. Fix: In src/pathfinder/yapf/yapf/yapf_ship.cpp, line 127 (last line of CheckShipReverse), insert a ReverseTrackdir around pos.td, making the line look like this:

Code: Select all

return best_trackdir == ReverseTrackdir(pos.td);
Right you are; fixed in the attached version.
Sadguardian wrote:I don't know if I should post it here or elsewhere but it happens on the last trunk released with N.M.F. The error is bellow.
If you are playing with my patch, then you should report bugs here, and I will take care of them.
Sadguardian wrote:It happens when I've constructed a rail under a bridge (NuTracks with TBRS) and it wasn't the free grid to construct, but the bridge grid.
I cannot reproduce this. Could you provide the exact sequence of steps that trigger the error, perhaps with a savegame?

This new version of the patch also fixes a crash with exit signals on a bridgehead.
Attachments
nma-r25084.diff.gz
Simple diff
(296.64 KiB) Downloaded 97 times
nma-r25084.patch.gz
Branch (400 patches)
(643.9 KiB) Downloaded 100 times
User avatar
AlexG
Traffic Manager
Traffic Manager
Posts: 136
Joined: 04 Apr 2011 07:27
Location: Cluj Napoca

Re: New map features

Post by AlexG »

It happens when you try to place a rail over a road bridge and the rail crosses over a bridge "foot" or end. It should be an warning message there (as when you would try to lay a track over a building), right ?
I've attached a save game with the error posted earlier :)


And please, if is done, post it in a binary version...
Attachments
IMT Europe, 13-04-2001.sav
(4.51 MiB) Downloaded 98 times
Supercheese
Tycoon
Tycoon
Posts: 1660
Joined: 16 Dec 2007 22:24
Location: Idaho, USA

Re: New map features

Post by Supercheese »

nma-r25084.diff binary package attached.
Attachments
openttd-newmapfeatures-r25084-win32.7z
(4.2 MiB) Downloaded 101 times
Eyecandy Road Vehicles | Fake Subways | Supercheese's NewObjects

"Fashions and cultures change, but steam trains shall always be majestic."
-Professor Hershel Layton
User avatar
cirdan
Director
Director
Posts: 539
Joined: 07 Apr 2007 18:08

Re: New map features

Post by cirdan »

Sadguardian wrote:It happens when you try to place a rail over a road bridge and the rail crosses over a bridge "foot" or end. It should be an warning message there (as when you would try to lay a track over a building), right ?
I've attached a save game with the error posted earlier :)
This is precisely the kind of detailed steps that I wanted. Fixing a bug is easier for me if I can trigger it from scratch in a new game (so I can do 'git bisect'). To make sure we are talking about the same bug, it happens when you try to do what the picture below shows, right? If so, it is fixed in the attached patch.
Sadguardian wrote:And please, if is done, post it in a binary version...
As I already told ZxBiohazardZx, I can only provide linux binaries, since that is what I use, and they would be linked against very recent versions of all libraries involved, which I doubt many people with vanilla distros have (distros tend to be somewhat conservative in upgrading libraries). This means that my binaries would be of use only to someone who runs linux and actively compiles and installs system libraries on their own, and such people would be better off compiling my patch themselves anyway.

Besides, Supercheese and 3298 have been posting windows binaries for the last patches in a timely manner (better yet, they also report bugs :-) ).
Attachments
bridgehead-levelcross.png
bridgehead-levelcross.png (16.23 KiB) Viewed 4442 times
nma-r25085.diff.gz
Simple diff
(296.67 KiB) Downloaded 100 times
nma-r25085.patch.gz
Branch (400 patches)
(643.94 KiB) Downloaded 91 times
User avatar
AlexG
Traffic Manager
Traffic Manager
Posts: 136
Joined: 04 Apr 2011 07:27
Location: Cluj Napoca

Re: New map features

Post by AlexG »

Yes, that's what triggers the error, like in your posted picture :wink:
About binaries...I've asked because I'm not good at compiling, but now I see I've made a mistake trying to run binaries on Windows :)

Thanks and hope it did help somehow, my bug report :D
oberhümer
Tycoon
Tycoon
Posts: 1283
Joined: 23 Oct 2009 19:35
Location: Here and there, sometime or another

Re: New map features

Post by oberhümer »

cirdan wrote:I can only provide linux binaries, since that is what I use
Using the MinGW development setup via Wine is quite straightforward, if a bit slow. Also see https://secure.openttd.org/wiki/Cross-c ... s_on_Linux.
--- Licenses: GNU LGPL, version 2 or newer, code and graphics. CC-By-SA, graphics, alternatively. If you're using any, I'd like to hear about it --- Call them "track types" ---
--- Mostly inactive developer for: NuTracks - Central European Train Set --- Running/compiling for: Linux (x86) - Android - Windows (32/64 bit) ---

--- Need a file packer? 7-Zip --- BOINC - use your computing power to benefit science --- Block trackers, not ads --- Unix in dispersible pellets, the formula for the future. ---
Supercheese
Tycoon
Tycoon
Posts: 1660
Joined: 16 Dec 2007 22:24
Location: Idaho, USA

Re: New map features

Post by Supercheese »

Time for a nma-r25085.diff Win32 binary.
Attachments
openttd-newmapfeatures-r25085-win32.7z
(4.2 MiB) Downloaded 120 times
Eyecandy Road Vehicles | Fake Subways | Supercheese's NewObjects

"Fashions and cultures change, but steam trains shall always be majestic."
-Professor Hershel Layton
3298
Traffic Manager
Traffic Manager
Posts: 143
Joined: 02 Apr 2011 12:55

Re: New map features

Post by 3298 »

oberhümer wrote:
cirdan wrote:I can only provide linux binaries, since that is what I use
Using the MinGW development setup via Wine is quite straightforward, if a bit slow. Also see https://secure.openttd.org/wiki/Cross-c ... s_on_Linux.
Yes, that's precisely what I used to produce the single binary I posted here. But "a bit slow" is an understatement, that setup is ssssslllllooooowwwww (one hour for OpenTTD only; also SVN somehow doesn't work in my setup). Lucky me, my Windows works again (sortof). That's probably the only place where it isn't Windoze. ;)
I can't find any more bugs, so into trunk with it. :mrgreen:
oberhümer
Tycoon
Tycoon
Posts: 1283
Joined: 23 Oct 2009 19:35
Location: Here and there, sometime or another

Re: New map features

Post by oberhümer »

Well, my computer with a modern i5 does "./configure" in two and a half minutes and "make -j5" in four and a half under Wine/MinGW. Still 1/3 of the native speed, but not that bad.
For SVN, you'll need to use an original Windows msvcp60.dll in Wine (set a DLL override), as stated on the second of the linked wiki pages.
--- Licenses: GNU LGPL, version 2 or newer, code and graphics. CC-By-SA, graphics, alternatively. If you're using any, I'd like to hear about it --- Call them "track types" ---
--- Mostly inactive developer for: NuTracks - Central European Train Set --- Running/compiling for: Linux (x86) - Android - Windows (32/64 bit) ---

--- Need a file packer? 7-Zip --- BOINC - use your computing power to benefit science --- Block trackers, not ads --- Unix in dispersible pellets, the formula for the future. ---
User avatar
AlexG
Traffic Manager
Traffic Manager
Posts: 136
Joined: 04 Apr 2011 07:27
Location: Cluj Napoca

Re: New map features

Post by AlexG »

Good job guys ! No more road bridge - rail problem :D

Thanks!
3298
Traffic Manager
Traffic Manager
Posts: 143
Joined: 02 Apr 2011 12:55

Re: New map features

Post by 3298 »

While doing an "svn update" and compiling OpenTTD, GCC warned me:

Code: Select all

src/elrail.cpp: In Funktion »void DrawCatenaryRailway(const TileInfo*)«:
src/elrail.cpp:526:34: Warnung: »sprite_halftile« könnte in dieser Funktion uninitialisiert verwendet werden [-Wmaybe-uninitialized]
Roughly translated: "sprite_halftile" might be used uninitialized in the function DrawCatenaryRailway. I haven't seen any crashes or glitches from that and expect it to be a false positive, just reporting so you can silence the warning.
oberhümer wrote:Well, my computer with a modern i5 does "./configure" in two and a half minutes and "make -j5" in four and a half under Wine/MinGW. Still 1/3 of the native speed, but not that bad.
For SVN, you'll need to use an original Windows msvcp60.dll in Wine (set a DLL override), as stated on the second of the linked wiki pages.
Mine is an old-ish EeePC with a single-core Atom, :oops: so slow compiling is somewhat expected. The really slow ./configure made me think that it still takes a very long time on better systems - it takes about 3 minutes on Wine for me, and on Linux outside the Wine environment it takes maybe 5 seconds.
About SVN: I just re-read the instructions, I downloaded the wrong version of the DLL. Thank you!
User avatar
cirdan
Director
Director
Posts: 539
Joined: 07 Apr 2007 18:08

Re: New map features

Post by cirdan »

Rebased against current trunk. Also, when you added a signal to a bridgehead and a train was already running on the bridge, the signal showed green initially, instead of red; this is now fixed.
Attachments
nma-r25136.diff.gz
Simple diff
(297.45 KiB) Downloaded 101 times
nma-r25136.patch.gz
Branch (401 patches)
(646.69 KiB) Downloaded 164 times
Supercheese
Tycoon
Tycoon
Posts: 1660
Joined: 16 Dec 2007 22:24
Location: Idaho, USA

Re: New map features

Post by Supercheese »

Here's a binary made with the same process as the rest.
Attachments
openttd-newmapfeatures-r25136-win32.7z
(4.21 MiB) Downloaded 110 times
Eyecandy Road Vehicles | Fake Subways | Supercheese's NewObjects

"Fashions and cultures change, but steam trains shall always be majestic."
-Professor Hershel Layton
User avatar
AlexG
Traffic Manager
Traffic Manager
Posts: 136
Joined: 04 Apr 2011 07:27
Location: Cluj Napoca

Re: New map features

Post by AlexG »

Hi

Great job with the latest fixes :D

I just have a small problem while running a new game.
The problem I've posted here, at the bottom of the topic (page 30)
http://www.tt-forums.net/viewtopic.php? ... &start=580

Thanks
User avatar
cirdan
Director
Director
Posts: 539
Joined: 07 Apr 2007 18:08

Re: New map features

Post by cirdan »

I cannot imagine how my patch could cause this. Did you post here because you are using Supercheese's binary? If so, I guess it must be related to the other patch he used in the binary, which raises the maximum number of NewGRFs in a game, or perhaps there is a conflict between the NewGRFs in your game (and having more NewGRFs increases the likelihood of such a conflict).
User avatar
AlexG
Traffic Manager
Traffic Manager
Posts: 136
Joined: 04 Apr 2011 07:27
Location: Cluj Napoca

Re: New map features

Post by AlexG »

I've posted because some members said it could be the problem with the ottd version that I'm using, so I've tried my luck here too
User avatar
cirdan
Director
Director
Posts: 539
Joined: 07 Apr 2007 18:08

Re: New map features

Post by cirdan »

That is fine; if you are using my patch, or a binary published here, you should post your problems here, too. What I wanted to know is whether you compiled my patch yourself or you were using Supercheese's binary. I find it extremely unlikely that your bug is caused by my patch (which does not change anything related to industries); and, if you are using Supercheese's binary, I will let Supercheese comment on your bug, if he thinks that it may be related to the other patch he used in the binary.

My impression, however, is that you have some sort of NewGRF interaction. Have you tried to reproduce your bug in vanilla trunk?
User avatar
AlexG
Traffic Manager
Traffic Manager
Posts: 136
Joined: 04 Apr 2011 07:27
Location: Cluj Napoca

Re: New map features

Post by AlexG »

Sorry for the late reply...
I think it is solved :)
I'm using the binary and started a new game in "play heightmap" instead of "play scenario". I think that was the problem :roll:
I'll see these days what's happening...
Supercheese
Tycoon
Tycoon
Posts: 1660
Joined: 16 Dec 2007 22:24
Location: Idaho, USA

Re: New map features

Post by Supercheese »

Yeah, the only change I make in the binaries I post here other than using the simple .diffs posted is to change:

Code: Select all

	/** Last slot usable for (New)GRFs used during the game. */
	LAST_GRF_SLOT  = 63,
	/** Maximum number of slots. */
	MAX_FILE_SLOTS = 64
to

Code: Select all

	/** Last slot usable for (New)GRFs used during the game. */
	LAST_GRF_SLOT  = 127,
	/** Maximum number of slots. */
	MAX_FILE_SLOTS = 128
in fios.h.

The issue as described was due to changing industry grfs in a running game. There was a red warning somewhere that hinted to the potential for issues. :wink:
Eyecandy Road Vehicles | Fake Subways | Supercheese's NewObjects

"Fashions and cultures change, but steam trains shall always be majestic."
-Professor Hershel Layton
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 35 guests