No use of ships on this map even if there is a use

Bug #1503846 reported by kaputtnik
This bug report is a duplicate of:  Bug #1507923: Seafaring check doesn't work. Edit Remove
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Invalid
Undecided
Unassigned

Bug Description

While playtesting new terrains i run into this:

A shipwright says "No use of ships in this map" even if there is always a ship and a second port is build. In result the shipwright do not start to build a new ship.

I stopped the shipwright after the first ship was build.
There is an unused portspace on the map.

I couldn't actually provide a savegame, because the new terrain isn't be a part of current trunk. But see attached screenshot for an example.

Version bzr7542

Tags: seafaring
Revision history for this message
kaputtnik (franku) wrote :
kaputtnik (franku)
tags: added: seafearing
tags: added: seafaring
removed: seafearing
Revision history for this message
Jens Beyer (qcumber-some) wrote :

Probably a map specific problem. I guess the name of the map would help here :-)

Revision history for this message
kaputtnik (franku) wrote :

I've created a new map for testing the terrain, so telling the name of the map wouldn't help ;)

But, ok, maybe describing the map would help: The map contains only one lake with two ports on the opposite and one port on an island. There is only one player. I don't know if there is an existing map with this conditions.

It's quite confusing that one ship and two ports could be build but no ship further. Maybe this is a side effect from the last changes of ship transportation: https://code.launchpad.net/~widelands-dev/widelands/ship_scheduling ?

Revision history for this message
GunChleoc (gunchleoc) wrote :

The function here is Map::allows_seafaring() - the map needs to have at least 2 ports that are reachable from each other. So, my guess is that this function can't find a route for a ship to navigate between the two ports.

Revision history for this message
kaputtnik (franku) wrote :

Just to make it clear:

- i build a port and a ship
- starts an expedition
- reach new port space and build a port here

So the second port must be reachable.

Hmm, i will try to confirm this with a map on current trunk :-)

Revision history for this message
kaputtnik (franku) wrote :

Now i created a similar map (two ports in opposite of a lake) with trunk and playtested this map. The result is quite confusing:

As close the shipwright want to build a ship, the gamespeed (fps) slows down extremely (best to see if you set gamespeed to 3x or 4x). I assume this happens if the gameengine notices "No use for ships on this map". The attached savegame is made just before the shipwright is ready for work. Load it, increase game speed, wait until the worker arrives in the shipwright -> a few seconds later the fps gets down.

The second attachment is the map. Maybe i miss something, but there are two ports on this map and they should be reachable.

Revision history for this message
kaputtnik (franku) wrote :
  • map Edit (8.1 KiB, application/octet-stream)
Revision history for this message
kaputtnik (franku) wrote :

Ok, after plenty of tests it seems that one port couldn't be reached by a ship. Don't know how this could happen during a game...

But the bug of drastic decreasing gamespeed if a shipwright/shipyard gets noticed of "no use for ships on this map" nevertheless exist. If this happens the shipwright gets in an infinite loop, i think. So even reducing the number of wares in a shipwright do not work anymore. After starting dismantling the shipwright the fps gets normal again. Should i make another bug report for this issue?

Revision history for this message
Jens Beyer (qcumber-some) wrote :

Performance issue split out to bug 1504948

Revision history for this message
Jens Beyer (qcumber-some) wrote :

I guess this is now invalid? If not, please reopen :-)

Changed in widelands:
status: New → Invalid
Revision history for this message
kaputtnik (franku) wrote :

We will see if your changes are merged.I've made several tests and ran sometimes into the situation where one ship could be build but starting building the second port the shipwright stops building ships -> "No use for ships on this map". I'am very confused about this. So the main bug description is further valid.

Thanks for your work :-)

Revision history for this message
Jens Beyer (qcumber-some) wrote :

I guess this bug was valid. Bug 1507923 shows more info, we can leave this bug closed as duplicate.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.