The Performance Update: PA Build 99377

Discussion in 'Planetary Annihilation General Discussion' started by wyao, November 21, 2016.

  1. wyao

    wyao Uber Employee

    Messages:
    70
    Likes Received:
    410
    Summary of Changes
    • Added Multi-threading support to both client and local servers
    • Tweaked AI
    • LZ4 compression for server mods
    • Major rework of the System Editor
    • Lots of bug fixes and polish

    Multi-threading support


    • Added option to server settings tab to enable multi-threading for local servers.
    • Added server command line option "--mt-enabled" which enables server multi-threading if present.
    • The Nav, Physics, and AI updates are now run in parallel when enabled.
    • These changes do not affect Uber hosted games, only local and private servers (if configured)


    AI changes

    • Retrained all AI neural networks.
    • Made changes to reduce AI baiting
    • Support for unit restrictions in new game lobby (work in progress)
    • Added multi-thread safety to the AI neural networks


    LZ4 compression for server mods

    • Enable LZ4 server mod compression on servers with replay version >= 2, to help reduce client load times on servers with large mods
    • Added check to enable LZ4 server mod compression only on new servers that can support compression based on replay version sent in login acceptance message.
    • Currently this also changes replays. Older builds cannot load replays created by newer builds with LZ4 compression of server mods, but newer builds can load older replays
    • Server version and buildid also sent in login acceptance message will be used for custom server checks in future.


    System Editor changes
    Refactored system_editor UI, system_editor_view and system_editor_planet

    • Fixed issues where CSG would be lost
    • Fixed lost advanced edits due to events not firing
    • Fixed resolution scaling not set causing incorrect air zoom calculation
    • Fixed unnecessary rebuilding when changing planet
    • Fixed metal spots disappearing when finished editing (invalid placement)

    Camera, camera_controller, camera_contoller_planet and camera_controller_space changes:

    • Added mouseLocationAsJson
    • Added toLatLng (was planet private)

    System_editor_view and system_editor_planet changes:

    • Fixed encodeCSGBrushListJson to encode preview brushes or builder brushes in planet
    • Fixed addMetalSpot to validate metal spot and any mirror when placed
    • Renamed senedSelectedPlanetToUI to selectedPlanetChanged and cleaned up usage in view
    • Renamed sendSystemSpecToUI to systemChanged and cleaned up usage in view
    • Renamed updateUIPlanetMetalSpots to selectedPlanetMetalSpotsChanged and cleaned up usage in view
    • Renamed updateUIPlanetLandingZones to selectedPlanetLandingZonesChanged and cleaned up usage in view
    • Added selectedPlanetCsgChanged to view
    • Moved terrain editing status from view into planet (it's per planet which fixes lost CSG and unncecessary rebuilds)
    • Moved UI interaction out of planet world into view
    • Moved UI planets ready from planet world to view and renamed to updatePlanetsReady
    • Added arePlanetsReady to planet world
    • Added basic camera lookAt support for planet mode to view (TODO: space camera)
    • Added systemEditor.convertSelectedPlanetToAdvanced for advanced editing in UI to view and planet
    • Added selectedPlanetEditingChanged and selected_planet_editing message for advanced editing in UI to view
    • Added selectedPlanetEditingAsJsonMessage to view
    • Added setLandingZoneSize to planet for advanced editing in UI to view and planet
    • Added camera_movement message for UI to view
    • Added planent_csg updates for UI with selected planet index and current CSG selection for every change when editing terrain to view
    • Added selected_csg message for UI when selectected CSG changes to view
    • Added editing mode and planet status to selected_planet_index message for UI to view
    • Added mouse location to time message for UI (to avoid spamming another UI message) to view
    • Refactored state handling to use new engine messages
    • Added handling to restore editing state when changing planets
    System Editor Advanced mode changes
    • Changed advanced edit of no preview placeholder to convert with no csg, metal spots or landing zones
    • Changed advanced edit of terrain preview to convert csg only with no metal spots or landing zones
    • Disabled advanced edit mode changes while planets are building
    • Added landing zone rules editor with camera support to look at landing zone when selected
    • Added landing zone size
    • Added display of delete key bindings when editing metal spots and landing zones
    • Added camera location
    • Added mouse location

    System_editor_view / system_editor_planet, csg_brush_preview changes
    • Added resetSystem for loading entire system
    • Added previewSelectedPlanet and updateSelectedPlanet
    • Added releaseCsg and changed grabSelectedCsg to save original position
    • Added cameraLookAt with space camera to focus on sun
    • Added cancel check to release grabbed CSG
    • Added saveUndoPosition and restoreUndoPosition to CSG brush preview
    • Renamed buildAllPlanets to previwAllPlanets
    • Tweaked setLandingZoneSize
    • Tweaked systemChanged and selectedPlanetChanged from first pass
    • Tweaked updatePlanetSpec
    Additonal changes
    • Added basic camera support to planet view in system editor via camera_movement handler and api.camera.lookAt
    • Added planet selector with sun zoom to celestial (no more accidentally changing orbits trying to select a planet)
    • Added thrusters required for attack to advanced edit
    • Added clickable CSG command bar showing key bindings when CSG selected (was key bindings help)
    • Added api.terrain_editor.releaseCsg with ESC handling to cancel grabbed CSG and restore original position
    • Added sandbox back into biomes
    • Cleaned up handling of planetCSG, metal_spots and landing_zones conversion to source > brushes, metal_spots, landing_zones
    • Cleaned up initial loading of system
    • Added buildAllPlanets to replace convertAllToTerrainPlanets with checks for existing status to system_editor_view
    • Added resize handling to system editor when editing controls section overflows screen height eg long landing zone lists
    • Added key bindings help when editing csg to system editor
    • Tweaked advanced landing zone size and selected csg updates in system editor
    • Added api.settings.title
    • Added systemEditor.set_flooded_csg and systemEditor.set_no_features_csg
    • Tweaked handling of release CSG
    • Added hasUndoPosition and checks for newly placed CSG with no undo position
    • Fixed message spam when planet or CSG grabbed
    • Fixed csg selection not cleared when ending CSG editing
    • Fixed selected csg not updated when placing new CSG
    • Fixed flooded and weight params not preserved in preview CSG
    klovian, ArchieBuld, dom314 and 5 others like this.
  2. wyao

    wyao Uber Employee

    Messages:
    70
    Likes Received:
    410
    Bug fixes/improvements
    Client_connection changes
    • Added CONNECT_TIMEOUT of 5 seconds and STATE_INITIALIZED
    • Added RECONENCT_DELAY of 0.5 seconds and STATE_RECONNECTING
    • Changed MAX_RETRIES to 2 ( best handled in UI where we can provide feedback)

    • Fix for change from list to vector in ThreadPool and TaskBatch where mTasks size is 1 (macos crash fix).
    Connect_to_game scene

    • Added cancel button visible for non Ladder1v1 games after first failure which cancels immediately if no penidng engine connection
    • Changed DEFAULT_CONNECTION_ATTEMPTS to 5 (now less in engine)
    • Added DEFAULT_CONNECT_DELAY of 2 seconds when connecting to a new local server (reduces chance of first time fail while server is still starting)
    • Added DEFAULT_RETRY_DELAY of 5 seconds
    • Added connection attempts of 15 with retry delay of 10 seconds when loading local saved games (server is non responsive when loading big saved games)
    Other fixes
    • Updated to FMOD 4.44.64
    • Attempted fix for AMD green planet bug
    • Fixed missing build bar images for Enderstryke71 and Nefelpitou commanders.
    • Fixed incorrect economy rate when new player joins an empty slot cleared by another player leaving / kicked / spectating (or an AI removed) that was an economy rate not 1.0
    • Fixed long timeouts with many retries when connecting to non existent or stealh blocked servers.
    • Fixed loading of big saved games
    • Added cancel button while connecting to server
    • Fix for planet wide patrol task not getting enough initial patrol points, causing the task to constantly reset itself and cause lag.
    • Patrol task, auto repair task, and anti entity task now filter possible targets faster. This represents a decent perf boost for later game.
    • Fixed bounty claimed by ally voice over playing in group for nuclear missle ready.
    • Removed the ?_? AI name, since it was not displaying properly on at least one platform.
    • Fixed lobbyId typo in start rejoinGame, lobbyId not set in matchmaking, ko db extender breaking systems and player guide not scrollable
    • Fixed rejoinGame not settings mods, etc due to consistent use of lobbId vs lobby_id
    • Fixed lobbyId not saved in matchmaking
    • Fixed broken systems when not initialised correctly with default value of empty array by ko db extender
    • Fixed player guide not scrollable due to incomplete white flash fix
    • Fixed server mods not uploaded during host connect for manually started local server
    • Changed community mods CDN URL
    • Removed the Mutex from swizzletree. Instead mEnumerationCount is a std::atomic.
    • Fix for an uninitialized variable that was preventing users from being able to change the playback rate of replays
    • Removed a couple of very spammy log messages
    • Fix for burnables attempting to write out to the burning curve during the shutdown call when the curve was already updated by the call to incinerate on the same tick.
    • We no longer query the order's unit's position for every pass of (is my fellow unit close enough to me). For area patrols with lots of units, this is a huge perf win.
    • Fixed the army patrol target cache to work more like it was initially intended.
    • Added sim performance percentage next to game time in live_game_options_bar.
    • Fix for agent looking at wrong move type value when determining if it should just steer towards its slot position.
    • Fix for formation looking at wrong move type value when determining grid and cushion size.
    • Fix for group moving an agents goal to its slot position when the slot position is not valid.
    • Fixed nav agent logic regarding when to steer towards their group slot position and when to use their own ground path.
    • Fix for a nav agent variable getting modified on when it wasn't supposed to be.
    • Adjusted the logic controlling what nav search spaces get updated per tick.
    • Minor adjustment to nav to prevent units from remaining stuck due to not having a flow field for an extended amount of time.
    • Adjusted nav group logic so that slots are not treated as ahead of the group when the group is not moving.
    • Added gNoMods to startupJS for better handling of --nomods by community mods.
    • Added cores, memory and nomods to getSetupInfo and UI start scene.
    • More multi-threading protection for the unit type db.
    • Fix for Collision Geometry potentially rebuilding its BVH in one thread while another thread is walking the tree. Would only occur if there were multiple AIs and multi threading was enabled.
    • Fix for uninitialized variable in nav agent.
    • Adjusted AsyncParallelForDriver to split work more evenly over threads.
    • Added getVersion to AudioWrapper, NullAudioWrapper, FmodAudioWrapper with decoding and logging of FMOD version.
    • Added getVersion / getRenderer / getShaderVersion to GLRasterizer, NullRasterizer and Rasterizer
    • Added fmod_version, opengl_version, opengl_renderer and opengl_shader_version in getSetupInfo for UI
    • Moved where feature observables are removed to prevent features from mutating the sim history during the retire entities step.
    • Fix for octree::walk deleting the FindState we are working before we were really done with it.
    • Fix for failing to parse a unit type string if one of the unit types returned an empty spec set. This can happen if a spec string includes one of the Custom unit types, but there are no mods installed that makes use of that unit type.
    • Added defeated status and AI personality to army replay info
    • We are no longer allocating a string eveytime we validate a build order. We do this often enough that this is a decent perf improvement.
    • Added checkboxes for selected CSG pathable, mergable, no features and flooded flags
    • Added display of selected CSG JSON (temporary until full parameter editing is finished)
    • Added clearMergableCsg, setFloodedCsg, clearFloodedCsg, setNoFeaturesCsg and clearNoFeaturesCsg to api.terrain_editor
    • Improved and renamed respondToResize to checkResize with cleaner handling of landing zone and CSG json overflow
    • Fixed uninitialised weight, weightHard and weightScale
    • Fixed revert to standard mode while advanced editing with zero CSG, metal spots and landing zones
    • Fixed remote saved games not showing last saved time and incorrectly sorting to bottom of saved games list
    • Fixed minor scroll overflow in frame for player guide article
    • Fixed --nomods handling using new gNoMods in connect to game, new game and replay loading
    • Fixed api.net.joinGame never returning for invalid lobbyId
    • Added cancel to join game after waiting 10 seconds
    klovian, ArchieBuld, dom314 and 5 others like this.
  3. WaylanderPK

    WaylanderPK Member

    Messages:
    72
    Likes Received:
    51
    Thanks for the update. I might not stalk the multiplayer scene, but I regularly play PA with friends and against the AI. Haven't regretted backing PA for one minute.
    lulamae and cdrkf like this.
  4. SonicBlue22

    SonicBlue22 New Member

    Messages:
    9
    Likes Received:
    1
    This update made games that used to go at 40fps go to 15fps.
  5. SonicBlue22

    SonicBlue22 New Member

    Messages:
    9
    Likes Received:
    1
    I think I found the problem.
    https://
    drive.google.com/open?id=0B4d0OaFXWMxNOE5yWmNqUTVadzA
  6. stuart98

    stuart98 Post Master General

    Messages:
    6,009
    Likes Received:
    3,888
    No you didn't.

    That was always like that. The UI is essentially a chrome browser, and chrome loves to spam a ton of low resource processes for every single thing.

    Could you post a dxdiag?
  7. cdrkf

    cdrkf Post Master General

    Messages:
    5,721
    Likes Received:
    4,793
    That's strange, this update drastically improved performance for me (although my machine was rather CPU limited in bigger games, which is what this update fixes).

    If you could post a DxDiag that would be helpful. Also if you could post any PA logs- that kind of performance loss suggests a problem. Could you also give some details on what your test game is for 40 fps -> 15 fps? Are you running local server or using an Uber hosted one? Are we talking multi player, galactic war, a local skirmish?
  8. SonicBlue22

    SonicBlue22 New Member

    Messages:
    9
    Likes Received:
    1
    I didn't do any actual tests while switching between the current ans past verion, I've just noticed a decrease in performance since the update (on the same maps where I got ~40fps, but now get ~15fps). And I only play on Uber servers.

    And if you add up the memory usage for CoherentUI_Host.exe, you get 2.6GB (2,373,000K give or take) which seems like a lot for the UI unless I'm missing something. I didn't include it in the picture but memory was just about maxed.

    Attached Files:

  9. cdrkf

    cdrkf Post Master General

    Messages:
    5,721
    Likes Received:
    4,793
    Hmm, looking over your dxdiag all looks OK. you have a similar setup to me, you shouldn't be stuck down at 15fps unless we're talking very late game.

    Stuart is correct that coherent using a lot of memory isn't unusual but could be a problem I guess. it could also be an issue with mods, have you kept up to date or have you jumped a few versions? the previous release moved mods from the external community tool (PAMM) to an integrated mod manager community mods- any left overs from the old system can cause chaos with the game. also if you are playing an AI or galactic war game you could try going into settings and using local server with multi threading. see if that helps.

    Beyond that we'll need some game logs which should hopefully point out the issue... @mikeyh can help with that!
  10. blazecrusher13

    blazecrusher13 New Member

    Messages:
    1
    Likes Received:
    0
    I have found that as you play in one session, loading times, lag, or unresponsiveness issues get worse and occur more often. Most likely do to the fact that more and more Coherent_UI processes are created. Just by ending the PA.exe process, the game runs substantially faster for an hour or so.
    So if you have these issues, just END PA.exe and start it back up!
  11. mkii

    mkii New Member

    Messages:
    18
    Likes Received:
    2
    "Support for unit restrictions in new game lobby (work in progress)"
    Yes! I've wanted this for ages. Please keeping improving this, it'll make for much better variety!
  12. mikeyh

    mikeyh Post Master General

    Messages:
    1,869
    Likes Received:
    1,509
    First pass of unit restrictions is implemented via community mods.

Share This Page