The Spatials V3 devblog 2016-01-11

Internal development notes, very slightly cleaned up and commented a week later.

TL;DR: buildings leave debris and smoke when destroyed, new ancient ruins tileset and camps for uncolonized planets, a new projectile-like attack with a final bomb, and health bars.

- building death proc: spawn the whitelisted burnt ruins
    plus explosion (no damage for now)
    plus some time limited smoke fx

Destroyed buildings will now spawn a debris tile and some smoke and fire effects.

Building debris

- integrate ruins gfx and ruins camps
    for now, on non-civ planets, have a chance to make the planet a "ruins planet"

A new tileset and camp set has been implemented for planets that are not colonized by a NPC civilization. For now there's no gameplay associated to them, but we want to flesh them out better in the future.

Ancient ruins

- bomb helper for other attacks
- attack: projectile with entity spawn
    make projectile a bomb

Two more kind of attacks have been prototyped. Bombs damage all matching entities within an area of effect, and for now they are implemented as a helper for other attacks. The first of such attacks models a heavy, slow projectile that is affected by line of sight constraints and which explodes on contact.


- introduce "onlyOnDirty" systems: automatic ::isDirty() check before calling ::process() over must+one comps, which avoids scripting roundtrips
    perfect for 1:1 efficient frame stuff like hp bars
    implemented at the base processOuter level
- hp bars
    as a childc entity
    hpbars-system is phase 0 and onlyOnDirty over vulnerable-component
    dynamically create/delete/update child bar entity
- hp bars: display on aggro (v2 parity)
    introduce last-target-component, clear when losing target
    add the condition of having last-attacker-c or last-target-c
    add a low phase, active refresh of hp bars to catch the comp changes

As depicted in the previous screenshots V3 now features health bars over vulnerable entities. Like in V2, health bars are also used to give more visibility for aggressors and are also enabled when an enemy engages in combat, not just when it's damaged.

The efficient implementation of the bars has also required a new kind of entity processing filter. Entity systems can now opt to process entities only when one of the "must" or "one" components are dirty. Combined with phase = 0 this allows very efficient and responsive systems, even when implemented in Scheme, with a minimal number of scripting roundtrips.