News:

Want to praise Simutrans?
Your feedback is important for us ;D.

[11.10] [pak.german-exp.20382] Map rotates after autosave

Started by hnz_kkk, September 09, 2013, 01:11:17 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

hnz_kkk

On latest version in latest pak.german-exp.20382, on every autosave the map rotates. Strangely, I've noticed it happen only for one of the four rotation angles (I don't know how to describe which one is it).

Map size: 896x768... can add save if required.

Sarlock

Can't recreate on pak.Britain-Ex.  Not sure why it would be specific to pak.german-exp.20382 but I tested pak.Britain-Ex and no issues over two full rotations, saving, closing program and reloading after each rotation.  Tried on a 256x256 map, perhaps map size matters.

Save game and pakset would probably be helpful for James.
Current projects: Pak128 Trees, blender graphics

hnz_kkk

OK, zipped pak.german here:

http://212.4.152.218/MYWeb/ftp_root/_space/pak.german-exp.20382.zip

And savegame:

http://212.4.152.218/MYWeb/ftp_root/_space/jenik.sve

Also, this is only related to autosave. The rotation itself is very weird, with graphics of rails being distorted and getting to normal over next few seconds.

Vladki

I have experienced the same bug with pak128 standard. But i don't remember the versions and the game is over. I think it might have been fixed in standard already, as I dont see this bug any more.

jamespetts

Thank you for the report - shall have to investigate. If any of the Standard developers know this to have been a Standard bug now fixed, I should be extremely grateful if anyone could point me in the right direction for the fix so that I can find it in the Standard code and apply it.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

prissi

Standard once did not cope with factories with has an empty tile (0,0) by rotation, so it rotates the map into a rotation where (0,0) is not empty. Standard however rotated it back and I think Dwachs also submitted code to make sure it can cope with empty (0,0) tiles; I would however still suggest to avoid these.

In pak64.german there was once an empty L-shape coal mine which got then an extra pile for the left out corner.

hnz_kkk

Quote from: prissi on September 10, 2013, 10:17:31 AM
Standard once did not cope with factories with has an empty tile (0,0) by rotation, so it rotates the map into a rotation where (0,0) is not empty. Standard however rotated it back and I think Dwachs also submitted code to make sure it can cope with empty (0,0) tiles; I would however still suggest to avoid these.

In pak64.german there was once an empty L-shape coal mine which got then an extra pile for the left out corner.

Thanks for reply, interesting explanation. Should I investigate if this happens only on screens with factories in them? Also, what properties should these factories have, as I don't quite understand "has an empty tile (0,0) by rotation" - there are some buildings which miss a tile by some rotation angles, however the rotation problem happens on Sawmills, Paper mills, which visually are complete... Could try to trace this problem if you give me a hint how.

prissi

It does not depend whether a factory is visible or not. It just depends on its existence on the map. The fatory most likely causing this are coal mines with an L shape. There is one rotation, which has no (0,0) tile.

hnz_kkk

Quote from: prissi on September 23, 2013, 01:01:47 PM
It does not depend whether a factory is visible or not. It just depends on its existence on the map. The fatory most likely causing this are coal mines with an L shape. There is one rotation, which has no (0,0) tile.

The only coal mine on the map is attached below. There is no other mine type even in the "Build industries" function.

prissi

I think there was also a farm or wineyard, which were asymmetric.

hnz_kkk

Quote from: prissi on September 23, 2013, 10:18:55 PM
I think there was also a farm or wineyard, which were asymmetric.

Oh yeah, there are some very strange farms with missing pieces on every rotation angle. Is this the problem, possibly? Attached below...

Dwachs

These placeholder images are there to prevent the situation prissi described. They should not cause any problems.

You should look for L-shaped factories, where there are empty corners like in

FF
F.

F = factory tile, . = non-factory tile (click does not open factory window)
Parsley, sage, rosemary, and maggikraut.

prissi

There could be also an addon, which has only a 2x1 shape and is only single rotation. In such a case the map will also rotate. The standard pak64.german did not include such buildings, but I am not sure about pak64.experimetnal.

hnz_kkk

Quote from: prissi on September 25, 2013, 01:34:50 PM
There could be also an addon, which has only a 2x1 shape and is only single rotation. In such a case the map will also rotate. The standard pak64.german did not include such buildings, but I am not sure about pak64.experimetnal.

Seems to be an object called Bauernhof, which has a tile missing in the corner. Once removed, the rotation after autosave stops. I'm including a screenshot - red markings are factory tiles, blue is empty (probably the corner one).

There are empty spaces on some rotations and it even says "Not possible in this rotation" when I try to remove it from the map.

So that's it I suppose - what action do you recommend now?

prissi

I guess simutrans-experimental may not have merged the code dealing with this from standard completely.

jamespetts

Quote from: prissi on September 25, 2013, 10:34:02 PM
I guess simutrans-experimental may not have merged the code dealing with this from standard completely.

Hmm - may I ask in which commit (a date would be helpful, or date range with phrases from the commit message) I can find this code to try to deal with this? I should be very grateful.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

prissi

Any commits targeting gebaeude.cc. That should not be too many. (This commit will then also target simfab.cc at the same time. I think this was more than 1 1/2 year ago, when Knightly was still active. The actual patch came from Dwachs, imho.)