Getting started - Introduction - Installing Defold - The editor - Glossary - Defold for Flash users - Getting help Project setup - Creating a project - Project settings - Libraries Core concepts - Building blocks - Addressing - Message passing - Application lifecycle Assets and resources - Importing assets - Importing 2D graphics - Importing 3D models - Adapting to different screen sizes - Live update - Atlas - Font - Resource management - Tile source - Texture filtering - Texture profiles Animations - Overview - Flipbook Animation - Model animation - Property animation (tweens) - Spine animation Components - Overview - Collection factory - Collection proxy - Collision object - Camera - Factory - Label - Mesh - Model - Particle FX - Sound - Spine - Sprite - Tilemap Gui - GUI overview - Box nodes - Text nodes - Pie nodes - Spine nodes - ParticleFX nodes - Template nodes - Scripts - Clipping - Layouts Physics - Physics overview - Collision objects - Collision shapes - Collision groups - Collision messages - Resolving collisions - Ray casts - Joints and constraints Sound - Sound - FMOD Input - Overview - Key and text input - Mouse and touch - Gamepads Game logic - Scripts - Properties - Script properties - Lua in Defold - Modules - Debugging - Writing code Saving and loading files - Working with files Networking - Overview - HTTP Requests - Socket connections - WebSocket connections - Online services Rendering - Render - Material - Shader - Texture filtering Workflow - Adapting to different screen sizes - Bundling an application - Bob the builder - Hot reloading - Optimizing an application - Profiling - Refactoring - The mobile dev app - Version control - Writing code - Working offline Debugging - Debugging game logic - Debugging native code - Debugging native code on Android - Debugging native code on iOS - Reading game and system logs - Profiling Platforms - Android - iOS - Nintendo Switch - Linux - HTML5 - macOS - Windows Monetization - Ads - In-app purchases - Web Monetization Extensions - Advertising Info - Camera - Facebook - Facebook Instant Games - Firebase Analytics - Google Play Game Services - Google Play Instant - In-app purchases - Inter-app communication - Push notifications - App review and ratings - WebMonetization - WebSocket - Webview Native extensions - Introduction - Details - Defold SDK - Adding auto-complete definition - Best Practices - Debugging - Build Variants - Manifest Merging Editor extensions - Editor scripts
Linux development
Developing Defold applications for the Linux platform is a straight forward process with very few considerations to make.
Project settings
Linux specific application configuration is done from the Linux section of the game.project settings file.
FAQ
Q: Why is the Defold editor super small when run on a 4k or HiDPI monitor when using GNOME?
A: Change the scaling factor before running Defold. source
$ gsettings set org.gnome.desktop.interface scaling-factor 2
Q: Why does mouse clicks on Elementary OS go through the editor onto whatever is below?
A: Start the editor like this:
Q: Why does the Defold editor crash when I try to create a new project, or open an existing one?
A: On certain distributions (like Ubuntu 18) there is an issue with the version of jogamp/jogl Defold uses vs. the version of Mesa on the system.
See the following reports for more information:
https://github.com/defold/editor2-issues/issues/1905
https://github.com/defold/editor2-issues/issues/1886
If this is your problem try the following workaround:
$ export MESA_GL_VERSION_OVERRIDE = 2.1
$ ./Defold
And if that doesn’t work then try (or some other version number matching your driver and larger than or equal to 2.1):
$ export MESA_GL_VERSION_OVERRIDE = 3.1
$ ./Defold
You may also need to specifically load libffi version 6 before starting Defold:
$ export LD_PRELOAD = /usr/lib/x86_64-linux-gnu/libffi.so.6
Q: My OpenGL drivers are outdated. Can I still use Defold?
A: Yes, it might be possible to use Defold if you enable software rendering. You can enable software rendering by setting the LIBGL_ALWAYS_SOFTWARE environment variable to 1:
~/bin/Defold$ LIBGL_ALWAYS_SOFTWARE = 1 ./Defold
Q: Why am I getting “com.jogamp.opengl.GLException: Graphics configuration failed” when launching Defold on Ubuntu 20.04?
A: On certain distributions there is an issue with the new Mesa drivers (Iris) when running Defold. You can try using an older version when running Defold:
$ export MESA_LOADER_DRIVER_OVERRIDE = i965
$ ./Defold
Q: Why doesn’t my Defold game start when I try to run it on Linux?
A: Check the console output in the editor. If you get the following message:
dmengine: error while loading shared libraries: libopenal.so.1: cannot open shared object file: No such file or directory
Then you need to install libopenal1 . The package name varies between distributions, and in some cases you might have to install the openal and openal-dev or openal-devel packages.
$ apt-get install libopenal-dev