This weekend I was playing around with defining an animation DSL.

I've wanted to play this for a while after watching @davesmith00000's interview for "Scala for Fun & Profit" and @kubukoz Playdate talk. Everyone's doing DSLs for gamedev! 😄

It's still quite rough, but I think it's useful for things like menu animations. Maybe I'll use something like this in the next GameJam entry to add a bit more juice to the menus.

This example looks like this:

  val backgroundAnimation = {
    linear(0, 512, 10.0).loop
      .map(delta => (delta.toInt, delta.toInt))
      .translateWrap
  }

  val baloonAnimation = {
    val rotation =
      (linear(-Math.PI / 32, Math.PI / 32, 1.0) >> linear(Math.PI / 32, -Math.PI / 32, 1.0)).rotate
    val beat =
      (easeOut(1.2, 0.9, 0.5) >> easeIn(0.9, 1.0, 0.1)).scaleXY

    (rotation && beat).loop.map(asSurfaceTransform)
  }

  val textAnimation = {
    val rotation =
      (easeIn(-Math.PI / 32, Math.PI / 32, 1.0) >> easeIn(Math.PI / 32, -Math.PI / 32, 1.0)).rotate
    val beat =
      (easeIn(1.3, 0.9, 0.5) >> easeIn(0.8, 1.0, 0.1)).scaleXY

    (rotation && beat).loop.map(asSurfaceTransform)
  }

GIF

Playing around with flow fields again.

Turns out it's easier to have an image dissolving than to draw the flow field. The code for this effect was surprisingly small.

It's a shame that he video compression destroyed the effect, but I think it's good enough to imagine what it looks like.😅

GIF

I wanted to play a bit more with transparencies on a more game-like scenario, so I did a very small side scroller demo like a space shooter intro segment where the planet is being destroyed.

I think it turned out quite nice, almost looks like a real game.😛

Also, I recently played the Europa demo, and that made me really want to do something with a fade to white... I use too much fade to black.

Assets:

GIF

Took a quick break from InterIm development to work on Minart.

Finally got transparencies to work, and the performance doesn't seem that bad. I can get multiple moving particles on the screen with no problems.🙂

To be honest, I picked this up now because I spent way too much time searching for bitmap fonts without transparency for my InterIm demos. That's a thing of the past now.

GIF

This weekend I was playing around with InterIm to try out some new features (asRefs macro) and some old ones that were not really tested (custom render ops), so I decided to build a drum machine! 🎵

The API could still use some improvements, but this is getting to an almost usable state. 🙂

Font: Spleen by Frederic Cambus (https://github.com/fcambus/spleen) Drum Samples: Free Pipe Pack by Goldbaby (https://www.goldbaby.co.nz/freestuff.html)

404 error www.goldbaby.co.nz
GIF