Skip to content

Productivity tools for Defold to make your life easier and coding experience nicer

License

Notifications You must be signed in to change notification settings

mikatuo/vscode-defold-buddy

Repository files navigation

Buddy

Defold Buddy

Productivity tools for Defold to make your life easier and coding experience nicer.
You will have less reasons to alt-tab between VS Code and Defold Editor because you can run your game, hot reload changed files, fetch libraries from VS Code.

Features

  • Code completion for Defold API and dependencies
  • Code completion for Defold URLs
  • Asset Portal
  • Build (run) your game
  • Fetch libraries
  • Hot reloading
  • Open Defold Editor
  • Create a complex Game Object file from Explorer context menu
  • Generate manifest (reduce game bundle size) - also available in Defold Editor

Code completion for Defold API and dependencies

GitHub release

Demo (Defold API)...

  1. Open a Defold project
  2. You should see a prompt to initialize the extension

or

  1. Press Ctrl+Shift+P (or Cmd+Shift+P) or go to View > Command Palette.
  2. Select Defold Buddy: Initialize

a138ae9600cd0fa1d520bb4fbb8f33c897f3aa8f

4cf75769ac699bbe2e1242fd9f6af705ccb29816

Demo (project dependencies)...

2647bce06606342c31c08006257d11e0173b23f5

Code completion for Defold URLs

Demo...

Note: read about the addressing if you are not familiar with the concept

fb28a66cc769e7ccf8135deb9bfc110bbbf2eb6a

Known issues

For now the suggestions are not refreshed automatically when you make any changes to your .go and .collection files. For now you need to re-index them manually by running a command.

  1. Open a .script file, you should see suggestions after typing a ", or pushing Ctrl+Enter with cursor next to a ".
  2. Run "Defold Buddy: Index game files for autocompletion" when you need to refresh the autocompletion

Asset Portal

Demo...

  1. Press Ctrl+Shift+P (or Cmd+Shift+P) or go to View > Command Palette.
  2. Select Defold Buddy: Asset Portal

ezgif-4-b091012f33

Build (run) your game

Demo...

Note: requires Defold editor running in the background

Note: you can set a hotkey for this command as well as for any other command

81887c48d3bad6b29c9dbb49bea0c179d652cb05

Hot reloading

After .script, .gui_script or .lua files are saved they are automatically hot-reloaded if the game is running.

Demo...

Note: read about hot reloading in Defold

  1. Open Defold editor
  2. Run your game via the editor
  3. Modify a .script file and save it, the modified file should be hot-reloaded
dmengine_JBeVQ3Yx0P.mp4

Create a complex Game Object file from Explorer context menu

Create a Game Object file (.go) with components (sprite, script) and a factory file (.factory) for that Game Object with less clicks

Demo...

147121c5ed7f8954862f3a27fee4cf8cf1efaa16

Generate manifest (reduce game bundle size)

Demo...

You can generate the app manifest from Defold editor:

fc6f5813cdea82f6a8f264f7634f3b28855e6a3f_2_408x429

Or from VSCode:

8ea1248ec0f937778e9e3645a4158209fb53ada0


Feedback

If you would like to collaborate, contribute or request a feature feel free to do it at Github

Credit

Manifest generation code was copy pasted from Defold App Manifest generator by britzl.

Resources

Annotations used in this extensions are generated with Defold Lua Annotations.

About

Productivity tools for Defold to make your life easier and coding experience nicer

Resources

License

Stars

Watchers

Forks