Openra: Show Trees on map previews (lobby) like on minimap (radar)

Created on 24 Sep 2016  路  7Comments  路  Source: OpenRA/OpenRA

Hey,
I noticed that map previews doesn't show trees comepared to the minimap.
Imagine missing informations on a map with alot negativ space, like a wooden maze.

This could be an easy fix, because it's already coded. But not used for the minimap previews.

Thanks!
screenshot 2016-09-24 18 00 08

Map Editor

Most helpful comment

The reason for this is that until recently the map previews were generated dynamically without having access to any of the actors on the map. We now generate the previews when saving the map from the editor, where we have that data, so this shouldn't be too hard to fix.

All 7 comments

The reason for this is that until recently the map previews were generated dynamically without having access to any of the actors on the map. We now generate the previews when saving the map from the editor, where we have that data, so this shouldn't be too hard to fix.

I'd like to work on this. It's my first task. What classes should I check? Thanks!

Hi @antoniomdk,
first of all, the change should be added here. You'll need a new Trait for it (which must be in OpenRA.Game) to check which actors should be drawn as well as which color should be used. One problem is that you have to get the footprint of the actor (in order to draw the size of it on the map, not just a point), which could be solved by moving Footprint to OpenRA.Game.
Note that this would be my way to draw actors on the map preview and it is probably not entirely correct :).

If you have any further questions, you can of course join our IRC channel #OpenRA (link to wiki).

Another option would be to create an interface in the Game namespace implemented by a (strictly-editor?) trait in Mods.Common which would cache the cell content into a layer for rendering.

We already have that in a sense for the map editor. The most sensible option would be to refactor that code to work more generally -- it doesn't necessarily need to live in the Game namespace, and ideally shouldn't.

Ok, I'm going to understand how traits and traitinfo really work. Then, I will start to create the trait mentioned by @abc013

This is fixed on bleed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

FRenzy-OpenRA picture FRenzy-OpenRA  路  4Comments

drunsinn picture drunsinn  路  4Comments

TheMightyAltroll picture TheMightyAltroll  路  3Comments

JustSomeDev1 picture JustSomeDev1  路  4Comments

dnqbob picture dnqbob  路  3Comments