# Defold plugins, extensions and useful code snippets

**URL:** <https://forum.defold.com/t/defold-plugins-extensions-and-useful-code-snippets/2102>\
**Category:** The Defoldmine\
**Created:** [June 10, 2016, 10:19am UTC](https://forum.defold.com/t/defold-plugins-extensions-and-useful-code-snippets/2102 "2016-06-10T10:19:12Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Oleg\_The\_Evangelist](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/oleg_the_evangelist/32/1596_2.png) [@Oleg\_The\_Evangelist](https://forum.defold.com/u/Oleg_The_Evangelist)\
**Post date:** [June 10, 2016, 10:19am UTC](https://forum.defold.com/t/defold-plugins-extensions-and-useful-code-snippets/2102/1 "2016-06-10T10:19:13Z")

</div>

**UPDATE** :  
[defold.com/community](http://defold.com/community) is there.  
We inspire all the plugin makers upload their awesomeness to the brand new Asset Portal.

* * *

And while we’re working hard on editor and runtime extensions for Defold, there’s quite a bunch of things you can do today. I see lots of the cool things spread around the internets, so it is time to assemble some of the community add-ons here. And later on we’ll make a proper way for easy Assets Exchange.

I’ll keep the topic head updated with what you contribute below, just like it works with the [#MadeWithDefold topic](https://forum.defold.com/t/madewithdefold-the-released-games-list/2076).

**The extensions list** [WIP]

1. [https://github.com/kekdck/tiled](https://github.com/kekdck/tiled)  
A generic tile map editor [http://www.mapeditor.org](http://www.mapeditor.org)
2. [https://github.com/hxdefold/hxdefold](https://github.com/hxdefold/hxdefold)  
Haxe/Lua externs for Defold game engine
3. [https://github.com/DrVirtual/defnet](https://github.com/DrVirtual/defnet)  
Simple network engine for Defold - just proof of concept
4. [https://github.com/alex-ac/LevelEditor](https://github.com/alex-ac/LevelEditor)  
Isometric level editor for Defold
5. [GitHub - britzl/defads: Defold Ads Library Project - DEPRECATED! · GitHub](https://github.com/britzl/defads)  
A library project for showing ads using the webview.  
There’s also an example project showing the integration here: [https://github.com/britzl/defads\_example](https://github.com/britzl/defads_example)
6. [Enhance - Defold Native extension for over 30 SDKs](https://forum.defold.com/t/enhance-defold-native-extension-for-over-30-sdks/9042)  
Enhance - Defold Native extension for over 30 SDKs
7. [GitHub - AGulev/defold-extension-unity-ads: UnityAds native extension for Defold engine. · GitHub](https://github.com/AGulev/DefUnityAds)  
UnityAds native extension for Defold engine
8. [GitHub - subsoap/defos: Extra native OS functions for games written using the Defold game engine · GitHub](https://github.com/subsoap/defos)  
Extra native OS functions for Windows and MacOS
9. [GitHub - britzl/defold-gyro: Gyroscope extension for the Defold game engine · GitHub](https://github.com/britzl/defold-gyro)  
Gyroscope extension for the Defold
10. [GitHub - britzl/defold-googleanalytics: Google Analytics implementation for the Defold game engine · GitHub](https://github.com/britzl/defold-googleanalytics)  
Lua implementation of Google Analytics for the Defold
11. [GitHub - britzl/defold-png: Defold native extension to load and save PNG images · GitHub](https://github.com/britzl/defold-png)  
Defold native extension to load and save PNG images using lodepng
12. [GitHub - rgrams/defold\_polygon\_editor: A basic convex polygon editor that exports files for use with Defold. · GitHub](https://github.com/rgrams/defold_polygon_editor)  
A basic convex polygon editor that exports files for use with Defold
13. [GitHub - Lerg/extension-openal · GitHub](https://github.com/Lerg/extension-openal)  
Provides 3D audio, pitch control and other stuff.
14. [https://github.com/britzl/defold-timer](https://github.com/britzl/defold-timer)  
This is a timer module for the Defold
15. [GitHub - PlayFab/LuaSdk: PlayFab Lua SDK for LuaDist command-line, Defold, and more · GitHub](https://github.com/PlayFab/LuaSdk)  
PlayFab Lua SDK for Defold
16. [Library and pipeline for game localization](https://forum.defold.com/t/library-and-pipeline-for-game-localization/8855)  
Library and pipeline for game localisation
17. [GitHub - Megus/defold-router: whDefRouter&nbsp;— screen management solution for Defold Game Engine (includes demo project) · GitHub](https://github.com/Megus/defold-router)  
A powerful UI router for games built with Defold
18. [Sunsetting Atom - The GitHub Blog](https://atom.io/packages/defold-ide)  
This package provides hot reloading, autocomplete and in-line API docs for Defold
19. [GitHub - britzl/defcon: A developer console for games written using the Defold game engine · GitHub](https://github.com/britzl/defcon)  
A developer console for games written using Defold
20. [https://github.com/subsoap/deffx](https://github.com/subsoap/deffx)  
A collection of useful shader effects made ready to be used with the Defold
21. [GitHub - adamwestman/debeat: Sound Library for the Defold Engine · GitHub](https://github.com/adamwestman/debeat)  
Simple but effective library for Audio support
22. [GitHub - Bytonaaa/Guide42: GUI library for Defold game engine · GitHub](https://github.com/Bytonaaa/Guide42)  
GUI library for Defold game engine
23. [GitHub - andsve/dirtylarry: A quick and dirty GUI library for Defold. · GitHub](https://github.com/andsve/dirtylarry)  
A quick and dirty GUI library for Defold
24. [GitHub - britzl/defold-lfs: LuaFileSystem port to a Defold native extension · GitHub](https://github.com/britzl/defold-lfs)  
LuaFileSystem wrapper. LFS is a complement to the existing file system functions offered by the standard Lua distribution.

## **Hint** : look for a forum topic with any of the above and below to ask a question.

Also I’ll try to store some useful code snippets here. I inspire you to share what is cool and useful by your peers in the comments so the list below grows together with our community.

**The code snippets list** [WIP]

- [http://pastebin.com/C5AuRaGJ](http://pastebin.com/C5AuRaGJ)  
nil-condition support module by alprog.  
Provide two form of expression syntax.
- [https://github.com/unindented/defold-astar](https://github.com/unindented/defold-astar)  
Simple A\* demo.
- [https://github.com/britzl/lua-websocket\_example](https://github.com/britzl/lua-websocket_example)  
Lua and Defold websocket example based on lua-websocket and LuaSocket
- [https://github.com/britzl/publicexamples](https://github.com/britzl/publicexamples)  
Small examples for the Defold engine by @britzl
- [GitHub - kikito/cron.lua: Time-related functions for Lua, inspired in javascript's setTimeout and setInterval · GitHub](https://github.com/kikito/cron.lua)  
Allows you to trigger callbacks after any arbitrary amount of accumulated delta time.
- [GitHub - hxdefold/hxdefold-example-throwacrow: Defold example of a slingshot style physics game · GitHub](https://github.com/hxdefold/hxdefold-example-throwacrow)  
Defold example of a slingshot style physics game
- [GitHub - subsoap/defrs: A collection of useful general resources made ready to be used with the Defold game engine · GitHub](https://github.com/subsoap/defrs)  
A collection of useful general resources made ready to be used with the Defold game engine
- [GitHub - britzl/playfabexamples: PlayFab API examples for Defold · GitHub](https://github.com/britzl/playfabexamples)  
PlayFab API examples for Defold
- [GitHub - d954mas/defold-flappy-bird: flappy bird game made in defold · GitHub](https://github.com/d954mas/defold-flappy-bird/tree/master)  
flappy bird game made in defold
- [GitHub - andrewyavors/Lua-Color-Converter: Converts your hex or RGB values into Corona/Defold-compatible format · GitHub](https://github.com/SpycerLviv/Lua-Color-Converter)  
lua-script that allows you to use hex and rgb colors
- [GitHub - britzl/deftest: Unit testing in Defold · GitHub](https://github.com/britzl/deftest)  
This project shows one way of running unit tests in Defold using the Telescope unit testing framework.

- 

Also if you’re still here I suggest you check [The Big List of Defold tips](https://forum.defold.com/t/big-list-of-defold-pro-tips/1519).

---

<div class="post-metadata">

**Author:** ![DuncanChud](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/duncanchud/32/944_2.png) [@DuncanChud](https://forum.defold.com/u/DuncanChud)\
**Post date:** [July 7, 2016, 3:49pm UTC](https://forum.defold.com/t/defold-plugins-extensions-and-useful-code-snippets/2102/2 "2016-07-07T15:49:58Z")

</div>

The cron.lua library here [https://github.com/kikito/cron.lua](https://github.com/kikito/cron.lua) allows you to trigger callbacks after any arbitrary amount of accumulated delta time. Just send game loop update dt to its update function.

Pretty simple and nice, a bit more elegant than the standard Defold “fake animate a dummy object over X time”. Maybe this type of thing will someday make its way into Defold proper.

---

<div class="post-metadata">

**Author:** ![Oleg\_The\_Evangelist](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/oleg_the_evangelist/32/1596_2.png) [@Oleg\_The\_Evangelist](https://forum.defold.com/u/Oleg_The_Evangelist)\
**Post date:** [July 7, 2016, 4:46pm UTC](https://forum.defold.com/t/defold-plugins-extensions-and-useful-code-snippets/2102/3 "2016-07-07T16:46:24Z")

</div>

adding to the top post. cheers!

---

<div class="post-metadata">

**Author:** ![AGulev](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/agulev/32/4541_2.png) [@AGulev](https://forum.defold.com/u/AGulev)\
**Post date:** [June 10, 2017, 10:37am UTC](https://forum.defold.com/t/defold-plugins-extensions-and-useful-code-snippets/2102/4 "2017-06-10T10:37:18Z")

</div>

On the last week Dan made an update of hxdefold. Now it supports current actual Defold build 1.2.105  
[https://github.com/hxdefold/hxdefold](https://github.com/hxdefold/hxdefold)

And he made a port of example Throw-a-Crow (by @britzl ) to hxdefold:  
[https://github.com/hxdefold/hxdefold-example-throwacrow](https://github.com/hxdefold/hxdefold-example-throwacrow)

---

<div class="post-metadata">

**Author:** ![Oleg\_The\_Evangelist](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/oleg_the_evangelist/32/1596_2.png) [@Oleg\_The\_Evangelist](https://forum.defold.com/u/Oleg_The_Evangelist)\
**Post date:** [June 12, 2017, 10:20am UTC](https://forum.defold.com/t/defold-plugins-extensions-and-useful-code-snippets/2102/5 "2017-06-12T10:20:41Z")

</div>

indeed. Till Sticky Iron is out, we should keep this list up to date. Let me put some more things on top.

---

<div class="post-metadata">

**Author:** ![Oleg\_The\_Evangelist](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/oleg_the_evangelist/32/1596_2.png) [@Oleg\_The\_Evangelist](https://forum.defold.com/u/Oleg_The_Evangelist)\
**Post date:** [June 12, 2017, 12:27pm UTC](https://forum.defold.com/t/defold-plugins-extensions-and-useful-code-snippets/2102/6 "2017-06-12T12:27:43Z")

</div>

all, the list is getting larger. Shall we/I spend time making it easier to navigate through, or shall we wait for Sticky Iron to solve it?

---

<div class="post-metadata">

**Author:** ![Axel](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/axel/32/11723_2.png) [@Axel](https://forum.defold.com/u/Axel)\
**Post date:** [June 12, 2017, 1:22pm UTC](https://forum.defold.com/t/defold-plugins-extensions-and-useful-code-snippets/2102/7 "2017-06-12T13:22:29Z")

</div>

> [@Oleg\_The\_Evangelist](#):
>
> or shall we wait for Sticky Iron to solve it?

While me, @mikael.lothman and @samuel.nystedt are working hard on Sticky Iron (sorry about the public silence, roadmap available [here](https://trello.com/b/Gx1QlDYT/sticky-iron-roadmap)), we’re still quite a few weeks from being able to release it. Stay tuned!

---

<div class="post-metadata">

**Author:** ![Oleg\_The\_Evangelist](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/oleg_the_evangelist/32/1596_2.png) [@Oleg\_The\_Evangelist](https://forum.defold.com/u/Oleg_The_Evangelist)\
**Post date:** [September 19, 2017, 10:13am UTC](https://forum.defold.com/t/defold-plugins-extensions-and-useful-code-snippets/2102/8 "2017-09-19T10:13:30Z")

</div>

heads up all! [defold.com/community](http://defold.com/community) is there.  
I guess we shall close this thread soon and inspire all the plugin makers upload their awesomeness to the brand new Asset Portal.

Also [here’s the devlog for Sticky Iron](https://forum.defold.com/t/community-pages-was-project-sticky-iron/3683/19) (features Axel and Samuel with irons).
