Again

“Play games all day,” they said.
“Such fun!” they said.

“Now I’m a robot.” 🤖

Menus are useful – when you don’t know what you want, it helps you choose from what’s available. But when you do know what you want, going through the menu is unnecessary.

This update includes a number of incremental improvements as detailed later, as well as automation for selecting characters and maps. However, collision detection didn’t make the cut 🙁.

Play

So, what’s new:

  • Character selection screen shows the selected character’s name.
  • There is now a map selection screen.
  • Sprite colours are now fixed (previously they were too bright).
  • Selecting characters and maps can be done through the console.
  • Air boxing aka punch-that-does-nothing.

Automation

Being able to control the game through the console will greatly speed up testing in the future:

  • Saves time setting up a game.
  • Feed in control input to test interaction between objects.

Air Boxing

This doesn’t actually make the characters hit each other yet, but at least they look like it. Right now they stand completely still while doing so, which makes it look unnatural. Expect this to be polished ✨.

Create

Even without the action collision detection, there is still plenty to be done.

Spriting

Heat's punch sprites

Heat's punch sprites

What’s an action game without any action? One would struggle to call it a game. I gave heat a basic jab, but it certainly can be improved.

Other characters may use a weapon like a sword, or have a buster-style shot.

Scripting

There are two new additions to scripting:

  • The stand_attack sequence for characters.
  • body and interactions in preparation for collision.

Stand Attack

You can define the stand_attack animation like so:

1
2
3
4
5
6
7
# assets/default/object/heat/object.toml
[sequences.stand_attack]
  frames = [
    { sheet = 2, sprite = 0, wait = 1 },
    { sheet = 2, sprite = 1, wait = 1 },
    { sheet = 2, sprite = 2, wait = 1 },
  ]

However, in preparation for the next section, you may want to use TOML’s full table syntax instead:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# assets/default/object/heat/object.toml
[sequences.stand_attack]
  [[sequences.stand_attack.frames]]
    sheet = 2
    sprite = 0
    wait = 1

  [[sequences.stand_attack.frames]]
    sheet = 2
    sprite = 1
    wait = 1

  [[sequences.stand_attack.frames]]
    sheet = 2
    sprite = 2
    wait = 1

Collision Volumes – Hit and Hurt Boxes

There are two new configuration elements for each frame:

  • body: The volumes where an object can be hit.
  • interactions: The volumes where an object hits other objects.

These are defined on every frame, as each sprite may have different body and interaction zones:

Blue represents the body, red represents the interactions

Collision zones

These are defined in the character configuration as follows:

 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
# assets/default/object/heat/object.toml
[sequences.stand_attack]
  [[sequences.stand_attack.frames]]
    sheet = 2
    sprite = 0
    wait = 1
    body = [{ box = { x = 25, y = 11, w = 31, h = 68 } }]

  [[sequences.stand_attack.frames]]
    sheet = 2
    sprite = 1
    wait = 1
    body = [{ box = { x = 105, y = 11, w = 31, h = 68 } }]
    interactions = [
      { physical = { bounds = [{ box = { x = 130, y = 32, w = 17, h = 18 } }], damage_hp = 20 } },
    ]

  [[sequences.stand_attack.frames]]
    sheet = 2
    sprite = 2
    wait = 1
    body = [{ box = { x = 185, y = 11, w = 31, h = 68 } }]
    interactions = [
      { physical = { bounds = [{ box = { x = 210, y = 30, w = 22, h = 18 } }], damage_hp = 20 } },
    ]

Hopefully you can see that every frame should have a body (otherwise it can’t be hit), and in the frames where the character is attacking, there should also be interactions.

The damage_hp value is currently arbitrary as HP limits haven’t been defined, but it’s likely to be done in the next update.

What’s Next

Hit and hurt boxes are done. Collision and winning are next 🏆.

Again as before, that’s where the fun begins!