Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADR-156-scene-triggers-custom-animations #156

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open
73 changes: 73 additions & 0 deletions content/ADR-155-scene-triggers-custom-animations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
---
layout: adr
adr: 155 # replace this number for the PR or ISSUE number
nearnshaw marked this conversation as resolved.
Show resolved Hide resolved
title: Scene triggers custom animations
date: 2022-12-15
status: Draft # pick one of these
type: RFC # pick one of these
spdx-license: CC0-1.0
authors:
- nearnshaw # this is your github username
# remove the following line! it exists to render the template nicely
slug: /adr/scene-triggers-custom-animations
---

## Abstract

<!--
Abstract is a multi-sentence (short paragraph) technical summary. This should be a very terse and human-readable version of the document section. **Someone should be able to read only the abstract to get the gist of what this document is about in its current state.** Abstracts should be always up to date with the current state of the document.
-->

This is a proposal to add a feature to the SDK to allow scene creators to include custom avatar animations as part of a scene’s content, and to trigger these animations on players. The scene wil then be able to use these whenever they make sense in a scene’s mechanics.
nearnshaw marked this conversation as resolved.
Show resolved Hide resolved

## Context, Reach & Prioritization

<!--
Discuss and go into detail about the subject in question. Make sure you cover:
- Why is this decision important
- The urgency of the decision
- Datapoints and related background information
- Vocabulary and key terms
-->

In most experiences in Decentraland you see other players standing still, even if they’re actively engaging with the scene they just stand motionless. This limits a lot of the social aspects of playing with others. It also makes you wonder if other players are even playing at all, or if they’re not even at the keyboard, or if they’re just confused trying to understand the rules.
nearnshaw marked this conversation as resolved.
Show resolved Hide resolved

While playing alone, these customized animations can also bring a lot more fun into a scene, by making our actions more lively and leaving less to our suspension of disbelief.
nearnshaw marked this conversation as resolved.
Show resolved Hide resolved

## Solution Space Exploration

<!--
Discuss the potential alternatives and their impact. What alternatives are being considered, their benefits, their costs (team resources, money, time frames), and mitigations for any drawbacks.
-->

Discuss the potential alternatives and their impact. What alternatives are being considered, their benefits, their costs (team resources, money, time frames), and mitigations for any drawbacks.
nearnshaw marked this conversation as resolved.
Show resolved Hide resolved

## Specification

<!--
The technical specification should describe the syntax and semantics of any new feature.
-->

It should be possible for content creators to upload files that include instructions for an avatar animation, following the same limitations as the files uploaded for NFT emotes. These animations however won’t be NFTs, they will be animations that the scene can trigger on any player who visits the scene.
nearnshaw marked this conversation as resolved.
Show resolved Hide resolved

The scene can then trigger these animations on players whenever they make sense in the game’s mechanics. For example, Wondermine could play a “swing” animation whenever a player is mining a meteor, or the casinos could play a “show-cards” animation whenever the player plays their hand in a poker game. A fighting game could include animations for throwing punches, animations for receiving damage, and animations for dying.
nearnshaw marked this conversation as resolved.
Show resolved Hide resolved

As happens currently with all player animations, other players that are around see the animations, the scene creator doesn’t need to do anything extra for this to happen.
nearnshaw marked this conversation as resolved.
Show resolved Hide resolved

As with the triggering of default animations today, the scene should include special permissions to allow it to trigger emotes on an avatar.

Since the animations are downloaded together with the scene's content, there's a corner case that needs to be handled gracefully: Player A sees Player B far away, but has not downloaded the scene where Player B is standing. The scene triggers an animation on Player B, but Player A doesn't have that animation downloaded. In this scenario, it's acceptable for Player A to not see the animation, since Player A is also not seeing the scene that gives that animation context.
nearnshaw marked this conversation as resolved.
Show resolved Hide resolved


**Syntax and semantics**
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how will the scene creator specify and upload the animations? I think we should leverage as much as possible the emotes functionality for it. Any idea on how it may look?


This could be implemented via a component that is added to the player entity, which can be used to trigger animations either from the default list of animations, or from any animation file that is uploaded with the scene.
nearnshaw marked this conversation as resolved.
Show resolved Hide resolved

**Open questions**

- Should the scene also be able to control the avatar locomotion animations? For example, replace the default walk, run or jump animations for crawling, or skating or holding a gun, or whatever makes sense in the scene. Is this easy to achieve?
nearnshaw marked this conversation as resolved.
Show resolved Hide resolved
- Can scene custom animations also be able to spawn images or geometries? Like the hearts or the clap icons from default animations.

## RFC 2119 and RFC 8174

> The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 and RFC 8174.