Ability to draw visuals on the map view (not just room view)



  • It's possible to draw visuals that are displayed when you view a particular room, but it would also be useful to be able to draw visuals that are overlaid over the map view. Some possibilities for things players could implement with this feature:

    1. draw out a long creep path (attack route) that stretches across multiple rooms

    2. mark out the territory of enemies/friends

    3. make custom "minerals/energy harvested etc" views - e.g. that show the number of energy sources in each room

    4. show portal connections on the map view by drawing a line between connected portals

    5. map overlay to show which enemy rooms are in range of nukes, how many nukes they're in range of, and which of your nukes are on cooldown.

    6. map overlay to sketch approximate borders around players' or alliances' empires ...

    👍


    1. show portal connections on the map view by drawing a line between connected portals

    ...

    👍


  • So basically map.visuals?
    And you feed it room positions?

    Could really be interesting.



  • I would propose a co-ordinate system similar to the one used in the map view urls, where E0S0 is 0,0, and it increments by 1 for each room. One tile in a room would therefore be 1/50th or 0.02. Or perhaps E0S0 starts at 0,0 then it increments by 1 for each tile in a room, so E1S0 would be 50,0.

    👍


  • So negative values would be allowed then.
    Yeah that would work too and integers are far easier to handle.



  • I wholeheartedly support this idea!



  • @wtfrank honestly I think it's easier to keep working with RoomPosition.

    Since they already include x, y and roomName they are mappable 1:1 to squares in the map view.



  • @keenathar yes easier but not really efficient since it is a object that takes time to parse making it a int saves a lot of time.



  • @mrfaul @wtfrank strings as map coordinates have the advantage of being always accurate. Using floating point arithmetic for that purpose will introduce rounding errors. Especially because 0.02 has no finite binary and therefore no exact IEEE-754 representation.

    ✌

  • TMB

    I'd favor rooms having their own int coordinate systems.



  • Regardless of implementation, this suggestion seems to be popular. I haven't seen anyone protest.

    I'm really hoping for an official reply from the devs 🙂



    1. map overlay to show which enemy rooms are in range of nukes, how many nukes they're in range of, and whether your nukes are on cooldown.


  • I think it would be great to have a map visuals API. Since there isn't one yet, to be able to see the intel my scouts collect, I created this: https://github.com/eduter/render-intel-map

    It has 3 out of the box and 2 and 5 would not be difficult to implement, using the callbacks. 1 and 4 would be more difficult, because everything is, currently, rendered per room and those would require visuals starting in one room and ending in another. A PR to fix that would be welcome 🙂

    🖖


    1. map overlay to sketch approximate borders around players' or alliances' empires