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

User avatar
HackaLittleBit
Director
Director
Posts: 550
Joined: 10 Dec 2008 16:08
Location: tile 0x0000

Re: New map features

Post by HackaLittleBit »

HackaLittleBit wrote: TODO:
Position ships according to dock position. (depends on angle of arrival)
Better integration in pathfinder.
Lots of testing.
All done.
The big difference is that v->dest_tile is now the tile were the actual loading takes place, and not anymore the index of the station.
I am not able to crash the game.
Side effect is that traincontroller and yapf are a bit more efficient.

Please test this.
If this is stable we can add whistles and bells.:-)
Attachments
Cirdan-shipdocking-v-dest_tile_26118.patch
(4.03 KiB) Downloaded 60 times
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: New map features

Post by wallyweb »

HackaLittleBit wrote:
HackaLittleBit wrote: TODO:
Position ships according to dock position. (depends on angle of arrival)
Better integration in pathfinder.
Lots of testing.
All done.
The big difference is that v->dest_tile is now the tile were the actual loading takes place, and not anymore the index of the station.
I am not able to crash the game.
Side effect is that traincontroller and yapf are a bit more efficient.

Please test this.
If this is stable we can add whistles and bells.:-)
A quick question ... Would it be safe to use your ship movement patch with this?
User avatar
HackaLittleBit
Director
Director
Posts: 550
Joined: 10 Dec 2008 16:08
Location: tile 0x0000

Re: New map features

Post by HackaLittleBit »

Safe yes but I want to sort out this one first.
It has to work flawless.
Hold on a sec in a couple of min I will post patch to fix OPF (old path finder)

EDIT
See below patch...
Apply on top of previous
Not very well tested though
Attachments
Cirdan_26119_Fix_OPF.patch
(931 Bytes) Downloaded 68 times
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: New map features

Post by wallyweb »

Got it.
1. Apply and test the docking and fixOPF patches.
2. If they are good, apply the movement patch.
Then I can use my channel objects to guide the ships into the harbour in an orderly manner.

Today is laundry day. I'll be working on these between washes.
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: New map features

Post by wallyweb »

Test Report

The patched binary:
OpenTTD-NMF-HALB-2-g30353e06M-Win32.7z
Windows 32bit
(5.74 MiB) Downloaded 60 times
The save game:
Dock Test, Jul 15th, 1951.sav
(12.36 KiB) Downloaded 66 times
Three coal ports (East, South, West) with 2 docks each and each served by 8 ships (Total 24)
One power plant port (North) with 3 docks

No buoys
No channel guides.
No GRFs

Going to a free dock does occur but it is inconsistent.
xarick
Transport Coordinator
Transport Coordinator
Posts: 336
Joined: 26 Feb 2015 00:52

Re: New map features

Post by xarick »

Attachment:
File comment: Windows 32bit
OpenTTD-NMF-HALB-2-g30353e06M-Win32.7z [5.74 MiB]
Downloaded 1 time
---------------------------
Error!
---------------------------
Assertion failed at line 709 of C:/MinGW/msys/1.0/home/Wall/0_NMF/1_compile/fttd/src/newgrf_text.cpp: _grf_text[stringid].grfid != 0
---------------------------
OK
---------------------------

Got a weird crash, also it has the right click scrolling issue.
Formerly known as Samu
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: New map features

Post by wallyweb »

xarick wrote: ---------------------------
Error!
---------------------------
Assertion failed at line 709 of C:/MinGW/msys/1.0/home/Wall/0_NMF/1_compile/fttd/src/newgrf_text.cpp: _grf_text[stringid].grfid != 0
---------------------------
OK
---------------------------

Got a weird crash, also it has the right click scrolling issue.
To whoever is able to troubleshoot this, the .7z is a bundle and should contain the SRCs.
User avatar
HackaLittleBit
Director
Director
Posts: 550
Joined: 10 Dec 2008 16:08
Location: tile 0x0000

Re: New map features

Post by HackaLittleBit »

wallyweb wrote: Going to a free dock does occur but it is inconsistent.
Put buoys!!
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: New map features

Post by wallyweb »

HackaLittleBit wrote:Put buoys!!
:lol:
Yes Captain! Buoys away! 8)
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: New map features

Post by wallyweb »

Test Report #2

New save game:
Dock Test, Jan 3rd, 1952.sav
With buoys
(12.91 KiB) Downloaded 66 times
Observations:
Added a buoy just off each harbour.
What happens is ship turns towards an empty dock.
When a second ship arrives and that dock is still empty, it will follow the ship ahead of it.
Is it possible to have a ship, instead of checking if a dock is occupied by another ship, have it check if a dock is selected/reserved by another ship?
Or, if the ship ahead arrives and occupies a dock, can the following ship change its selection to the next free dock?
Or, can a ship recheck availability on each tic and then change selection if needed?
At how many tiles away from the docks does a ship check if the dock is occupied?
TrueSatan
Transport Coordinator
Transport Coordinator
Posts: 291
Joined: 16 Jul 2003 18:33

Re: New map features

Post by TrueSatan »

HackaLittleBit wrote:
wallyweb wrote: Going to a free dock does occur but it is inconsistent.
Put buoys!!
Am I allowed to but Hack onto those buoys?
If enough ships hit him, he maybe will try an approach
without them lol
Just kidding, I don't like to but buoys, but I'll guess I have
to life with them *sigh*

Sorry had no time to fool around with the new patches,
will try to compile the linux version l8er

but it sounds nice, if those ships now would move without overlaying each other then ships would be
sooooo nice and useful.

Cheers
notafrog
Engineer
Engineer
Posts: 14
Joined: 13 May 2014 17:43

