GBJam game, untitled

(Jacob Albano) #21

Made some graphics for the blobby dudes.

The rest of what I’ve been working on isn’t really apparent at this point. I hooked up a state machine with a full complement of AI states; actbusy, aggro, engage, evaded, and cooldown. These guys only have behavior defined for actbusy, so they’ll hop around aimlessly no matter whether I get into their fields of view.

Here’s the current blob AI:

set var direction 1
state "act busy"
    set var wallLeft World:checkWall -20 0
    set var wallRight World:checkWall 20 0
    set var floorLeft World:checkWall -20 16
    set var floorRight World:checkWall 20 16
    set var ceiling World:checkWall 0 -16
    set direction match [wallLeft wallRight]
        case [false true] -1
        case [true false] 1
        case [false false] direction
        case [true true] 0
    if ! floorRight { if ! wallRight { set direction 0 } }
    if ! floorLeft { if ! wallRight { set direction 0 } }
    if ceiling { set direction 0 }
    Mover:hop direction
    ifelse == direction 0
        { stateSleep chooseFrom [1 1.2 1.1] }
        { stateSleep chooseFrom [0.5 0.7 0.6] }

Basically, all it’s doing is first checking a series of positions around the blob to see if it can find a platform. If there’s a wall to the right, it hops left, and vice versa. If there’s no adjacent wall, it continues in the direction it was moving last. If there’s no floor where it would hop, it just bounces in place.

Simple, but effective so far.

(Jacob Albano) #22

Hero uses sword!

It’s not very effective!

Enemy-Player damage is in, along with invincibility frames.

(Jacob Albano) #23

It’s now possible to damage and knock enemies back, in addition to dying yourself. Not pictured: the spikes below those narrow platforms (enemies don’t die to spikes yet).

There’s also a brief window right after a successful hot where you freeze in midair, so you can smack an enemy away and land right where it used to be. This could potentially be used for some complicated platforming but I doubt I’ll use it that way.