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.
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.
Demonstrates several objects that react to your proximity. Simulates a Boolean Hole in a wall, has objects that move over/around you, triggers to activate effects inside or outside the building.
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.
Hit a server that validates that the player really is in Decentraland, in a specific parcel, with a recent time-stamp, and signed a message cryptographically with their ephemeral key.
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.
Provides all the utilities required to create card games in Decentraland. Also comes pre-packed with several card games that act as functional examples!
Game jam winners
You can access the code submitted by previous game jam competitions, for those scenes that creators chose to make open source.
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.
A set of tools for managing the playing of videos and video playlists, together with synchronized events in the scnene like animations. It reads subtitle-like instructions with time-stamps to match timing with the video.
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, 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.