Map Visuals

  • It would be nice if we could pass a persistence option to visuals. Rather than having to draw stuff every tick, an option that says "draw the same thing for the next x ticks" would be great. It'd allow much more complex visuals without overhead.

    For example: I could draw a status of every room on the map based on scouting info. It'd be great for me to see what's going on at a glance. I'm probably not going to do it, and certainly not always on, because it's just too much CPU to run every tick. On the other hand, the data does not go stale quickly. Updating it once every 100 ticks would be more than sufficient for me.

    I'm not sure how visuals are implemented. The server tells the client something. I don't think it'd be too hard for the client to track persistence - wouldn't add server load and the 100kb limit could still be per-tick (ie. persisting visuals don't count).


  • Looks like the options for make it invisible if you only put in a position and size of width and length. I have to put in {stroke: '#ffffff'} in order to see it.

  • @tigga said in Map Visuals:

    It would be nice if we could pass a persistence option to visuals

    For map visuals this makes so much sense. They're often very expensive to generate, and they change infrequently.

    This mechanism would be somewhat useful for room visuals, but it seems critical for map visuals.

  • Dev Team

    @tigga This would be a nice addition, however it requires major refactor of how visuals data is stored on the backend, both room and map, they reuse the same storage. We recommend you to generate them only when needed and store in memory. Rendering itself ( methods) is not very CPU-consuming part, it simply makes a bunch of JSON.stringify.

  • Someone on slack pointed out the console.addVisual function, which would help a bit if it was "official" as it would allow doing as you suggest: you'd be able to save the object on heap and just pay serialize cost. Would be even nicer if we could just pass a serialized version ourselves 😉

    Without that you've got to recreate the object every tick. That's going to be expensive using the API calls for extensive visuals.

  • Dev Team

    @tigga Maybe one approach could be implementing two new methods returning a JSON strings block with currently constructed visuals and Do you think this will solve your issue?


  • @artch Yes - that'd be great!

  • Dev Team

    @tigga It's deployed to the official server.


  • Just wanted to let you guys know that map visuals are absolutely amazing. My map visuals can provide an instant overview about what is happening in my empire. It is absolutely game changing.

    Thank you for implementing it!

  • Map visuals are great. However, one has failed to locate a facility for enabling the map visuals permanently in the steam client. The map visuals are disabled again, once one enters the room and returns to the world map by perusing the "World" button.