The Defold examples show individual concepts and features of Defold.
This example demonstrates how to create a character animation system using a Finite State Machine (FSM) with smooth transitions between different character states.
This example shows how to tween animate the position of a game object.
This example shows how to chain two tween animations of the position of a game object. In addition, the scale and tint is animated separately.
This example shows how to set and animate the normalized cursor value.
This example demonstrates different easing functions available in Defold.
This example shows how to animate the rotation of a game object using the euler game object property.
This example shows how to use a flipbook animation in a sprite
This example shows Spine bone animation that blends when animation switches.
This example shows how a game object is rotated in discrete steps, matching the graphics of the progress spinner.
˄ Top
This example shows how to communicate between two script components in two separate game objects.
This example shows how to child a game object to a parent.
This example shows how to generate pseudo-random numbers in Defold using built-in math API.
This example shows how to put sprites in front and behind of eachother
This example shows how to use collection proxies to load and unload collections.
This example shows how to use collection proxies to show a splash screen while loading a game menu.
This example shows how to speed up or slow down animations in a collection proxy by changing the time step of the collection proxy.
This example allows you to toggle physics debug visualization as well as changing the time step so the simulation runs at one tenth of the speed.
This example shows the on-screen profiler. It displays useful runtime information.
This example shows how to dynamically spawn game objects with a factory component.
This example shows how to dynamically spawn bullet game objects using a factory component.
This example shows how to change the prototype game object used by a factory component.
This example shows how to spawn enemy game objects using a factory component with different properties.
This example shows how to load json data using sys.load_resource().
This example shows how to save and load data using sys.save() and sys.load()
A GUI box node with an image texture and a script to make it act as a button.
This example shows how change the color of GUI nodes at run-time
This example shows how to drag a GUI box node.
This example shows how to get and set a font resource on a gui component.
This example shows how to get and set a material resource on a gui component.
This example shows how to get and set a texture resource on a gui component.
This example demonstrates how to add different health bars.
This example demonstrates the use of layouts.
This example shows how to load and set a dynamic texture on a gui box node.
A GUI box node with an image texture and a script that react when pointer over this node.
This example shows how to create various types of progress indicators
This example demonstrates slice-9 scaling gui box node.
A GUI box node with "Clipping mode" set to "STENCIL". This makes it mask its child node (which is called "bunny").
Listens to input trigger "touch" and count mouse down duration in update method.
This example demonstrates how to pick a game object from the 3D scene.
Shows how to read mouse/touch movement and mouse/touch button state.
A very simple 8 ways movement setup with a single game object and a script that listens to input and updates the game object position accordingly.
Listens to text input trigger "type" and modifies the game object label with the alien's speech according to input. A "backspace" key trigger has also been added.
This example demonstrates a simple way to create and apply a custom sprite shader for changing colors and customizing an outline.
This example shows how to use a noise function to generate clouds, smoke or similar effect using a shader.
This example shows how to create a custom material with two textures that blend together to create a pattern effect using screen space coordinates.
This example shows how to get local UV coordinates of a sprite regardless of sprite size
This example demonstrates how to create and apply an custom non-lit material to a 3D model.
This example shows how to apply a basic shader to a full screen quad.
This example shows how to set and animate a vertex attribute
This example shows how to create a basic mesh component in the shape of a triangle.
˄