Wednesday, July 31, 2013

Artemis Mech

Today I created a new mech based on the artemis from Break Blade :) Pretty satisfied with how it turned out; it looks a lot less cartoony than the last one. Eventually, I'd like to allow players to customize their own mech by swapping parts, so I still want to fix up the graphics style for the previous mech when I get the chance.

Code-wise, I did some fine-tuning for the animation. This involved allowing "offset" parameters to be specified each keyframe; they essentially shift the drawing of the mech from the actual physical position in order to support more nuanced animations. Here's the result (the small vibrations are due to lag caused by the gif recorder):


Sunday, July 28, 2013

First post!



Hi! This is the development blog for a video game I'm working on, currently named "stratos", a 2d sidescrolling game focused on mehcs. I'm building it using the awesome libgdx library and box2d; while I'm currently targeting desktop, libgdx will make it relatively easy to run it on Android. Anyways, I've decided to post my progress here, mostly for my own sake. I'm hoping this will encourage me to not give up and actually complete it :).

So, this is the first week of development, and I started working on animation! Pretty much just replicating the same animation system I used for stickgame and cspsp, although it's a little more flexible now. Animations are specified in json; for example, a snippet of the walk animation file (essentially one keyframe) looks like:

walk: [
    {
        outerUpperLeg: 0.5,
        outerLowerLeg: 0.4,
        outerFoot: 0.3,

        innerUpperLeg: -0.3,
        innerLowerLeg: -0.5,
        innerFoot: -0.3,

        time: 0.4,
    },
    ...
],
}

It looks pretty decent, although the walk animation I created could definitely be better. Eventually, I'd like to write a simple editor to create animations without having to manually guess values.

Also added a quick test to toggle between active (animated) and ragdoll mode. Switching to ragdoll will also randomly break some joints, which actually looks pretty neat:


Next steps:
  1. Generalize code to work for different mechs. A lot of stuff (like pivot points, sprites, etc.) are still hard-coded.
  2. Get simple movement working (still not sure how I want to do collision...perhaps just a giant circle like I did in stickgame?). Also, make the mech able to look left.
  3. More animations :)