> For the complete documentation index, see [llms.txt](https://docs.miniton.games/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.miniton.games/developer-success/miniton-gaming-sdk/introduction.md).

# Introduction

{% hint style="info" %}
🔐 Game developers obtain a developer key (**Secret Key**) from MiniTon for data consistency verification, ensuring data security.&#x20;

[**Click here to apply for Secret Key**](https://docs.google.com/forms/d/e/1FAIpQLSee0PidvGia2ME5fQzmX5AZorKxTFOflEogsI8lVF2f1HZMUA/viewform?usp=sf_link)

**👺 Game Constraints:**

1. New player tutorial should be displayed
2. Each game needs to set a countdown timer, which used to finalize the game&#x20;
3. If a player quit before the countdown timer ends, the score should be reported
   {% endhint %}

## Overview

1. 🎬First the game developer need includes the two JS file\[`telegram-web-app.js` & `miniton_2.0.js`], calls the `init` function through the SDK to obtain game-related information.

{% hint style="info" %}
![](/files/ibCmPb4MAbFFb0272dq1)

The main page will be displayed at the top layer of the game interface. While the game is loading its resources

It should simultaneously update the progress bar on the main page.

Loading bar progress by calling the `setProgressValue` function via the SDK.&#x20;
{% endhint %}

2. 🚀 Upon entering the game screen
   * Call `start_game` via backend API in order to tell MiniTon the player had started a game.
3. 🕹️ When the game begins
   * Call `start_match` via a backend API call
4. 🎱 While the game is in progress
   * (optionally) Can report "Match Score (`score`)"  multiple times through API
5. 🏁  At the end of the game
   * Call "Match Result (`end_match`)" via a backend API call
6. 🛑 After the game ends
   * Call the SDK’s `setGameOver` function
   * Report “Game End (`end_game`)” information to MiniTon via backend API call


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.miniton.games/developer-success/miniton-gaming-sdk/introduction.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
