This repository includes the Defold examples used in the examples section on https://defold.com/examples
Examples are grouped by category, for instance "physics", "sprite" or "collection". Each group of examples has a folder in /examples. Here's how to add a new example named "foobar" to the "sprite" category:
- Create a folder named
foobarinexamples/sprite - Create
examples/sprite/foobar/game.projectand the files required for your example - Create
examples/sprite/foobar/example.mdwith example documentation. The file must start with:
---
title: Foobar
brief: This example shows how to use foobar.
authors:
- Defold Foundation
- Another Contributor
scripts: foo.script, bar.script
thumbnail: myimage.png
---
- Use the
authorsarray for one or more contributors. The older singleauthorfield is still supported for existing examples. - Examples use the repository-wide CC0-1.0 licence by default. Add a
licensefield only when an example needs a different licence. - List any scripts your example uses in the
scriptsfield of the file header. A file name is enough when it is unique in the project. If multiple scripts have the same file name, use the exact path relative to the example project root (for example,main/player/player.script). - The thumbnail image will be used on https://defold.com/examples