Giter Club home page Giter Club logo

vscode-defold-buddy's Introduction

Untitled

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.

vscode-defold-buddy's People

Contributors

mikatuo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

thinknathan

vscode-defold-buddy's Issues

Keep index for URLs autocompletion in sync

Fix the following:

Code completion for Defold URLs
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 runnin a command.
Open a .script file, you should see suggestions after typing a ", or pushing Ctrl+Enter with cursor next to a ".
Run "Defold Buddy: Index game files for autocompletion" when you need to refresh the autocompletion

Feature request: Add hot reload support for transpiled languages

At ts-defold, we run the TypescriptToLua transpiler to convert Typescript to Lua. Since we use .ts files, they don't trigger hot reload in Defold Buddy.

I was able to add support in a fairly naive way: add '.ts' as a file extension that triggers hot reload, and add a slight delay to give the transpiler time to finish before calling the hot reload. View commit. This isn't the most elegant solution, but it works for me.

I understand this may be outside the scope of this extension, but I thought I'd start the discussion.

[Create files from Explorer context menu] Pressing ESC doesn't abort creation of files.

Description:

ESC doesn't seem to abort creation of files.

Issue is present for both Game Object, Gui, Lua module.
image

System:

OS: WIndows 11
VSCode Version: 1.82.2

Repro steps:

Create a new Game Object via Explorer:
image

Popup appears to create the Game Object:
image

Press ESC popup proceeds with creation of Game Object and displays options:
image

Press ESC popup closes and empty game object called "player.go" is created.
image

self autocomplete

Hey :-)

Will there ever be a "self" autocomplete on variables added in other functions ?

thanks
matze

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.