Skip to content

Building Health Bars

hugh5 edited this page Oct 14, 2022 · 17 revisions

This page refers to friendly building health bars displayed in the UI Box. For friendly units and enemy entity health bars, refer to Entity Health Bars

Building Health Bars

Examples of what the health bars look like.

Design Process

Originally the attack and defense progress bar designs were used however it was realised that attack and defense stats are a static metric that do not need progress bars.

Base Profile Screenshot 2022 10 14 - 23 23 06 32

Base Profile Screenshot 2022 10 14 - 23 23 03 76

It was then decided that icons should be used to represent attack and defense stats of a building

Base Profile Screenshot 2022 10 15 - 00 01 38 26

Base Profile Screenshot 2022 10 15 - 00 01 36 39

Functionality

The health bars are configured in BuildingUIDataComponent.createHealthBar()

Creation sequence of Building Health Bar

The health bar frame is created as an Image with the texture loaded from the ResourceService.
A 1px wide Pixmap is created which is just a red rectangle that is use for creating the ProgressBarStyle.
This Pixmap is the health which is displayed by the ProgressBar.
A Label is created to display the hit points of the building as well.
The position of the Image, ProgressBar and Label are all configured in this function.

Table of Contents

Home

Game

Game Home

Design Influences

Gameplay Features

Style

Story

Friendly Units
Map
City
Buildings
Unit Selections

Spell

Game User Testing: Theme of Unit Selection & Spell System

UI User Testing

Tutorial

Resource Stats Display

Loading Screen Bar

Health Bars
In Game menu
  • Feature
  • User Testing:In Game Menu

Landscape Tile Design

Landscape Tile Design Feedback

Weather Design

Weather Design Feedback

Camera Movement

Enemy design

Enemy Units

Enemy AI

How Animation Works

Map Flooding

Game Engine

Getting Started

Entities and Components

Service Locator

Loading Resources

Logging

Unit Testing

Debug Terminal

Input Handling

UI

Animations

Audio

AI

Physics

Game Screens and Areas

Terrain

Concurrency & Threading

Settings

Troubleshooting

MacOS Setup Guide

Clone this wiki locally