Screeps3D
Screeps3D copied to clipboard
Add rendering of all objects available from map view data
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
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)?
owned controllers don't show up - they are considered owned structure and show as player dot
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?
@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)
I used the same prefabs as for room objects. Turning off colliders for selection should fix it.
🤔 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?
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...
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?
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