Hello, everyone! I’m Maksim, and we run a two-person company with @aglitchman. Last year, I had thoughts about making a 3️⃣ game with Defold that will use 2d physics and physics joints in an enjoyable way. I came up with the 3️⃣ idea of implementing a soft body in Defold. Also, I wanted to use the physics API provided by the engine 3️⃣ without any external native extensions. I managed to do it, and I want to point to this tutorial because it 3️⃣ helped me a lot in this task.
So, I got a soft blob-like thing, and I was tossing with it in 3️⃣ a prototype for a very long time. It turned out that it’s tough to invent something new. Finally, I got 3️⃣ an idea of a fat cat that likes to blow balloons. The name of the game is Puffy Cat, and 3️⃣ I’ll be glad if you play it on Poki!
The final version of the game has 150 levels, 26 hats, 18 3️⃣ balloon skins, 225 sprites, 35 sound fx, and plenty of fun! And we agreed with the publisher to make two 3️⃣ more games in the Puffy Cat series with new game mechanics and content.
What I like the most about Defold is 3️⃣ that:
I use Defold IDE to make levels, i.e. I have quite a few pre-made game objects to construct a level. 3️⃣ Every level is a collection with references to these game objects. All these levels linked to the parent collection as 3️⃣ Defold’s collection factories. It’s an easy way to make levels without any external editors like Tiled etc.
All I need to 3️⃣ run a game from sources is to download Defold IDE and build/run a project.
Amazing build time and the run-fix-restart-fix-restart-… loop. 3️⃣ I absolutely agree with the slogan: “Spend time making games, not waiting for builds!”.
Defold has the CLI tool bob.jar that 3️⃣ we use for CI to make debug builds for internal use, and release builds for the publisher.
that we use for 3️⃣ CI to make debug builds for internal use, and release builds for the publisher. Defold has free source code access, 3️⃣ and that gives, especially for us, two important things. First, the engine is not a black box, and if something 3️⃣ doesn’t work as you expect, you can look into the source code and find the answer. The second is that 3️⃣ you can propose any useful changes, and we added the Weld joint to the engine that we’re going to use 3️⃣ in the next part of Puffy Cat.
Gotchas
While the development I faced this issue, but I managed to fix it by 3️⃣ moving a reference to a common large collection from levels collections to a parent collection.
In-game physics is tuned up to 3️⃣ run with a fixed timestep on 16.67ms (60fps) or less. Otherwise, objects could fall through each other. We set display.vsync 3️⃣ = on, display.update_frequency = 60, and it turned out to be an issue because the game runs in “slow-mo mode” 3️⃣ if a player has really slow hardware. @aglitchman did a temporary workaround for this. To sum up, it will be 3️⃣ awesome if a developer can write his own “gameloop script” to control update/physics/render steps. @aglitchman will write his thoughts soon, 3️⃣ I think.
Acknowledgements
I use the following dependencies in the game:
https://github/Insality/druid - for GUI. It saves lots of time!
https://github/britzl/defold-orthographic to control aspect 3️⃣ ratio and scale, convert window/world coordinates.
https://github/britzl/defold-input to interact with bodies using triggers.
https://github/britzl/ludobits - flow greatly simplifies game logic.
greatly simplifies game 3️⃣ logic. https://github/subsoap/defos for the local development to resize and center game’s window on Windows.
https://github/subsoap/defsave to store saves in LocalStorage .
. 3️⃣ https://github/AGulev/defold-poki-sdk to implement Poki API.
https://github/rxi/lume - it’s a useful collection of functions for Lua.
https://github/indiesoftby/defold-sharp-sprite to make graphics look sharp at 3️⃣ any screen resolution from Apple’s Retina to old PC’s 720p screens.
https://github/indiesoftby/defold-liveupdate-reszip to implement lazy loading of game resources.
https://github/GameAnalytics/GA-SDK-DEFOLD to track 3️⃣ Lua errors.
Thanks @Insality, @AGulev, @britzl, @Pkeod, the great Defold community! And the Defold team for the engine, of course. I 3️⃣ didn’t face any blocking bugs or issues while developing the game!
The great in-game artwork was done by Tatiana Guleva.