Skip to main content

Health Bars

Today I implemented health bars, which seems like an easy thing to do, but in a game like this health bars need to display quite a lot of information without becoming overwhelming.

I'm not quite happy with them yet, but I'm getting there:


There are 5 elements to look at here:

  1. The first is the health bar, a simple green bar with a black background. I'm not sure I like the shad of green though. Also there may be multiple health bars for vehicles to show engine damage, crew casualties etc... or I may leave that up to the info-icons.
  2. The second bar is the red one, this is the shock bar. As a unit comes under fire they will suffer shock. If the shock bar is too high the unit will become pinned. Enemy units might run away too. The bar will drop down naturally depending on the experience of the troops. Some other actions can clear the bar too.
  3. The third element is the group number. Using control and number keys you can set selection groups, and then select units by pressing a number key. If the agent is part of a group it will be shown here. The group badge can change shape (and maybe color) to show which stance the unit is in, aggressive, sentry, defending or flanking.
  4. The fourth element is the rank badge. Agents can level up and get access to more special abilities as they gain experience. You can get experience from beating enemy units but also from achieving objectives and just staying alive. Higher ranked units have better aim, resist shock better and for vehicles get a handling and reliability bonus so they can drive better and break down less often. 
  5. The last element is the info icons. Some effects and conditions need to be shown directly on the unit. Such as running out of ammo, being immobilized or carrying infantry on board. You need to see these on screen because otherwise it becomes too difficult to remember which units are in danger or ready for action.
I'm going to experiment with different visual styles for the health bars, I want them to be clear, but not too gaudy and I don't want them to take up too much space.

Comments

Popular posts from this blog

Upstairs / Downstairs.

I've decided to make my prefabs multilevel. Later this should allow me to add pit traps and other great stuff. It also makes it easier to line up stairs so that you can exit them on the same co-ordinates where you entered them. The prefab editor is pretty much finished, it just needs some code for loading up prefabs from a saved dictionary, so that they can be checked or edited. The entries will need to be forwards compatible, so I'll be loading each tile and then translating the indexes to a new array, that way if I add extra indexes or extra info (like traps or puzzles) I'll be able to update existing prefabs to work with the new standard. Click for a video.

Automating Level imports from Blender to Godot

  Recently I've been making some levels in Blender an importing them into Godot. There are only about 7 or 8 shaders for each level, not counting dynamic objects which will be added later. But to improve rendering performance, it can be a good idea to split the meshes up into sections. At that point you might be faced with a list like this: Or it might be even more chaotic, if you didn't use simple names for the objects in your level. So it can take a long time to sort out all the meshes, make them unique and add textures and so on. Blender imports with simple Blender textures, or with placeholder materials. This is sometimes OK, but if your Godot shaders are very different to those used by Blender, it means applying new materials to every mesh object in the level when you import the scene. I found that during the design process, I was importing and readying a level several times before I was happy with the final layout. So at first I was wasting a lot of time. In Blender, I us

Advice needed on tilesets...

I need some advice on which is the best way to handle building the dungeon. Right now I'm using prefabs for my dungeon, they have a north south east and west section for each "room": The basic tileset. This has several advantages, and also several disadvantages. Firstly I can have curved rooms, I can have tunnels and other interesting shapes. The tilesets can look quite nice with a little work. On the other hand I can't easily get the navigation data before building the map and once the map has been built I can't make changes to the layout, like having active pit traps or believable secret doors. Although the rooms are interesting, they are quite repetitive, and it takes a lot of effort to make even a few different variations. Also rooms are constrained to one size. A newer version of the tileset with a lot of variant parts for making more interesting rooms. To create a tile set is a real headache too. Planning how to lay out the UVs, trying to cra