A package that downloads and bootstraps any version of GDevelops Core library.
npm install gdcore-tools
Require the module, call it and add a callback with .then
.
This will download the latest version of GDevelop, extract the required files,
and load GDCore wrapped with helpful functions.
const loadGD = require("gdcore-tools");
loadGD().then((gdtools) => {
// Create something awesome!
});
You can find examples here.
You can find the API for GDCore (WrappedGD.gd
) at the official GDevelop website. Note that every method in PascalCase
on the docs have to be used in camelCase
in JavaScript.
Triggered when GDCore wants to print a message.
Triggered when GDCore errors.
The entrypoint of the module. Accept a github release tag to specify a specific version to download and use.
The actual gd
namespace of GDCore.
Accepts a full path to a .json file, and returns a promise that resolves to the loaded gd.Project
instance.
Saves a gd.Project
to a JSON file. The default path is ./
and the default filename game.json
.
Returns a promise that resolves once the file is saved.
Exports a project to a directory. Some options may be passed to the exporter, but they aren't officially documented. Returns a promise that resolves once the export is done.
Regenerates the code and reloads all events based extensions.
Get the path to the downloaded and built GDJS runtime.