Re: New map features

Post by notafrog »

cirdan wrote:
notafrog wrote:bla bla grump grump stations over standard station platforms only.
The code did not change as such. My master branch only ever allowed bridges over the standard stations, but at some time I did post this patch that would lift this restriction and allow bridges also over custom stations. Perhaps you were playing with a version that had this patch applied? The patch should still apply cleanly, but ping me if it does not.
I'm afraid my attempts at patching have never been successful.
To be honest none of the versions since that patch seem to address any issues that affect my style of playing, so I'll just go back to using the old one.

Having said that, is there any reason it wasn't made a permanent feature? I've been using that patch for nearly two years and it works just great.
Sometimes bits of certain stations protrude through but that's an in-game engineering challenge.
User avatar
HackaLittleBit
Director
Director
Posts: 550
Joined: 10 Dec 2008 16:08
Location: tile 0x0000

Re: New map features

Post by HackaLittleBit »

wallyweb wrote:but it sounds nice, if those ships now would move without overlaying each other then ships would be
sooooo nice and useful.
Patience. :)
wallyweb wrote:Observations:
Added a buoy just off each harbour.
What happens is ship turns towards an empty dock.
When a second ship arrives and that dock is still empty, it will follow the ship ahead of it.
Is it possible to have a ship, instead of checking if a dock is occupied by another ship, have it check if a dock is selected/reserved by another ship?
Or, if the ship ahead arrives and occupies a dock, can the following ship change its selection to the next free dock?
Or, can a ship recheck availability on each tic and then change selection if needed?
At how many tiles away from the docks does a ship check if the dock is occupied?
I think most of your wishes are met.

Att start new game!!

EDIT
I took savegame away because it crashed. with this new patch.
You have to start new game if messed with previous patches.
Old savegames should load without problems.
Now reservations are saved in savegame.
Attachments
dock_reservations_26118SL.patch
Start new game!!
(6.15 KiB) Downloaded 65 times
Last edited by HackaLittleBit on 14 Feb 2018 08:06, edited 3 times in total.
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: New map features

Post by wallyweb »

HackaLittleBit wrote:I think most of your wishes are met.
I have a present for you in Conninghall 8)
see savegame

Reservations are not(yet) saved in savegames.
Will your savegame need the patch below it?

Do I add that patch as a third patch to the other two?
:D
User avatar
HackaLittleBit
Director
Director
Posts: 550
Joined: 10 Dec 2008 16:08
Location: tile 0x0000

Re: New map features

Post by HackaLittleBit »

HackaLittleBit wrote:Will your savegame need the patch below it? Yes

Do I add that patch as a third patch to the other two? No


Just kidding No it a complete rewrite. Different philosophy.
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: New map features

Post by wallyweb »

Ok. I'll be compiling after my supper. Should have a report in a couple of hours. :D
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: New map features

Post by wallyweb »

Test Report #3
OpenTTD-NMF-HALB-3-g30353e06M-Win32.7z
New Windows 32bit binary
(5.74 MiB) Downloaded 56 times
HackaLittleBit wrote:Different philosophy.
Observations:
Using your savegame. 8)
Lots of buoys for TrueSatan. :twisted:

I see two docking buoys:
- One has the town of Conninghall in its catchment area and functions as a normal station.
- The other is a part of the 5 Docks Station serving the town of Menfingborough where the four normal docks have the town in their catchment area, but the docking buoy has nothing in its catchment area. Navigation buoys draw the ships to the docking buoy where the ships hold until one of the four regular docks is available. (interesting to see the waiting ships' speeds oscillating :wink: ).

There is also the town of Londworth with a 4 dock station, but traffic is low enough that a docking buoy is not needed.

Seems to work. :D

Tomorrow morning I'm going to try a game with my (about to be released) channels GRF. Should be interesting. 8)
TrueSatan
Transport Coordinator
Transport Coordinator
Posts: 291
Joined: 16 Jul 2003 18:33

Re: New map features

Post by TrueSatan »

Wah instead of roses I got buoys for valentines day.
man they must hate me :DDDDD
And damn no time to compile currently. Bloody work lol

Will try the new patch then maybe tonight.

Cheers
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: New map features

Post by wallyweb »

TrueSatan wrote:Wah instead of roses I got buoys for valentines day.
Maybe Hackalittlebit or cirdan can code heart shaped buoys with pink frosting and filled with chocolate. :lol:
TrueSatan
Transport Coordinator
Transport Coordinator
Posts: 291
Joined: 16 Jul 2003 18:33

Re: New map features

Post by TrueSatan »

wallyweb wrote:
TrueSatan wrote:Wah instead of roses I got buoys for valentines day.
Maybe Hackalittlebit or cirdan can code heart shaped buoys with pink frosting and filled with chocolate. :lol:
Well I guess I'll pass :D
Then don't need to code anything for me lol

Hurry I found some time to compile the different approach (with even more buoys)
So without any warranty here is the ubuntu 16.04 64 bit special buoys valentines edition edition.

Thanks hack for your work :)

Edit: Well to bad it crashes all my tracerestricted save before the patch,
only new games works. was different with the other approach.
anyway... looks interesting how those ships are waiting on the
dock buoy (that’s something I used before, because for
some harbour newgrf you need those buoys).
I like it so far.
Now it needs to be compatible to my old saves and all is good :D


Cheers
Attachments
openttd-custom-g5f20fe4eM-tracerestrict-cirdan-UNIX.tar.xz
Version: g5f20fe4eM-tracerestrict-cirdan-dock-reservation
Ubuntu 16.04 64bit
(4.66 MiB) Downloaded 64 times
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 9 guests