Lots of big changes in this build!

Notable Changes

Detailed Patch Notes

AI

  • Added an AI confif file to make it easier to change how the AI decides how many factories and fabbers to build.
  • Fix for AI units not moving while underwater
  • Updated AI to improve starting build and ramp up time.
  • difficulty balance pass.

Audio

  • Adding looping music tracks for Battle. Audio balace, falloff and template work.
  • Adding a new FMOD parameter “view_frustum_distance”
  • Fix surround sound inversion bug

Balance

  • Give commander enough production to basically equal 3 mex, 3 power plants.

Celestial

  • Enhanced planet collisions
  • Tweak the celestial physics limitations so that elliptical orbits are much more possible.
  • Client FX

    • Fix commander explosion not having lod distances set.

    Game Start

    • The commander cinematic now shows up for all players, not just the host.

    Gameover

    • Title and styling varies with game state (shows defeated, game complete, or victory).
    • Shows a summary of selected stats for the player.

    Gameplay

    • Fixed boom bots damage
    • fix the default action when clicking on an unfinished factory to now repair the factory instead of assisting it.
    • Move feature icons (aka metal spot icons) to the surface of the water, which is where we place metal extractors.
    • Fix for units not reclaiming wreckage that overlaps a build area.
    • Fix projectile turn rate code.
    • Fix for multiplayer games not spawning multiple commanders.
    • Switched commander spawn delay to 5 seconds so timing works with Ben’s new spawn effect.
    • Tweeked torpedo launchers so the turret isn’t as low. This will hopfully make them work better when built on the shoreline.

    Galactic War

    • Fix for GW game over not abandoning the game.

    Keyboard

    • Fixed ‘q’ and ‘shift+q’ bindings both firing.

    Lobby

    • Added “land anywhere” option to the lobby.

    OpenGL

    • Fall back to 2.1 context if 3.1 fails.

    Pathing

    • Fixed not coming to rest when smaller unit assists larger unit causing the smaller unit to push the larger unit around.

    Perf

    • Recon performance work ; Recon was causing quite a bit of late game performance hit. Work on improving this.

    PIP

    SDL

    • Integrate Windows version of SDL port.

    Settings

    • Changed some confusing option titles: focus paths -> order previews. on / off -> energy on / energy off.

    Spectating

    • Spectators now get the celestial activity alert.

    Stats

    • Lots of behavior bug fixes (graph will now update at the correct times).
    • Added a table view (which can show either a snapshot of current stats of the game averages).
    • Stats history will be requested when the player becomes a spectator (since the collected history may not show oppenent data). This can take awhile since we can only ask for one slice of history at a time.
    • added new army stats: units built / units lost / enemy units destroyed. changed the damagable interface to accept a damager, who will may be given credit when the damagable is killed. currently only unit kills are tracked. added new fields to the army stats message sent by the stats_viewpoint. these new fields are not currently used yet, though they are sent to the ui.
    • The live game stats panel can now show data for multiple armies.

    System Templates

    • 5 player system updates and adding a smashable asteroid to the 4 player-4 planet system.

    System Editor

    • When dragging planets, round position to the nearest 100
    • Added simulation time display
    • Turned off the editing controls while simulating. (Changing those will result in basically corrupting your system.)
    • Fixed the simulation reset not going all the way to 0.
    • Changed the physics time step to be frame rate independent.
    • Correct the orbits of moons around moons (etc) when moving a base planet.
    • Make any planets veolicty grabber grabbable (not just the selected planet)
    • when you drag a planet with a moon, move the moon with the planet.
    • Draw orbits for all planets.
    • Changed the “simulate” button to “stop” while simulating. When “stop” is pressed, the system will reset to the initial state.
    • A very coarse pass on fixing up some default planets. To any future planet designers, mass 1000 is *almost* never the right choice. I don’t want to go so far as to enforce a larger mass on the server, but please use 5000 as the ‘default’ moon mass.

    UI

    • Camera controls will no longer automatically change when the active keymaps change. the live_game scene now subscribes the active keysmaps and wil update the camera controls when required.
    • Fix for ghost structures under construction not going away if they atrophied while hidden under the fog of war.
    • Fix for features and ghost structures not going away when a planet was destroyed if your camera was not focued on that planet.
    • adding an option to squech global chat.
    • Added the radius to the planet list in the server browser.
    • Fix path displays for elliptical orbits.
    • Fix for being able to select invisible build bar tabs.
    • enabled spectator-only chat. Spectators (or defeated players) now have their own team chat channel. Also, there is now an option to prevent spectators from chatting with live players. This option can be set in the lobby.

    Pathfinding

    V O X E L S : the new nav library

    • All integration error related to crossing sector borders is _gone_.
    • Voxels are a more general approach, simplifying much of the code.
    • There is a Voxel for every AABB location that intersect with polygons.
    • They are 4x4x4 meters (the 2d grid was 4×4 meters)
    • Voxels have World Layer flags which determine pathability.
    • nav library is about 70-80% changed (converted to use Voxels)
    • Feels so good to check this in

    3D Voxel Integrator

    • Integration looks at 6 neighbors if they exist (generally it’s 4-5).
    • In 2D I would look at 4 so the difference here is minimum.
    • The 3d integration math is… much more involved than the 2d math, however the more expensive math only happens when all 6 neighbors exist.

    VoxelTree : Fast Spatial Query support

    • With the ability to look for voxels that have specific world layer flags.
    • VoxelTree lookup is faster than sector to sector 2d grid traversal
    • Speeds up AI Quieries and Structure placement Tests
    • I noticed faster client response times
    • WL_Unpathable has been added for fast ‘unpathable’ lookups.
    • Fixed long standing ‘get within range’ for fabbers/flame tank issue.

    Engine

    HGrid work

    • Major re-work of HGrid that makes it way, way, way faster
    • Warning: wall of words incoming. Mostly because it took me awhile to figure out exactly what HGrid was before I could figure out what to do with it. So I figured it was worth writing an essay for future selves. Useful comments also included in hgrid.h
    • Although this is big and scary looking the new code is way, way simpler. There’s 40% less code! Less code and more speed. It brings a tear to my eye.
    • First, a description of what HGrid
    • The HGrid is a loose, sparse, heirarchical 3d grid. Whoa. That’s a mouthful.
    • Loose octree would be a simpler description but it’s less fun to say and somewhat more ambiguous.
    • Grid: It’s a grid.
    • 3d: It’s a grid along the x, y, z axes
    • Heirarchical: Layered where each grid cell has small grid cells inside it all the way down.
    • Sparse: not all grid cells in the space exist.The vast, vast majority do not.
    • Loose: objects are not fully contained in a cell. instead their center point is in a cell and that cell is at least as wide as the object’s diameter.
    • The loose property is of particular interest. Non loose grids have the unfortunate property that objects straddling grid borders have to go “up” a level in the hierarchy. Even at the top level there are degenerate edges such that even a tiny object will be in the top most level and must be checked by all objects. By being loose all objects can be in a fixed level based on their radius. They are then put in a bucket based on their center point, which is also super fast to calculate.
    • The consequence of being “loose” is that for a given object you don’t have to test just within it’s grid cell and up the heirarchy. You also have to test neighbors. And neighbors up the heirarchy. More buckets but fewer bucket pairs.
    • Ok so all of that is what the HGrid is. Which honestly wasn’t clear before. But that doesn’t discuss this change list. We’re still not ready for that! Next, what the code *was*.
    • The old code was slow. Very very slow. It was built on the idea that hashing bucket keys is fast. And checking if a hashed key exists is fast. That’s all laid out by The Orange Book. It casuallys says for more speed you can make it heirarchical (which we very much need). Unfortunately our particular use case, small things on the surface of a large sphere, is somewhat degenerate. It results in a huge number of potential neighbors almost all of which CAN’T exist because they are under the surface or in the air. Bah hum bug. What happens is late game hundreds of thousands of hashes and lookups per tick resulting in a 10 to 40 ms PhysicsWorld::broadPhase
    • The worst case number of pairs to consider for physics is n^2. Every object potentially collides with every other object. For our game n is on the order of thousands. n^2 is therefore millions. Far far too large. The goal of the broadphase is drastically reduce the number of pairs to be considered by the narrowPhase.
    • New code time!
    • The new code broadphase takes only a couple of milliseconds. And even that can be made faster when it’s worth it.
    • The new code is also super, super simple which is nice.
    • The meaning of the hgrid is the same even.
    • The new HGrid stores bucket pairs. The broadphase then generates object pairs for all objects in those bucket pairs. It is still n^2 object pairs for a given bucket pair, but the size of n for each bucket is quite small.
    • FWIW in at least one real game scenario that number of pairs created by the broadphase for n objects is on the order of 1n to 10n. That’s pretty reasonable.

    Balance Notes

    Weapon vs water fixes.

    • TML missiles will now properly turn and hit targets that are under water.
    • Ship cannons no longer target units under water.
    • Weapon range capsules are now correctly constructed taking minGroundHeight into account.

    Commander Changes

    • PBAOE now creates a damage volume
    • Updated commander death weapon, mines, and bomb bots to use the PBAOE damage volume
    • Commander’s death explosion now behaves like nukes, hooray!
    • New torpedo weapon: damage: 250, rate of fire: 2.0
    • New aa missle: damage: 200, splash damage: 200, rate of fire: 2.0, splash radius: 2

    Missile Defense Tower
    Health: 500 -> 1000
    Metal Cost: 300 -> 225
    Weapon Range: 100 -> 150

    Dox
    Metal Cost: 90 -> 45

    Vanguard
    Metal Cost: 1200 -> 1500