News:

Simutrans Forum Archive
A complete record of the old Simutrans Forum.

[Bug] Regions do not support camera rotation

Started by Ranran(retired), February 01, 2021, 01:04:19 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ranran(retired)

The previously reported bug was a problem that the region information was "lost" when the camera was rotated, but this bug is different. (´・ω・`)

There are four camera angles, but only the default angle can display the correct region information. If you change to another direction, all regions will be replaced with default regions.
The region state is restored when the camera position returns to the initial state after rotating 4 times.

EDIT:
I've investigated this a bit, but the regional rotation algorithm is completely broken.

The coordinates of the regions before the map rotation in demo.sve are as follows.

Albion (0,0)-(256,256)
Northumberland (0,0)-(256,128)
Caledonia (0,0)-(256,64)
Cambria (0,89)-(64,166)
Kernow (0,166)-(51,256)
Erin (0,0)-(64,89)


The coordinates of each region according to the debug output when rotated once are as follows.


Albion (512,0)-(256,256)
Northumberland (512,0)-(384,256)
Caledonia (512,0)-(448,256)
Cambria (423,0)-(346,64)
Kernow (346,0)-(256,51)
Erin (512,0)-(423,64)


It should be noted that these coordinates represent the upper left and lower right.
The demo map is an elongated map with a width of only 31 tiles, but the region area is much wider than that.
32 or more of the x coordinate is outside the map area. That is, all regions are outside the map.
For example, Erin is the upper left area of the map and must contain (0,0)-(31,64) after rotation.
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)

Ranran(retired)

#1
I think I'm fortunate enough to have successfully fixed this bug.
I would appreciate it if you could check it.
https://github.com/Ranran-the-JuicyPork/simutrans-extended/tree/fix-region-rotation

EDIT:
However, if you have already rotated the map and the region information is corrupted, it will not be repaired automatically.
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)

jamespetts

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.