GBJam game, untitled


(Mike Evmm) #4

It’s always interesting to see a step by step development log.


(Jacob Albano) #5

This update brought to you by AutoTileGen, which I spent most of today playing with. It’s a really great tool that allows you to make tilesets with transitions, edges, corners, and more by just supplying four base images. I’ll be making a post with the Flashpunk implementation soon.

I suck at backgrounds.

Also got some very basic jumping and movement controls in.


(Zachary Lewis) #6

Looks like Thomas Was Alone so far.


(Jacob Albano) #7

Thank God for Mike Bithell lending credence to programmer art all over the world.

Also, thanks for moving the topic.


(Jacob Albano) #8

Added initial player sprite and palette swapping. :heart_eyes: Since we can only use four colors in total, I’m doing the art with four specific greyscale values and modifying the bitmapdata when I load it. I can change the final values by tweaking a config file, which looks like this:

    <palette>
        <white>D4F292</white>
        <light>468337</light>
        <dark>A4CB43</dark>
        <black>18412E</black>
    </palette>

Code pushed for the night. I should commit more often.


(Zachary Lewis) #9

@jacobalbano I put together a dynamic palette switching demo with you in mind. It has all of the GameBoy Color palettes built in and it runs really quickly at runtime thanks to BitmapData.threshold().

Maybe you can make use of it.


(Jacob Albano) #10

Added an attack animation.

@zachwlewis Your palette switcher is working beautifully so far!


(Zachary Lewis) #11

Good to hear it! Gotta’ share a gif of toggling pallets with moving entities. I just used a Stamp for my images, so I wasn’t able to get the full affect of the color swapping.


(Mike Evmm) #12

Might I suggest the sword movement is reversed (up-down)? That way it would end at the sword’s resting position. (It just seems more logical to me that there’s a “position jump” at the beginning of the movement, rather than at the end)
Looks good!


(Jacob Albano) #13

That’s a good point about the sword movement. I’ll play around with it.

I’ve been out most of the day but I did get the basic movement finalized. Added walking animation and frames for falling, jumping, and sliding on walls.


(Jacob Albano) #14

Wall jumping!

Progress is still going pretty slowly, but since I’m participating in an attempt to blow off stress, it’s probably a good thing. Movement is totally done at this point, I think. Time to get some enemies in here.


(TaylorAnderson) #15

Have you considered perhaps turning those lines in the background into rain? That was the impression I got when I first saw screenshots

Also: looking good!


(Jacob Albano) #16

That’s a good idea. It’s super ugly at the moment but that’s because I tried to make a good tiling background for like 45 minutes and just said “screw it”. Rain would add some nice atmosphere and movement to the stage.

And thanks!


(Jacob Albano) #17

Working on adding enemies now. Here’s what the code looks like for the very first functionality:

in blob.xml

<data>
    <hitbox width = "16" height = "16"/>
    <brain>
    action "actBusy"
    {
        print "hi"
        sleep choose [ 1 1.5 2 ]
    }
    </brain>
</data>

The result is…not terribly exciting. I’d show a gif but I’m sure we can all imagine what Flashdevelop’s output window tracing “hi” every 1, 1.5, or 2 seconds looks like.

Still, I’ve got bare-bones data-driven thinking going on. It’s a start.


(Mike Evmm) #18

Pretty nice.
I’ve had plenty of trouble setting up platformers, is the source publicly available?
Also, is that Slang I see?
(and wall jumping is really cool, in itself. Might I suggest some particles when sliding down the wall?)


(Jacob Albano) #19

It is, though I’d warn you that I’m not great at setting them up either. I spent a long time getting the physics to feel right on this project. Check out the bitbucket project.

Yep, that’s Slang! Using it after all this time has made me realize that it needs some more work, so I’ll probably do that after this is over.

And particles are definitely on the agenda. :wink:


(Jacob Albano) #20

Got some blobby enemies that blob around.

Here’s its brain:

set var direction 1
    
action "actBusy"
{
    set var wallLeft World:checkWall -20 0
    set var wallRight World:checkWall 20 0
    
    set direction match [wallLeft wallRight]
    {
        case [false true] -1
        case [true false] 1
        case [false false] direction
        case [true true] 0
    }
    
    Mover:hop direction
    sleep chooseFrom [0.5 0.7 0.6]
}

(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.