Have a map preview in the starting screen/map selection
Bug #892861 reported by
Kyromaster
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
widelands |
Won't Fix
|
Wishlist
|
Unassigned |
Bug Description
Currently, there's no visual representation of the map, only text information.
For some future version it would be nice to have a kind of "preview" when you choose a map so especially beginners can see the terrain.
To post a comment you must log in.
I am actually thinking about this currently. Here is rundown of the current situation:
1) In game, minimaps (which are basically map previews) are calculated from the Map class inside the game. There is no way to render a minimap to a surface for saving AFAIK (not sure about this).
2) On the website the map previews are generated with a small python library, that essentially understands the map format and generates a minimap from the textures/graphics in the widelands repository. This is suboptimal as it reimplements quite a lot of functionality from the game again in python.
These are the solutions I see:
1) Render a minimap when selecting a map from the data. This means parsing the whole map and going to town. This might make for a considerable delay in showing the preview image.
2) Render the minimap in the editor when saving as part of the map packages and save it as an image in the map. The problem is that this image is than basically fixed. It might be desirable to allow various map previews, e.g. one with player starting position, one without, one with resources distribution and so on. This is basically impossible with this approach.
Note that for the website it would be nice to have the minimap functionality in a library that could be used from python directly. But for this, widelands would need to be split into shared libraries and linked accordingly. This will likely not happen soon as our code is quite monolitic as is.