Hey everyone!
I am excited to finally release my first game made in Defold!
It’s a classic block puzzle game to test out my cross-platform pipeline. I hope this post can encourage more people to use defold and see how lightweight and cross-platform defold is.
Coming from a Unity background, Defold feels much more lightweight. It has some idiosyncrasies, but once I got used to lua and the defold way of doing things, everything felt super satisfying because of how performant they are.
Though this may seem like a simple game, piece selection is actually surprisingly tricky. Initially I used a random algorithm for selecting pieces each round. The game wasn’t satisfying at all and you would lose very easily. I spent a few days writing a smarter algorithm for selecting pieces, but found out that it wasn’t fast enough. After rewriting the entire algorithm in C, I was able to reduce the time to generate pieces each round from 500ms to 5ms!!! That was a really magical moment to me, and I think Defold truly achieved a great balance between ease of use and performance.
On the down side, I struggled with GUI in particular, because I want my games to be able to adapt to any screen resolutions. It felt weird not having a full-fledged layout system, but thankfully there were a lot of useful extensions available.
Extensions used (Thank you! )
- druid for creating reuseable GUI components, by @Insality
- yoga for responsive GUI layouts, by @fae
- defsave for saving/loading data, by @Pkeod
- orthographic for easier camera manipulation, by @britzl
- defos for cross-platform cursor support, by @Pkeod
- safearea for mobile safe area detection, by @Defold
- sharp-sprite for improved texture rendering, by @aglitchman
What’s next:
- Mobile release
- Localization support
- See how fast I can develop a second game using the same pipeline
Special thanks to the defold team for making this amazing engine!