Resizing a map in the editor can mess up the map design

Having trouble with the game? Report issues and get help here. Read this first!

Moderator: Forum Moderators

Forum rules
Before reporting issues in this section, you must read the following topic:
Post Reply
blob
Posts: 22
Joined: January 17th, 2009, 12:33 pm

Resizing a map in the editor can mess up the map design

Post by blob »

I found a problem with the editor (v1.8.2) which probably is unavoidable due to the way Wesnoth handles maps.

If you resize a map on the x-axis and put the anchor on the right side, i.e. expanding the map to the left or shrinking it on the left, then the map gets completely messed up IF you resize by an odd amount of tiles. The reason for this is that the tile (1,0) is always north-east to the tile (0,0). When you strip away the left-most column of the map, for example, which I assume is internally stored in a simple two-dimensional cartesian array, then the new (1,0) (old: 2,0) should now be to the south-east of the new (0,0) (old: 1,0). Given that Wesnoth doesn't do that, every even column is now shifted vertically compared to its original, messing up the original map design.
Original map (60x35)
Original map (60x35)
Resized map (59x35), anchor: right
Resized map (59x35), anchor: right
Similarily, if you resize the map on the x-axis and put the anchor in the middle, i.e. expanding or shrinking to both sides equally, this seems to only work when resizing by an integer multiple of 4. Other cases mess up the map as well.

I assume this is unavoidable, but it might be a good idea to place a message in the resize window informing the user when resizing the map with the current settings would cause such a problem, like this:
Proposed warning
Proposed warning
The Cost Of Living (1.8): main thread, feedback thread
Max
Posts: 1449
Joined: April 13th, 2008, 12:41 am

Re: Resizing a map in the editor can mess up the map design

Post by Max »

http://www.wesnoth.org/forum/viewtopic.php?f=4&t=29014

you might want to file a bug report (feature request for the warning message) so it wont be forgotten:
http://wiki.wesnoth.org/ReportingBugs
Post Reply