Giving Rive a spin

I’ve recently spent some time with Rive and I’m now quite familiar with both the Rive editor and its Defold integration. It’s a fantastic new tool. I feel Rive has a the potential of becoming a major part of Defold, for a number of reasons:

  • Vector graphics. This is a great addition in itself, and something Defold has only previously supported with fonts.
  • Bones. Similar to Spine, but more user friendly to edit in my opinion. You can even tie a vector path to bones. This is powerful.
  • Relentless Rive updates - the Rive editor and runtime are getting new features at a massive pace!

The main practical drawback to any Defold Rive user will be that cameras cannot be used with Rive content. So, for example, to replace a sprite or Spine character in a game with a Rive character is likely to need quite a few changes. I wonder if this can be improved somehow, or maybe I’m missing something that would allow me to continue using camera solutions such as the Orthographic extension with Rive.

Because Rive requires its own renderer, not choosing the rive.render in Bootstrap causes a crash. It would be nice with a friendly message instead.

I also found a couple of bugs, I’ve reported them on Github:

4 Likes

Thank you for the write-up!

On the issue with cameras, would the general approach be to manually get the view matrix from the camera and apply it to each independent Rive character on screen? Would you do this for both positioning and scaling of the characters as the user moves the camera and zooms in and out?

I haven’t done any experiments, only read the manual, where the section on view matrix touches on this.

2 Likes

I don’t know if that would work, matrixes are beyond my current skillset! I’m currently not using a camera at all, and move and scale the entire gameworld instead.

1 Like

You should be able to use render.set_camera and render.set_view, but note that the view matrix will be truncated to a 2D matrix. Meaning you can do camera effects like shake, or follow a player or something like that, but it’s currently impossible to use perspective effects like orthographic zoom and stuff like that. You need to do camera effects with the view matrix only.

3 Likes