Is there an utility to have a full rendering of a map?
Moderator: Forum Moderators
Is there an utility to have a full rendering of a map?
Hi,
I'm currently thinking about writing a PHP-based map generator.
However, the first step before starting anything is to have some program that can render a wesnoth map and output it in a file (whatever the format: png, jpeg, bmp... it will be post-processed).
The idea is to offer a better tool than the built-in map generator. I have already written a good map generator in WML, but there is a lot of limitation.
Basicly, the map on the website will be stored in another format, that only store village, castle, forest, hill, mountain, river and sea. Then, you can render it for all the 4 seasons (and save it in wesnoth map format).
Any idea? Any pointer?
I'm a bit lost in the C++ source code, it looks a bit hard to isolate the map rendering process...
I'm currently thinking about writing a PHP-based map generator.
However, the first step before starting anything is to have some program that can render a wesnoth map and output it in a file (whatever the format: png, jpeg, bmp... it will be post-processed).
The idea is to offer a better tool than the built-in map generator. I have already written a good map generator in WML, but there is a lot of limitation.
Basicly, the map on the website will be stored in another format, that only store village, castle, forest, hill, mountain, river and sea. Then, you can render it for all the 4 seasons (and save it in wesnoth map format).
Any idea? Any pointer?
I'm a bit lost in the C++ source code, it looks a bit hard to isolate the map rendering process...
Re: Is there an utility to have a full rendering of a map?
You seem to be confusing the generation of maps with their rendering (processing terrain graphics to display the map). You may be looking for something like this (“a better tool than the built-in map generator”, “render it for all the 4 seasons (and save it in wesnoth map format)”), something like this (“map on the website”), or something like Wesnoth’s built-in whole-map screenshot feature (“render a wesnoth map and output it in a file”).
Re: Is there an utility to have a full rendering of a map?
Hi,
Despite the fact I'm not speaking english very well, I'm not confusing map generator with map rendering
While the renderer is not mandatory for a map generator, it is not very usefull if the user can't see the result immediately (so he can regen a random map again, until it looks fine).
I can easily handle the generator process, the map import and export, but I definitively cannot handle the rendering process (with terrain transition).
Thanks for the links!
Despite the fact I'm not speaking english very well, I'm not confusing map generator with map rendering
While the renderer is not mandatory for a map generator, it is not very usefull if the user can't see the result immediately (so he can regen a random map again, until it looks fine).
I can easily handle the generator process, the map import and export, but I definitively cannot handle the rendering process (with terrain transition).
Thanks for the links!
Re: Is there an utility to have a full rendering of a map?
Apologies for my misunderstanding. Perhaps the terrain rendering part of Wesnoth could (with difficulty, as you mention) be kludged into a standalone program, or a PHP library? (I freely admit having only the barest knowledge of the Wesnoth codebase, and none whatsoever of the part in question, and a similarly low knowledge of PHP.) Or perhaps you could integrate your generator into Ancestral’s Wesnoth Canvas renderer?
Edit: Or use the below-mentioned screenshot mode, which I searched for and quite overlooked.
Edit: Or use the below-mentioned screenshot mode, which I searched for and quite overlooked.
Re: Is there an utility to have a full rendering of a map?
The wesnoth executable has a screenshot mode (where it renders the map onto an offscreen surface and saves an image of it), but it seems to be broken in 1.11.
Re: Is there an utility to have a full rendering of a map?
Hi,
@8680:
I can't use Wesnoth Canvas, since I'm planning to do the rendering server-side (PHP, and eventually some exe). The browser will only have to display a plain image.
I was not aware of Pyrophorus's project, but it looks very close to the way I imagined to generate map.
@AI:
You mean you can invoke wesnoth with some command-line options and it output the screenshot? It's exactly what I was looking for! How does it work?
EDIT:
Okey, wesnoth --screenshot <mymap> <output> , thanks a lot!
I hope it will work again in 1.11
@8680:
I can't use Wesnoth Canvas, since I'm planning to do the rendering server-side (PHP, and eventually some exe). The browser will only have to display a plain image.
I was not aware of Pyrophorus's project, but it looks very close to the way I imagined to generate map.
@AI:
You mean you can invoke wesnoth with some command-line options and it output the screenshot? It's exactly what I was looking for! How does it work?
EDIT:
Okey, wesnoth --screenshot <mymap> <output> , thanks a lot!
I hope it will work again in 1.11
- pyrophorus
- Posts: 533
- Joined: December 1st, 2010, 12:54 pm
Re: Is there an utility to have a full rendering of a map?
Hello !
Friendly,
Can I ask you in which way ? Available options or algorithms ?Aramel wrote:Hi,
I was not aware of Pyrophorus's project, but it looks very close to the way I imagined to generate map.
Friendly,
HowTos: WML filtering, WML variables
Re: Is there an utility to have a full rendering of a map?
Hi!
I don't know for yours algorithms, but some ideas are similar, for example the variation of the same map with snow or desert.
Basicly, my generator use a lot of layer, they are computed (for instance) in this order:
- highmap
- river (the source start at a random hill or mountain hex, then it flows toward lower hexes and try to find a way to the sea or the border of the map)
- temperature map
- humidity map
- forest map (or vegetable)
- castle map
- village map
- roads map
ATM, it is still not as good as wesnoth's built-in generator, there are a lot a stuff to do to refine it.
My holidays are ending soon, so I don't know when I will finish it.
Also the generator + invoking Wesnoth on command line with the screenshot options use a lot of CPU, I don't know if this will be possible to use it as a SaaS.
I don't know for yours algorithms, but some ideas are similar, for example the variation of the same map with snow or desert.
Basicly, my generator use a lot of layer, they are computed (for instance) in this order:
- highmap
- river (the source start at a random hill or mountain hex, then it flows toward lower hexes and try to find a way to the sea or the border of the map)
- temperature map
- humidity map
- forest map (or vegetable)
- castle map
- village map
- roads map
ATM, it is still not as good as wesnoth's built-in generator, there are a lot a stuff to do to refine it.
My holidays are ending soon, so I don't know when I will finish it.
Also the generator + invoking Wesnoth on command line with the screenshot options use a lot of CPU, I don't know if this will be possible to use it as a SaaS.
- pyrophorus
- Posts: 533
- Joined: December 1st, 2010, 12:54 pm
Re: Is there an utility to have a full rendering of a map?
Hello !
AFAICS, there will be a lot of differences with mine, but anyway, I will always interested in discussing the topic in this thread or in mine.
Friendly,
AFAICS, there will be a lot of differences with mine, but anyway, I will always interested in discussing the topic in this thread or in mine.
Friendly,
HowTos: WML filtering, WML variables