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
The Defold SDK
The Defold SDK contains the required functionality to declare a native extension as well as interface with the low-level native platform layer on which the application runs and the high-level Lua layer in which the game logic is created.
Usage
You use the Defold SDK by including the dmsdk/sdk.h
header file:
The available SDK functions are documented in our API reference . The SDK contains the following namespaces with functions:
Align - Alignment macros. Use for compiler compatibility
Array - Templatized array with bounds checking.
Buffer - Buffer API for data buffers as the main way to communicate between systems. Lua API for buffer creation also exists.
Condition Variable - API for platform independent mutex synchronization primitive.
ConfigFile - Configuration file access functions. The configuration file is compiled version of the game.project file.
Connection Pool - API for a pool of socket connections.
Crypt - API with cryptographic functions.
DNS - API with DNS functions.
Engine - API with core engine functionality to get handles to config files, the internal web server, game object register etc.
Extension - Functions for creating and controlling engine native extension libraries.
Game Object - API for manipulating game objects.
Graphics - Platform specific native graphics functions.
Hash - Hash functions.
HID - API for generating programmatic input events.
HTTP Client - API for interacting with a HTTP clients.
Json - API for platform independent parsing of json files.
Log - Logging functions.
Math - API with mathematical functions.
Mutex - API for platform independent mutex synchronization primitive.
SSL Socket - API for secure socket functions.
Script - Built-in scripting functions.
Socket - API for socket functions.
String Functions - API for manipulating strings.
Thread - API for thread creation.
Time - API for universal time and timing functions.
URI - API for manipulation of URIs.
Web Server - API for a simple high-level single-threaded Web server based on dmHttpServer.
Shared Library - Utility functions for shared library export/import.
Sony vector Math Library - The Sony Vector Math library mainly provides functions used in 3-D graphics for 3-D and 4-D vector operations, matrix operations, and quaternion operations.
If you need the dmsdk/sdk.h
header file for code completion in your editor of choice it can be found here in the main GitHub repository for Defold with header files for the individual namespaces here .