Latest Posts

Topic: importing image possible?

aLajos
Avatar
Joined: 2018-05-19, 14:20
Posts: 1
Ranking
Just found this site
Posted at: 2018-11-04, 16:49

I have a rather large seafaring map in mind and creating it grid by grid seems to be quite a pain. Can I somehow import a bit-mapped or vectorized image, that contains the outlines of the landmasses, into the map editor for expediency? If yes, how will I do it?

Thx for your help in advance.


Top Quote
einstein13
Avatar
Joined: 2013-07-29, 00:01
Posts: 1021
Ranking
One Elder of Players
Location: Poland
Posted at: 2018-11-04, 22:56

As far as I understand the problem, the upload can't be 1 to 1. The reason is that the Widelands map is triangle shaped, and bitmaps are square shapes. Of course, there is a "simple" function that can translate one dimension to other one, but it will change the shape a bit. Also you can develop another function that will preserve shape, but will not preserve areas.

But if you don't care about details (really, details!), you can ask Tibor for a script. He generated some maps with a script, but I am not sure what the script was doing inside. As far as I remember, it was generating lands and oceans by some initial conditions and translated result to Widelands map. Your idea is different in only one point: you don't generate map, but open a file with existing idea.

But to be honest, if you search for maps in "maps" section, you will see many maps with high details. It takes some hours to make one, but it is possible. And some of the maps are designed tail-by-tail. Examples:

And some maps are well-detailed, but not done tail-by-tail (my two maps here):


einstein13
calculations & maps packages: http://wuatek.no-ip.org/~rak/widelands/

Top Quote
kaputtnik
Avatar
Joined: 2013-02-18, 20:48
Posts: 1523
Ranking
One Elder of Players
Location: Germany
Posted at: 2018-11-05, 08:07

Hi aLajos and welcome to the forums face-smile.png

I have missed such a feature also. Unfortunately this isn't possible. There is a bug report adding the possibility to mirror a map and here in the forum is also a thread discussing similar things, but i couldn't find it at the moment.


Top Quote
Tibor
Joined: 2009-03-23, 23:24
Posts: 1185
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2018-11-05, 08:30

Well I had a script (probably still have) that uses LUA interface to set height on coordinates, but all other had to be coded depending on your input. I must admit I ignored triangle shaped grid altogether...

The advantage was that the scale of input did not needed to be the same as scale of map, everything was recalculated to the scale of map.

Or if you are not talking about height, you can use similar script to set terrains. But again scripting capabilities are needed.


Top Quote
einstein13
Avatar
Joined: 2013-07-29, 00:01
Posts: 1021
Ranking
One Elder of Players
Location: Poland
Posted at: 2018-11-05, 15:46

There was a thread about rotating the map:

https://wl.widelands.org/forum/topic/1634/

But the thread contains lots of old, not working links. And if you know something about math, you can stick to some part of discussion and see what is the major problem of 1 to 1 rotation of the same part of terrain.


einstein13
calculations & maps packages: http://wuatek.no-ip.org/~rak/widelands/

Top Quote