If you can think of an example that is easy to understand and covers valuable topics that aren't covered here, you're encouraged to create a Pull Request and contribute!
A simple example of each way in which players can use button events to interact with the scene. Each shape's color is activated by interacting with it in a special way.
A character walks along a fixed path, using lerp over each segment of the path. If you approach it, it will switch states to yelling at you. Check out the related tutorial.
Use ray casting to trace a line in space and check for intersections. Cubes change material when hit by the laser. They also change when being pointed at by the player.
Use ray casting to trace a line in space and check for intersections. Cubes change material when hit by the laser. They also change when being pointed at by the player.
A simple AI character that randomly chooses what action to take: follow you, sit or remain idle. Tell it to sit or stand up by clicking it, or tell it to drink water by clicking its bowl.
Hit a world clock API to sync the position of a tram line, so all players see them on the same location. Each tram does a full loop every 3 minutes, basing its position on every frame relative to the time.
Each player runs physics client side. Websockets sends information about new forces applied to the entities. The broadcast server syncs these changes to all other players in the same realm.
Each player runs physics client side. Websockets sends information about the throwing of the frisbee. The frisbee is hidden when picked up by a player.
A team game for 2 players or more, where tiles switch colors when walked on. The server keeps track of the game's state, and has the final word about when the game ends and who won.
A very handy collection of common tasks made simple. Gradually move, rotate or scale over time. Add trigger areas, delay an action, run an event periodically, and more!.
Tools to easily create non-player characters (NPCs) that you can have a conversation with. They can ask quesions, play animations, turn around to always face the player, etc
Several functions to allow you to easily carry out operations with MANA, other currencies, NFTs, the Marketplace, sign messages or anything that involves smart contracts.
Several functions to allow you to easily carry out operations with MANA in a Layer 2 Ethereum network, with significantly reduced gas fees and transaction delays.
A Scene Object Model (SOM) file lists all of the GLTF or GLB models to load into a Decentraland scene. This module contains a SceneObject data structure used to define the models and their positioning in the world, and a ModelLoader class that handles the loading and positioning at runtime.
Tools for generating semi-random noise based on the Perlin and Simplex algorithms. These generate random sequences of values similar to the kind of randomness seen in nature.
Note: To update these libraries from versions older than February 9th 2021, see the migration guide
Tutorials
Video tutorials
Find a full playlist of all Decentraland video tutorials here:
This series of 5 minute videos covers a number of essential concepts, game mechanics and coding best practices. They take you through the whole process of building a full escape room game.
Tip: The videos are presented in the above link together with written accompanying content, including all the code in case you want to copy and paste parts of it.
The full code from the tutorial is available in this repository.
Download a freely licenced 3D model from Google Poly, import it into Blender and then create an armature to manually create your own animations for it.
Copyright info
All of these scenes are open source, protected with a standard Apache 2 licence. This licence states that this content can be used freely, even commercially, as long as you acknowledge the author. See the terms and conditions in the LICENSE file.
About
A collection of links to examples and tutorials to help you get started building Decentraland scenes and other content.