Learn GS2 by building an adventure game
Clear quests to collect coins, then spend them to restore stamina. Learn GS2 by building this small game, including the ability to close the app and continue with the same player.
You should be able to open a Unity project and run a scene. No previous GS2 experience is needed.
The game you will build
- Log in and select a quest.
- Spend stamina to start it.
- Clear it to receive coins.
- When stamina runs low, spend coins to restore it and try another quest.
Build the interface in Unity and manage quest settings and player data in GS2. Use a Complete button instead of combat so you can focus on exchanging data with GS2 first.
See it in the demos
In the quest demo (new tab), use Forest patrol → Start to spend stamina and begin, then Complete to receive coins. This demo also includes a first-clear bonus.
In the stamina shop demo (new tab), use Get coins → Deposit to receive coins, then click Buy on a product under The shelf to restore stamina.
Follow this sequence
flowchart TD
B[Prepare the development environment] --> C[Build login and the quest list]
C --> D[Receive rewards and resume after restarting]
D --> E[Add stamina and a shop]
E --> F[Change settings and handle connection errors]
F --> H[Add features in the extensions]Follow Next at the bottom of each page to work through the tutorial. The first four chapters cover login, quests, rewards, and resuming after a restart. Then add stamina and a shop, and test network error handling. The extensions add features such as login bonuses to the same game.
Each chapter includes checks to try in the game and a short exercise.