[REL] The UberMap

Discussion in 'Released Mods' started by cola_colin, May 17, 2015.

  1. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,125
    Likes Received:
    16,255
    I am talking about this:
    A result of the unit state query with one unit opened to see the orders. All other units have the same order, each with a copy of this array:
    [​IMG]
    Each single unit has that full array of all other units. So n^2 elements.
    Make n 500 or more and it'll take a while to process multiple hundred thousand elements.
    It's only IDs, but from how the performance reacts I am pretty sure there is some code in a perf critical position that iterates all these arrays one by one, effective iterating n^2 elements. When n is above 200-300 it starts to become problematic.

    Not to mention the player might give multiple orders to the group using shift. Each of them again will result in n^2 elements added.

    Thanks!
    Last edited: August 24, 2015
  2. pinbender

    pinbender Active Member

    Messages:
    78
    Likes Received:
    137
    Yes, I caught what you were talking about. I wouldn't expect serialization of 250,000 numbers to take more than about 10-20ms, though. That's definitely more than 0ms, so if you're doing it more than 1Hz, it will definitely cause some problems. (It's also possible that I'm being too optimistic about the performance of our serialization layers, of course.)
    cola_colin likes this.
  3. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,125
    Likes Received:
    16,255
    That's it yeah ;) I'd say 10-20 ms is a little optimistic, especially since players tend to queue up orders.
    So even in the very optimistic case of 10ms it would be 10ms per waypoint more than once per second in a place that blocks rendering.

    Apart from this, after now actually having done performance tests on this API, I am happy with performance of the API though. The moment units are given large group order it really massively breaks down. Day and Night.
    The update I did to the ubermap tries to "fix" that by making lots of smaller requests and spreading them over time. So it's lots of small micro lags instead of one or two big impacts.

    So yeah: I think I got it "Playable" for now, though certainly looking forward to you getting through all the release hotfixes and afterwards taking care of this :)
    Last edited: August 24, 2015
  4. netpyxa

    netpyxa Active Member

    Messages:
    118
    Likes Received:
    37
    My performance seems to have improved. I have no problem playing the games like 3v3.
    cola_colin likes this.
  5. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,125
    Likes Received:
    16,255
    Considering the talk above that makes me very happy.
  6. xankar

    xankar Well-Known Member

    Messages:
    753
    Likes Received:
    998
    So I just started using this mod and would like to give a bit of appreciation for this mod, really helps me manage everything going and and what I have. Thanks a bunch!
    philoscience and cola_colin like this.
  7. Quitch

    Quitch Post Master General

    Messages:
    5,077
    Likes Received:
    5,853
    Any chance of being able to relocate the map? I've love to use this for casting, but it sits right underneath the spectator panel which is something that must be expanded.
    tracert likes this.
  8. tatsujb

    tatsujb Post Master General

    Messages:
    12,981
    Likes Received:
    5,424
    at one point there was a mod that allowed you to move any other ui mods around. we should patch that up if it is broken.
  9. Quitch

    Quitch Post Master General

    Messages:
    5,077
    Likes Received:
    5,853
    I've been getting some pa.exe crashes when using this mod which I don't get when it's disabled. Too small a dataset to say definitively, but I've been spectating some six-way AI FFAs on PAX. I combine this with a lot of alt-tabbing.
    Last edited: August 30, 2015
  10. Elate

    Elate Active Member

    Messages:
    116
    Likes Received:
    109
    Also been getting some, got one specifically when I tried to order a unit to move via the map. Haven't tried to repeat it.
  11. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,125
    Likes Received:
    16,255
    In theory yes. It could be hacked to be somewhere else. Though all corners are filled in one way or another. Free space is a rare resources^^

    Haven't seen any crashes myself I could link with this mod. Check your logs and post the crash reports here please.
  12. Quitch

    Quitch Post Master General

    Messages:
    5,077
    Likes Received:
    5,853
    Disabled all mods except UberMap, Queller AI DEV and Queller AI Personalities DEV. UI hung after 2:30 in-game time. Left for 20-30 minutes, but did not start responding again and was forcibly terminated. Server was still running successfully in the background and was able to reconnect using Connect Buttons.

    Attached Files:

  13. Clopse

    Clopse Post Master General

    Messages:
    2,516
    Likes Received:
    2,858
    Ok first off great great mod. Hopefully I can train my brain to keep looking there. Radar blips would help this a lot. :p. I know it's not your doing but would be nice.

    On systems such as rock when an asteroid pops up, the auto new map is pretty startling. A way of making this not pop up or maybe change the color to grey from yellow. The yellow messes with peripheral vision a tad.
    elodea likes this.
  14. tracert

    tracert Member

    Messages:
    54
    Likes Received:
    21
    @cola_colin can we get flashing red dots on the map that last a few seconds for any new enemy units discovered? I really liked that about your minimaps mod as it grabs your attention.
  15. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,125
    Likes Received:
    16,255
    Can't do much about the fact that asteroids pop up ;)
    The colors of the maps however can be configured. If you want to play around with it look at
    "%LOCALAPPDATA%\Uber Entertainment\Planetary Annihilation\client_mods"\<ubermap folder>\ui\mods\ubermap\ubermap.js
    search for drawConfig
    Those are per biome RGB color ranges that are used to scale over the height of the layers.

    If anybody has general better suggestions for the colors please share them. I know that some player colors are not easy to see on some biomes. There are just not enough colors xD

    I guess the icon of a new unit could flash a little?
    Clopse and tracert like this.
  16. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,125
    Likes Received:
    16,255
    All I think I can see there is that something UI crashed. Blame coherent I guess? If there is a crash dump for that moment then share that with Uber maybe.
  17. tracert

    tracert Member

    Messages:
    54
    Likes Received:
    21
    Maybe the icons could 'flash' by inverting the colours so a blue unit icon flashes back and forth from red to blue, black icons between white and black etc. The flashing was great with Alerts Minimap for example when a scout I wasn't watching sees some raiding dox or a battle going on and suddenly the map lights up with lots of activity. It meant I could see, out of the corner of my eye, that something was going on.
  18. ljfed

    ljfed Active Member

    Messages:
    181
    Likes Received:
    138
    Is it possible to have a "x" button next to each map and a "+" button somewhere so you can close maps of planets you don't want/need to look at?
    This could potentially solve @clopse 's problem by making asteroid maps automatically minimized so you have to click the "+" button to make them appear (or a setting for this somewhere).
    cola_colin and Clopse like this.
  19. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,125
    Likes Received:
    16,255
    cool idea. Also added to the list of things I want to do next (probably midterm though)
    cdrkf likes this.
  20. emraldis

    emraldis Post Master General

    Messages:
    2,641
    Likes Received:
    1,843
    Could you combine this mod with PA stats, to make the planets that show up on PA stats have your map as textures instead of that weird white grid thing?

Share This Page