Reload

How many tests can you do?

šŸ“œ All of them.

Throwback to Again, when automated commands first appeared.

In this update, asset loading has been rewritten to enable hot-reloads – reloading assets without having to restart the game. In addition, collision tests are partially automated – text input can now be used to emulate control buttons.

This checks off the “Rewrite asset loading” and chips away at the “Automate collision tests” items from the earlier post.

Create

Content creation will be a frequent activity in the coming months. This usually involves drawing parts of an object, loading it into the game, then tuning and refining the object definition and sprites upwards of a hundred times before it is just right šŸ‘Œ.

Restarting the game 100 times becomes tedious really quickly, especially if you have to wait 10 seconds each time you change a pixel to see if the character looks right.

In preparation, work has been done so that these restarts are not necessary.

Hot Reloading

The following demonstrates the hot-reload feature in game:

Asset hot-reloading currently only applies to sprites, but this will be extended to include the object definition and sprites definition – object.toml and sprites.toml. This feature removes the need to restart the game every time you make a change to the object, taking away a tedious part of the process.

Input Emulation

The following demonstrates automation to predictably replay game input:

For collision testing – or more accurately input emulation – the application takes in bash-like commands to set control button state:

# Direction buttons
# ---
# control_input <controller_id> axis <axis> <value>
# value should be one of -1.0, 0.0, or 1.0
control_input 1 axis x 1.0
control_input 1 axis x 0.0
control_input 1 axis z -- -1.0 # `--` separator needed for negative numbers

# Action buttons
# ---
# control_input <controller_id> action <button> <value>
control_input 0 action defend  true
control_input 0 action jump    true
control_input 0 action attack  false
control_input 0 action special false

As an example, this can be used on the character selection menu to select characters:

# Select heat for player 0
control_input 0 action attack true
control_input 0 axis x 1.0
control_input 0 action attack true

# Select heat for player 1
control_input 1 action attack true
control_input 1 axis x 1.0
control_input 1 action attack true

# Confirm character selection
control_input 1 action attack true

This feature is currently limited to take in one button each game update tick, so it isn’t currently possible to emulate button presses for multiple controllers simultaneously. This restriction should be lifted in the next release.

What’s Next

Phew! The bulk of the current maintenance work is done; with a tad more to build for more realistic game play tests. Next time should be more exciting, look out for:

  • More character movement sequences.
  • Improved collision feedback – hit delay.
  • (Possibly) HP bars.

Not too far now, halfway to victory šŸ„ˆ!