CraftStudio 0.1.13.0 – Instant project export!

Hey there!

I just released CraftStudio 0.1.13.0 which brings another cool batch of improvements, including much faster project export, runtime memory leak fixes, scripting changes and more… But first, let’s talk about Ludum Dare!

Porté par le Vent

Over the week-end, me and a bunch of fellas (we were 5 most of the time, up to ten at times) took part in the game jam of Ludum Dare #24. We had 72h to make a complete game. It was kind of a stress test for CraftStudio, and it went amazingly well!

This fighter model was built by farfadet and painted by pixelboy. You can play it in the game!

We had great fun and slept very little. Here’s a video of the resulting  game, called Porté par le Vent, which is French for  “Carried by the wind”.

If you don’t want spoilers, you better play it instead!

I released several minor updates over the week-end in addition to today’s bigger update. Here’s a list of all the changes that happened:

Project caching for instant export!

When running or exporting your game, CraftStudio downloads all the assets from the server. Starting with this new version, CraftStudio will check if you already have the latest version of an asset before downloading it all over again. Also, CraftStudio now requests required assets all at once when the export starts which makes the whole export process faster too.

During my tests, I was able to download the full Community Hub (almost 8000 assets, around 65 MB) in a minute or two. Most projects should download in a few seconds on reasonably fast connections and once cached, the export will be basically instant.

No more runtime memory leaks

The runtime was leaking memory pretty badly, which made some games crash when running for too long. I’ve gone spelunking deep into the code and plugged all the holes.

I plotted a few graphs while debugging to see how it progressed. Here’s what the memory usage graph looked like before:

Memory growing linearly over time. Not good!

And here’s what it looks like now:

Memory usage is now kept in check!

As you can see, the memory usage stays pretty much constant over time, which is how it should be!

Scripting fixes

  • Scripted behaviors can now have a Behavior:Start() method. It is called once after all the Behavior:Awake() methods have been called, just before the Behavior:Update() methods are called for each object. This is useful if you have a script that must do something depending on another’s behavior Awake method having been called.
  • Fixed Vector3.Lerp returning the wrong result, added Quaternion.Slerp for interpolating orientations.
  •  Vector3:Forward and Vector3:Left pointed the wrong way, they have been fixed but since it will break some existing scripts, the change will only be made if you upgrade your existing projects to the latest Script API version.

Miscellaneous improvements

  • Other people’s carets are now displayed in documents too (previously they were only displayed in scripts)
  • Map chunks were being streamed in the wrong order (from farthest to nearest), this is now fixed.
  • You can now delete a block and all its children in models (don’t sweat, there is a confirmation dialog)
  • Removed useless “Collapse All” button in scenes
  • Updated German translation (thanks sk2k!)
  • Fixed gizmo sizes in models & scenes.
  • Fixed joystick buttons not working with game controls of type “Button”.