development-guide

Scenes

February 26, 2018
development-guide

A scene is a Decentraland project that is spatially delimited, and is mapped to one or several LAND parcels. If a scene is deployed to the Decentraland Genesis City map, players can experience it by visiting the scene’s coordinates. If a scene is deployed to a World , players can visit it via URL. See Files in a scene for a list of what files are used in a scene project. ...

Asynchronous code

February 25, 2018
development-guide

Overview # Most of the code in your scene runs synchronously using a single thread. That means that commands are executed sequentially line by line. Each command must first wait for the previous command to finish executing before it can start. Even the functions in your scene’s systems are executed one by one, following a priority order . Running code synchronously ensures consistency, as you can always be sure you’ll know the order in which the commands in your code run. ...

Network connections

February 24, 2018
development-guide

Your scene can leverage external services that expose APIs, you can use this to obtain updated price data, weather data or any other kind of information exposed by an API. You can also set up your own external server to aid your scene and serve to synchronize data between your players. This can either be done with a server that exposes a REST API, or with a server that uses WebSockets. ...

2D UI

February 15, 2018
development-guide

You can build a UI for your scene, to be displayed in the screen’s fixed 2D space, instead of in the 3D world space. UI elements are only visible when the player is standing inside the scene’s LAND parcels, as neighboring scenes might have their own UI to display. Parts of the UI can also be triggered to open when certain events occur in the world-space, for example if the player clicks on a specific place. ...

About input actions

February 14, 2018
development-guide

A Decentraland scene can detect input actions from all of the buttons that are used to control the player’s avatar. These include pointer clicks, several action buttons, and the keys that are used to move the avatar around. Button events can come from a mouse, a touch screen, a VR controller or some other device, these are all interpreted the same by the SDK. You can detect input actions against an entity. ...

Button events

February 14, 2018
development-guide

❗Warning: This is a legacy page covering functionality with the old SDK version 6. See the latest version of this topic here . Decentraland accepts events from pointer clicks, a primary button and a secondary button. Clicks can be done either with a mouse, a touch screen, a VR controller or some other device, these all generate the same type of event. The primary and secondary buttons map respectively to the E and F key on a keyboard. ...

Quick start

February 11, 2018
development-guide

The Decentraland SDK is a powerful tool that lets you create scenes by writing in Typescript (Javascript + Types). This mini-tutorial walks you through how to get set up, and shows you the basic parts of a Decentraland scene. Install the editor # The Decentraland Editor is a Visual Studio extension, that allows you to build, preview and deploy Decentraland scenes. To install the Decentraland Editor: Install Visual Studio Code , if you don’t have it already. ...

Entities and components

January 15, 2018
development-guide

❗Warning: This is a legacy page covering functionality with the old SDK version 6. See the latest version of this topic here . Decentraland scenes are built around entities, components and systems . This is a common pattern used in the architecture of several game engines, that allows for easy composability and scalability. Overview # Entities are the basic unit for building everything in Decentraland scenes. All visible and invisible 3D objects and audio players in your scene will each be an entity. ...

Entities and components

January 15, 2018
development-guide

Decentraland scenes are built around entities, components and systems . This is a common pattern used in the architecture of several game engines, that allows for easy composability and scalability. Overview # Entities are the basic unit for building everything in Decentraland scenes. All visible and invisible 3D objects and audio players in your scene will each be an entity. An entity is nothing more than an id, that can be referenced by components. ...

Scene blockchain operations

January 7, 2018
development-guide

❗Warning: This is a legacy page covering functionality with the old SDK version 6. See the latest version of this topic here . A Decentraland scene can interface with the Ethereum blockchain. This can serve to obtain data about the user’s wallet and the tokens in it, or to trigger transactions that could involve any Ethereum token, fungible or non-fungible. This can be used in many ways, for example to sell tokens, to reward tokens as part of a game-mechanic, to change how a player interacts with a scene if they own certain tokens, etc. ...