<commit_before>## Contents

* Introduction
* Setup
  * Google Play Dashboard
  * Stencyl
* Leaderboards and Achievements
* Events, Quests and Rewards
* Troubleshooting
 

## Introduction

aaa

#### Supported Features

Feature | Supported?
--- | ---
Achievements | Yes
Leaderboards | Yes
Quests | Yes
Events | Yes 
Rewards | Yes
Saved Games | No
Multiplayer | No


## Setup

> **Note:** The [official documentation](https://developers.google.com/games/services/console/enabling) for Google Play Games is a good reference point if you're unsure about how the service works and what it offers.

#### Google Play Dashboard

aaa

#### Within Stencyl

- enable google play games
- google app ID
- fingerprints (?)

![stencyl-google-play-games-id](http://static.stencyl.com/pedia2/ch12/google-play-id.png)

#### Initialize the Service

- use the block
- no events at the moment - check if connection is initialized via boolean block


## Leaderboards and Achievements

Both Leaderboards and Achievements encourage light-hearted competition between players. **Leaderboards** are a place for all players to post their high scores while **achievements** increase your players' engagement by encouraging them to explore parts of the game or take on certain styles of play they may not have otherwise used.

#### Setup

Both Leaderboards and Achievements must be set up on the [Google Play Developer Console](https://play.google.com/apps/publish/). Read the following pages to learn about the setup process for these features.

* Setting up [Achievements](https://developers.google.com/games/services/common/concepts/achievements)
* Setting up [Leaderboards](https://developers.google.com/games/services/common/concepts/leaderboards)

#### Reporting Scores

Block | Description | Where to Find
--- | --- | ---
![stencyl-report-score](http://static.stencyl.com/pedia2/ch12/submit-score.png) | ID = Leaderboard ID<br/>Score must be a number | Game > Mobile

#### Reporting Achievements

Achievements can be designated as standard or incremental. An **incremental achievement** involves a player making gradual progress towards earning the achievement over a longer period of time. When creating an incremental achievement, you must define the total number of steps required to unlock it (this must be a number between 2 and 10,000). You can report the player's progress towards an incremental achievement using the **increase** achievement block.

Block | Description | Where to Find
--- | --- | ---
![stencyl-unlock-achievement](http://static.stencyl.com/pedia2/ch12/unlock-achievement.png)  | ID = Achievement ID | Game > Mobile<commit_msg>Update google-play.md<commit_after>## Contents

* Introduction
* Setup
  * Google Play Dashboard
  * Stencyl
* Leaderboards and Achievements
* Events, Quests and Rewards
* Troubleshooting
 

## Introduction

aaa

#### Supported Features

Feature | Supported?
--- | ---
Achievements | Yes
Leaderboards | Yes
Quests | Yes
Events | Yes 
Rewards | Yes
Saved Games | No
Multiplayer | No


## Setup

> **Note:** The [official documentation](https://developers.google.com/games/services/console/enabling) for Google Play Games is a good reference point if you're unsure about how the service works and what it offers.

#### Google Play Dashboard

aaa

#### Within Stencyl

Once you've set up your game on the Google Play Developer Console, you're ready to set things up in Stencyl. All you have to do is navigate to **Settings > Mobile > Certificates (Android)** and do the following 2 things.

* Click on the **Enable Google Play Games** checkbox.
* Enter in your **Google Play App ID**.

![stencyl-google-play-games-id](http://static.stencyl.com/pedia2/ch12/google-play-id.png)

> **TODO**: Talk about fingerprints / sha1.

#### Initialize the Service

Once you've entered in your Google Play App ID into Stencyl, you must initialize the service using the following block (under Game > Mobile). Use this block as early as possible - preferably in your game's first scene or loading sequence.

![stencyl-google-play-init](http://static.stencyl.com/pedia2/ch12/init-google-play.png)

After using this block, you'll want to know when the Google Play service has succeeded in connecting with your game or whether it has failed. The following block (under Game > Mobile) lets you check on this status.

![stencyl-google-play-events](http://static.stencyl.com/pedia2/ch12/google-play-events.png)

Unfortunately, no events exist at this time. What we recommend doing is checking for success or failure every few seconds, as shown in the following example.

![stencyl-google-play-example](http://static.stencyl.com/pedia2/ch12/google-play-example.png)


## Leaderboards and Achievements

Both Leaderboards and Achievements encourage light-hearted competition between players. **Leaderboards** are a place for all players to post their high scores while **achievements** increase your players' engagement by encouraging them to explore parts of the game or take on certain styles of play they may not have otherwise used.

#### Setup

Both Leaderboards and Achievements must be set up on the [Google Play Developer Console](https://play.google.com/apps/publish/). Read the following pages to learn about the setup process for these features.

* Setting up [Achievements](https://developers.google.com/games/services/common/concepts/achievements)
* Setting up [Leaderboards](https://developers.google.com/games/services/common/concepts/leaderboards)

#### Reporting Scores

Block | Description | Where to Find
--- | --- | ---
![stencyl-report-score](http://static.stencyl.com/pedia2/ch12/submit-score.png) | ID = Leaderboard ID<br/>Score must be a number | Game > Mobile

#### Reporting Achievements

Achievements can be designated as standard or incremental. An **incremental achievement** involves a player making gradual progress towards earning the achievement over a longer period of time. When creating an incremental achievement, you must define the total number of steps required to unlock it (this must be a number between 2 and 10,000). You can report the player's progress towards an incremental achievement using the **increase** achievement block.

Block | Description | Where to Find
--- | --- | ---
![stencyl-unlock-achievement](http://static.stencyl.com/pedia2/ch12/unlock-achievement.png)  | ID = Achievement ID | Game > Mobile
{'fraction_non_alphanumeric': 0.09705836086204184, 'fraction_numerical': 0.006449583136699701, 'mean_word_length': 4.452830188679245, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 16, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '86872', 'n_tokens_mistral': 1805, 'n_tokens_neox': 1693, 'n_words': 701}