💟 I can see my life… or, what’s left of it anyway

This update brings additional movement sequences, HP bars, and improvements to the underlying engine.

Let’s take a look:

Whoa what. It almost looks playable 🕹️ . We’ll go through the updates in the sections below.

Hit delay didn’t make it into this release, but a lot of pre-requisite work for it did – the logic that manages the sequence transitions has been fully replaced. As such, collision improvements are scheduled for the next release.

Play

HP Bars

Health point bars

As a player’s HP gets lower, the bar becomes shorter, and its colour gradually changes from green to red.

Why is it so far away from the character? Well, the problem is actually the character sprites are too far away from the bar, which should be on or near the character’s origin. Have yet to figure that one out.

Dashing

Dash forward Dash back

While running, players can press Jump to dash, giving them an instant speed boost, with a little recovery time when they land. They can also do this when landing from a regular jump – holding Forward and pressing Jump dashes forward, and pressing Jump without holding forward dashes back.

Dodging

Dodge

While running, players can press Defend to dodge. This will come in handy to dodge energy blasts ⚡, stones ⛰️, and other throwable objects ⚾.

Create

Configuration

With the changes to how sequences are processed, the way sprites are specified in object configuration has changed:

1 2 3 4 5 6 7 8 9 10 # Previously [[sequences.stand.frames]] wait = 0 sheet = 0 sprite = 1 # Now [[sequences.stand.frames]] wait = 1 # NOTE: This has changed to 1 sprite = { sheet = 0 , index = 1 }

The wait value now means the number of ticks to wait before switching to the next frame in the sequence, so it should be 1 or more. If 0 is specified, it will be treated as 1.

Characters have 8 more sequences. The dash sequences are named similarly to the jump ones, and the same transition logic applies:

dodge

dash_forward

dash_forward_ascend

dash_forward_descend

dash_back

dash_back_ascend

dash_back_descend

dash_descend_land

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 # Dodging # # * `run` + Defend # * `jump_descend_land` + Defend [sequences.dodge] frames = [ { wait = 4 , sprite = { sheet = 0 , index = 20 } }, { wait = 4 , sprite = { sheet = 0 , index = 21 } }, { wait = 4 , sprite = { sheet = 0 , index = 22 } }, { wait = 4 , sprite = { sheet = 0 , index = 20 } }, ] # Dashing # # * `run` + Jump -> `dash_forward` # * `jump_descend_land` + Jump -> `dash_back` # * `jump_descend_land` + Jump -> `dash_forward` [sequences.dash_forward] frames = [{ wait = 1 , sprite = { sheet = 0 , index = 16 } }] [sequences.dash_forward_ascend] frames = [{ wait = 1 , sprite = { sheet = 0 , index = 16 } }] [sequences.dash_forward_descend] frames = [{ wait = 1 , sprite = { sheet = 0 , index = 17 } }] [sequences.dash_back] frames = [{ wait = 1 , sprite = { sheet = 0 , index = 18 } }] [sequences.dash_back_ascend] frames = [{ wait = 1 , sprite = { sheet = 0 , index = 18 } }] [sequences.dash_back_descend] frames = [{ wait = 1 , sprite = { sheet = 0 , index = 19 } }] [sequences.dash_descend_land] frames = [ { wait = 0 , sprite = { sheet = 0 , index = 12 } }, { wait = 0 , sprite = { sheet = 0 , index = 13 } }, { wait = 1 , sprite = { sheet = 0 , index = 12 } }, ]

Spriting

Heat: Dash and dodge sprites

The new dash and dodge sequences need corresponding sprites. We recommend at least two each for the forward and back dash sequences, and three for the dodge sequence.

Testing

With the upcoming focus on collision improvements, work was put in to make it less tedious to repeatedly test different kinds of scenarios. For example:

Character getting hit on the ground.

Character getting hit in mid air.

Characters hit each other simultaneously.

Character dodging an attack.

By encoding actions, each time the logic is changed, those actions can be replayed to see if the game play still appears natural.

Input Emulation

Input emulation has received the following improvements:

state_barrier to wait for a particular state to be running before issuing commands.

to wait for a particular state to be running before issuing commands. Multiple commands can be issued simultaneously by chaining with && on the same line.

The following shows an example where simultaneous inputs are used:

# Player 0: Run and dash diagonally right and down control_input 0 axis x 1 .0 control_input 0 axis x 0 .0 control_input 0 axis x 1 .0 control_input 0 axis x 1 .0 && control_input 0 axis z 1 .0 && control_input 0 action jump true # Player 0: Move right. # Player 1: Move left. control_input 0 axis x 1 .0 && control_input 1 axis x -- -1.0

A side effect of this is empty lines are skipped, therefore to indicate that a frame has no input, you can use a “#” (comment) character on the line:

# Player 0: Wait two ticks between pressing right. control_input 0 axis x 1 .0 # # control_input 0 axis x 1 .0

What’s Next

Next time there should be more attacks, such as attacking while running, jumping, and dashing, and we should be able to feel them.

Also, the next release will be in eight weeks instead of the usual six, then it will be every 6 weeks after that. This change allows two things:

It brings the release cycle in line with Rust’s release cycle.

It provides more time to work on a small publish of the game.

Phew, this post was a little late. Now I’ve gotta dash 🏃💨.