Week 71: Disablement, health-bars, and tracking stats

An animated GIF of a recording from Meteor Power showing new HUD displays, new health bars, and new control disablement messages.
New HUD displays, new disablement messages, and new health bars.


tl;dr: Last week I added a disablement system, health-bars, and new stats tracking and displays.


What happened last week?

Highlights

  • Added support for tracking, persisting, and displaying new stats.
    • I track all sorts of things, like how many current bots and stations there are of each type, how much energy is being collected and used, how much bots are moving around, how many meteors are hitting, how many waves are completed, etc.
    • My stats-display system is flexible and works for heads-up display panels, the pause screen, the game-over screen, and the level-select screen.
    • Stats are saved on the device.
  • Added a general-purpose disablement system with explanatory text.
  • Added bot and station health-tracking and a health-bar component.

Laundry list

  • Disablement:
    • Add support for disabling Commands when there's not enough energy.
    • Add support for radial-menu item disablement-explanation messages.
    • Make the disablement explanation message red.
    • Disable bot-creation controls when at max bot capacity.
    • Disable bot-recycling when there's only one bot left.
    • Disable run-wire button when there's only one station.
  • Gameplay stats and displays:
    • Add support for tracking the longest session for a given level.
    • Add support for custom control-rows, which more-explicitly handle their contents.
    • Create a new control-row for displaying level-current-energy-vs-cumulative-energy.
    • Make it easier to configure pause, game-over, level-select, and HUD control-row items by removing defaults from ScaffolderSchema.
    • Track bot and station counts.
    • Create new icons for HUD displays.
    • Create a bots control-row, a stations control-row, and an updated level-energy control-row.
    • Add support for configuring whether the HUD key-value list should be consolidated into a single panel.
    • Update HUD key-value-list margins.
    • Update HUD display colors based on current counts.
    • Add support for updating ControlRow styling based on context.
    • Update energy, bot, and station control-rows to display differently in the HUD vs other screens.
    • Create new energy-score and energy-high-score control-rows.
    • Add support for tracking cumulative time spent playing on both a global level and a per-level level.
    • Add support for tracking various gameplay stats (meteors collided, bots created, etc.).
    • Add time and distance tracking to all Scaffolder characters.
    • Add a control-row for displaying the remaining energy needed for the next upgrade.
    • Add a control-row for displaying the number of meteor-waves completed.
    • Fix hud-key-value-list scaling.
  • Health bar:
    • Add a new health system.
    • Add health-bars (and generic status-bars).
    • Add icons to status-bars.
    • Fade bot highlights and health-bars away from viewport center.
    • Fix health-icon and energy-icon scaling.
  • Radial menu:
    • Update radial-menu cost label for the currently-hovered item.
    • Fix an issue with choosing between cost values and text overrides in the energy-label widget.
    • Fix some issues with radial-menu label text-updates and height-calculations.
    • Disable radial-menu label display while transitioning open.
  • Info panel:
    • Populate the info panel.
    • Update info panel styling.
    • Fix bulleted-list styling in the info panel.
    • Update info-panel header colors.
    • Add support for updating info-panel contents when changes occur.
    • Add support for closing the info-panel or radial-menu when its bot or station is destroyed.
  • Miscellaneous:
    • Fix some camera-transition tween time-types.
    • Update overlay-panel styling.
    • Create an Upgrades enum.
    • Create a locked icon.
    • Restructure folders.
    • Create placeholder scenes for other bots and stations.
    • Update level success-vs-fail condition.
    • Fix an issue with music not pausing when the level has ended and is transitioning to the game-over screen.
    • Add support for displaying an explanatory message in the game-over screen for why the level succeeded or failed.
    • Add a station command for linking to the mothership.
    • Add an UpgradesManager.
    • Update editor icon colors.
    • Create a new station-cancel button.
    • Swap run-wire button with cancel button on the first-selected station.
    • Fix an issue with run-power-line buttons appearing under empty-station-sites.
    • Fix character-annotator deregistration.
    • Consolidate some redundant entity creation/destruction logic.
    • Refreshed C# knowledge.
    • Fix transformations between level-space and screen-space to account for the level's viewport offset when the screen is especially narrow or wide.
    • Rename get_level_touch_position to get_level_position_for_screen_event.
    • Add convenience functions for translating between pixels and inches.
    • Update bot and station screen-space touch events to be based on inches rather than pixels.
    • Add support for configuring an amount of priority for a LevelControl, so that it will be selected even if another control is slightly closer.
    • Prioritize bot selections over station selections.
    • Fix an issue with LevelControl overriding any custom collision-layers.
    • Add support for meteors to collide with the command center.
    • Add support for toggling a shielded flag for the command center, to ignore meteor damage.
    • Add a convenience function for getting the current scaled physics time-step.
    • Add support for consuming energy while station shields are enabled.

What's next?

  • Refactor the power-line system.
  • Create a warning-icon overlay system.
  • Some small camera polish.


🎉 Cheers!


This is a simple icon representing my sabbatical.

Comments