Screeps3D icon indicating copy to clipboard operation
Screeps3D copied to clipboard

Add rendering of all objects available from map view data

Open Robalian opened this issue 6 years ago • 9 comments

So far we have roads and dots.

  • [x] source keeper lairs
  • [x] sources - as full source
  • [x] minerals
    • [ ] change color based on mineral type
  • [ ] controllers
  • [x] power banks
  • [x] walls - max size

Robalian avatar Jul 04 '19 13:07 Robalian

currently some of those objects look different based on their contents:

  • walls differ in height
  • sources change size based on amount
  • controllers have control level
  • power banks are going to have power amount and hits indicators

should they have different models based on if they are in room view or map view? should they have some default values they are representing when they are in map view (always full source, walls with fixed size)?

Robalian avatar Jul 04 '19 13:07 Robalian

owned controllers don't show up - they are considered owned structure and show as player dot

Robalian avatar Jul 13 '19 14:07 Robalian

We could perhaps cache their values once you have visited a room so the last representation on mapview is either the cached version or the default?

thmsndk avatar Jul 13 '19 14:07 thmsndk

@Robalian An exception is thrown when you try to select a controller on the "mapview"

NullReferenceException: Object reference not set to an instance of an object
Screeps3D.Tools.Selection.Selection.ToggleSelection (Screeps3D.RoomObjects.RoomObject obj) (at Assets/Scripts/Screeps3D/Tools/Selection/Selection.cs:93)
Screeps3D.Tools.Selection.Selection.Update () (at Assets/Scripts/Screeps3D/Tools/Selection/Selection.cs:65)

thmsndk avatar Jul 14 '19 20:07 thmsndk

I used the same prefabs as for room objects. Turning off colliders for selection should fix it.

Robalian avatar Jul 15 '19 10:07 Robalian

🤔 I guess it does not really make sense to allow selection of objects we don't really have much information about. Will you fix it @Robalian ?

also what do you think about caching roomobject properties for the mapview so the representation is not always default?

thmsndk avatar Jul 15 '19 12:07 thmsndk

Yeah, I'll fix it.

I think in some cases having outdated values might look worse than having default values (source/power bank). In case of room controller we could get RCL from the same endpoint that official client is using for map view badges., and not rely on previously visiting a room. Same for minerals. I'm not sure about walls...

Robalian avatar Jul 15 '19 13:07 Robalian

i'm just thinking of the scenario of having just visited a room, and moving away from it, it will then "pop" a doodad/prefab that might look vastly different, e.g. walls and such we could always limit the cache duration I guess and make it variable dependant on object type. the idea of the "cache" in my head is kinda like a "fog of war"-ish thing, so you have a visual representation of what you saw there last time, I think that is how SC or WC3 handled FOW?

thmsndk avatar Jul 15 '19 13:07 thmsndk

Rob posted the following on slack, might be usefull for rendering owned controllers or extractors

actually... extractor and controller are the only owned structures that can be on a wall tile... and I think we get mineral position even if there is an extractor on it

thmsndk avatar Aug 28 '19 21:08 thmsndk