The Spatials V3 devblog 2016-05-09

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

TL;DR: robot energy and repair systems, aesthetics vital, flush-to-wall doors, galaxy travel is now based on a wormhole map, ship auto pilot editor.

Last week I returned to full on gameplay systems programming, with a much needed review of both old requests and a new concept for galaxy generation and travel systems.

- more robot systems
    vital energy for robot
        at very low levels it damages robot over time, up to destruction
        -> for now, think about discharged state instead
        requires fuel cells from a charge station
    charge station
        stocks fuel cells
- repair job now happens on a proxy entity
- robot broken system
    happens randomly at low hp but >0
    remains static, wont move for anything
    sparks fly
    advertises repair job on proxy entity
- fix stale proxy entity for robots after repair is succesful
Robot being repaired

As an AI robots are very much ready, but there’s still pending ancillary systems to implement to make them integrated into the game. An energy system for robots is now in the game. Robots now deplete an energy bar as time goes on. At low levels it makes them seek a charging station to consume one fuel cell. If they fail to reach an available and stocked charging station, they may start receiving damage over time.

If a robot is damaged enough (be it from a too low charge or from a pirate crossing on its path) it will stop everything it’s doing and enter into a broken state. It will need to be repaired, which will make its health bar reach 100% again. If it’s damaged enough (said pirate just keep firing at the poor robot), it may explode!

- vital: aesthetics
    4 ++/-- emotions
    use smoothed interpolation, like mind
    comp to signal delta influence for nearby objects
        on dirt and litter and corpses
        on decorations
        on other objects that can be higher/lower quality
- add room influence to aesthetics

Another new vital has been implemented: aesthetics. This system looks around its entity from time to time to check its surroundings, and influences (with interpolation) the opinion it has of them. A too low opinion will cause negative feelings, and luxurious surroundings will make officers and visitors pleased.

- new flush-to-wall doors
Flush doors

Another fan favorite request has now been implemented! We’ve replaced the door objects with new ones that are flush with the walls, so now they look much better integrated into their rooms and corridors. Combined with the automatic open/close system of V3 doors, they look fantastic.

- galaxy wormhole concept
    generate nice looking wormhole graph for galaxy
    draw galaxy with wormholes fading to transparent for closed systems
    fog of war on galaxy
        hide all system details for closed systems
- ship travel is now a sequence of wormholes while in the travel phase
    ui restriction is enough for now
    store path of systems in ship
    ship tick iterates over them
    a travel order must do a shortest path search. then set the path in ship
- subscribe galaxy layer to fleet to update hud
    introduce TravelProxy to avoid refreshing the entire galaxy view

Another milestone feature has been implemented in the galaxy system of V3. Star systems are now linked by wormholes, and space ships must use them for travel. It’s not possible anymore to just travel in a straight line. Pathing is automatic, the user doesn’t need to select each step.

Galaxy with wormholes

On top of the wormhole system a fog of war has been implemented. After the user perfoms some action in a discovered system, the linked systems will become available for travel.

Galaxy fog of war
- auto pilot model
    new ShipTravelOrder object for steps in the travel orders
        simple, just target body a few (improving) metadata
    tick and parking checks for autopilot orders, advance/override when required
- autopilot editor for galaxy view
    show listing of steps
    a special tagged dnd icon allows to insert new orders
        change icon to distinguish from direct orders avatars
    fix: autopilot started travel does not respect exploration state
        it must refuse to go into run state, must stop itself
    fix: autopilot started travel does not respect empty crews
    fix: autopilot started travel does not beam up/down officers from/to station
    autopilot always parks for at least 5s to give time to load/unload logic
    some cleanup for dialog
        fix: dnd icon gets interrupted
        add change notification for stop/start/changes to order list
        better layout
    fix: insertion position must be based on current selection in editor
    implement delete button
    fix: scroll in order list doesnt work after selection
        infinite refresh cycle huh...
    more icons
    move order up/down buttons
    zoom to order body button
    use radio group for run/stop buttons, with current state
    add small body view to order cell
    remove label text from dnd icon and add tooltip instead
Ship autopilot

And to round up a good week, another vital feature for V3 has been implemented: the ship autopilot. Spaceships in V3 are part of the logistics system. They are required to move extracted resources from planets to the user station, then back again. Doing this manually every time, while possible, would be appalling. For this reason an autopilot system has been added to V3. The user can easily, via drag and drop, select which stops a spaceship has to make, then start the autopilot to take over control of the ship. It can be interrupted anytime by giving direct manual orders to the ship.