I've been trying to finish up my lumber harvest script, and I realized I need a way to control the Biomes of a map so that the system would know where to spawn trees. I was thinking these would be handled with regions, but regions are made up of rectangles. Map biomes won't be rectangular and lacing rectangles together to make the actual bio shapes is not only tedious, but kind of ridiculous.
I'd like to be able to control biomes and regions on a map that is both generated (thinking of my map generator project), but also with existing maps. On a generated map this would be trivial since it has a regular graph like structure, but on hand drawn maps and stock maps that lack a structure there isn't a clean way to do it. I'd have to build an external tool to allow the definition of a region path, or shard admins would have to go around to each point in game and add it.
The other issue is that for generated maps, I need a good way for admin to get around in them. Since they won't know before hand what the map will look like, it would be good to have an ingame way of viewing a map. I now there was a project a while back that converted bmp format into gumps, but I think it was extremely inefficient.
At the moment, I'm looking at generating maps with just the outline of the continents to keep the gump size down. It's actually a really interesting problem. I've been experimenting with potrace which converts bmp to scalable vector graphics (svg). Since map mul files are just like big bmps, this seemed like a natural fit. But to be able to build up the gump I need to build a SVG renderer.
Anyway, here is my first attempt:
This could be added to a gump pixel by pixel. The gump would not have to hold every pixel in the image, just the outline which is black pixels. PoTrace doesn't do a bad job, but I have a feeling this kind of gump would have too many little images on it to be of any practical use.
The odd/out-of-place map shapes are likely due to the fact that I'm just using the wet tiledata flag and not checking the actual tile ids.
I'd like to be able to control biomes and regions on a map that is both generated (thinking of my map generator project), but also with existing maps. On a generated map this would be trivial since it has a regular graph like structure, but on hand drawn maps and stock maps that lack a structure there isn't a clean way to do it. I'd have to build an external tool to allow the definition of a region path, or shard admins would have to go around to each point in game and add it.
The other issue is that for generated maps, I need a good way for admin to get around in them. Since they won't know before hand what the map will look like, it would be good to have an ingame way of viewing a map. I now there was a project a while back that converted bmp format into gumps, but I think it was extremely inefficient.
At the moment, I'm looking at generating maps with just the outline of the continents to keep the gump size down. It's actually a really interesting problem. I've been experimenting with potrace which converts bmp to scalable vector graphics (svg). Since map mul files are just like big bmps, this seemed like a natural fit. But to be able to build up the gump I need to build a SVG renderer.
Anyway, here is my first attempt:
This could be added to a gump pixel by pixel. The gump would not have to hold every pixel in the image, just the outline which is black pixels. PoTrace doesn't do a bad job, but I have a feeling this kind of gump would have too many little images on it to be of any practical use.
The odd/out-of-place map shapes are likely due to the fact that I'm just using the wet tiledata flag and not checking the actual tile ids.
Last edited: