-
Node (version >= 12, optimal 14)
In case of using Linux or MacOS, use NVM (Node Version Manager) to control your node version.
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
$ export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
$ nvm install 14
$ nvm use 14
-
Godot Engine with Dynamic GLTF Loader module
Run the following commands to get the engine and the module, and compile the editor
$ git clone https://github.com/godotengine/godot.git
$ cd godot
$ git checkout 3.3
$ cd modules
$ git clone https://github.com/you-win/godot-dynamic-gltf-loader.git
$ mv godot-dynamic-gltf-loader/dynamic-gltf-loader .
$ rm -rf godot-dynamic-gltf-loader
$ scons tools=yes -j8 -u
Why do we need this? Godot can't load GLTF models at runtime. For that, we need to expose the module that loads those resources to be used at runtime. Coming up in version 4!
godotengine/godot-proposals#3273 (comment)
The CLI allows you to compile and preview your scene locally.
To install the CLI, run the following command in your command line tool of choice:
$ npm install -g decentraland@latest
Read Installation guide for more details about installing the CLI.
If you need to update the CLI, remove it first
$ npm rm decentraland -g
$ npm install -g decentraland@latest
- Create a folder
- Enter it and run the following commands in your command line tool of choice:
$ npm i decentraland-ecs@latest
$ dcl init
To preview a scene run the following command on the scene’s main folder
$ dcl start
A browser will open on an URL like this, to preview the scene
http://localhost:8000/?SCENE_DEBUG_PANEL&position=0%2C0&realm=localhost-stub
NOTE: Pay special attention to the position
query string in the URL. That's where the scene is!
You can add the following flags to the dcl start
command to change its behavior
--port
to assign a specific port to run the scene. Otherwise it will use whatever port is available. Default 8000--no-debug
Disable the debug panel, that shows scene and performance stats--no-browser
to prevent the preview from opening a new browser tab.--w
or--no-watch
to not open watch for filesystem changes and avoid hot-reload--c
or--ci
To run the parcel previewer on a remote unix server--web3
Connects preview to browser wallet to use the associated avatar and account--skip-version-checks
Avoids checking if the scene’s ECS library version matches your CLI version, and launches the preview anyway
To connect the browser and Godot, you need to add a websocket server address to the browser
-
Start the godot project in
wsocktest/
. This will open a websocket server on port 9080 (see server.gd) -
Reload the browser adding a ws parameter to the URL query string, specifying the websocket server address to like this
http://localhost:8000/?SCENE_DEBUG_PANEL&position=0%2C0&realm=localhost-stub&ws=ws://localhost:9080
Check this test scenes. Just download and dcl start
them!
https://github.com/decentraland-scenes/Awesome-Repository
https://github.com/menduz/text-renderer
https://diagrams.menduz.com/#/notebook/2l3t8FEx6Yc4GyDvkdDe4EQKf2L2/-MhVIlsuYfNVGtyiUN13
https://github.com/decentraland/kernel/blob/main/packages/shared/proto/engineinterface.proto
https://github.com/decentraland/ecs-reference/blob/master/docs-latest/decentraland-ecs.md