Author Topic: Converting Bitmap Images to Map Terrain [PRPL]  (Read 626 times)


  • Community Guild
  • *****
  • Posts: 1101
  • Just Breathe
Converting Bitmap Images to Map Terrain [PRPL]
« on: April 09, 2017, 10:30:06 am »
This is a follow up from this thread:
Converting bitmap images to map terrain

The original Code is from Willbir, but Stickman and myself made a PRPL version of this Script.
You can also set start coords. [meaning the SouthWest corner of Image]

The Script is originally made for CW3 so it's set to 10 land heights. In this version the land is set to 5 land heights.
You will notice that the image is fully made of land -> if you want more space between the image you should change in this line:

h= Math.floor((0.299*r + 0.587*g + 0.114*b)/51.2);
The 51.2 to 26.1 to set it to 10 land height and then the 5 landheights wich are not available will be space. [see my Happy Porc map for example]

For My Maps and Ships!