
Defold continues our partner wrap-up of NG16:
We know that not everyone likes to read up on the manual before using a new game engine, but instead jumps right in to try it out. And we’re fine with that.
But if you’ve jumped in and wonder now if there are any cool features that you’ve missed, we have some tips and tricks for you.
Pkeod, one of our favourite game developers, has started a thread with tips and tricks on the Defold forum for both new and old Defold users. Here are eight of his best tips:
1. How to set things up if you want to make a pixel art style game
With Defold, you can make great looking pixel art games. If you wanted to, you could even apply shaders to make your game look like it’s being played on an old style screen.
2. Detecting the current OS information for selective code
Sometimes you want to enable or disable code, or have dummy simulated code go off depending on which platform you are testing.
3. Pre-hashing your hashes
If you are using hashes often in many places, you can optimize some by pre-hashing once, rather than to run hash on strings over and over as your scripts run. Doing this is easy and a good practice.
4. Defold render script
By default, Defold renders different parts of your game separately. As it renders the parts, you have the opportunity to manipulate each layer. This is controlled in the .render_script. Though Defold is optimized for 2D games, it is possible to make 3D games and to use 3D effects as well.
5. Dynamically loading and running Lua script with Defold
If for some reason (such as NPC dialog and movement scripting) you need to load scripts dynamically, then there are some special considerations required due of the way Defold bundles files.
6. Recording gameplay video directly in Defold
Need some video you can quickly put onto YouTube? Defold has built in support.
7. If you are not using hot code reloading, you absolutely should be
Hot code reloading can save you a ton of time when you are working on specific areas of your code, without needing to rebuild over and over again.
8. Pro Tip: Read the manuals!
Check out the Defold user manuals right here.
Looking for more great Defold tips? Find the whole thread here!