Understanding Modules
YarsaPlay is equipped with multiple modules, each serving its own set of services. To better grasp the concept and understand the different components of YarsaPlay, follow through this documentation.
Modules Overview
There are multiple factors when it comes to accustoming your game to a wide set of audience. These modules can help you manage and maintain your backend requirements.
Module | Description |
---|---|
Authentication | Ensures secure and reliable player authentication through Device ID and social logins (Facebook, Google Play, Apple). |
Profile | Helps players customize and manage profile details like display name, avatar, and linked social accounts. |
Friendship | Enables players to manage connections: send/receive/cancel friend requests, block/unfriend others, and access friend lists (current friends, requests, blocked users). |
Assets | Allows adding and managing in-game assets in various formats: images (.jpg, .jpeg, .png, .gif, .webp), audios (.ogg, .wav, .webm, .mp3), and Unity addressables. |
Inventory | Manages gamer inventory items: configures items, creates bundles for in-game shop, distributes task rewards, daily login rewards, and incentives for top leaderboard players. |
Daily Login Reward | Automatically distributes pre-configured rewards to players upon daily login. |
Shop | Provides options for selling in-game items, either through in-game currency or monetized microtransactions. |
IAP | Verifies all purchases made through microtransactions for Google Play and Apple. |
Statistics | Enables custom creation of game-specific or player-specific metrics for task creation and player positioning on the leaderboard. |
Task | Allows design of missions for rewards, set to repeat (Daily, Weekly, Monthly, Seasonal) or as one-time achievements. |
Leaderboard | Creates multiple leaderboards to rank players based on skills and achievements. |
Leaderboard Rewards | Offers an automated system to distribute rewards to top-performing players. |
Authentication
Simplify user login from multiple sources to your game with the Authentication module. Players can easily login, link and unlink their social media accounts with your game, making it interactive and more engaging by seamlessly integrating their social circles.
Enable login from Device with it’s unique device identifier, Facebook with Client ID and Client Secret Key, Google Play authentication or one-tap Apple login. With game-specific authentication, every player's login experience is streamlined and secure, ensuring that they can quickly access their accounts and enjoy a personalized gaming experience without unnecessary hassle.
Authenticate the players to your preferred platform by following the listed steps:
Device
- Fetch the Unique Device Identifier and feed it to the Authentication API endpoints to login, link or unlink the player account.
Facebook
- Follow the steps listed by Meta App Development to create an app.
- Once completed, implement Facebook login for games and, enable permissions for the following app scopes:
public_profile
email
user_friends
user_photos
- After the permission is added, you can try our Authentication APIs by sending access token back to our server.
Google Play
- Create your game project and implement Google Play sign-in on your app by following the steps listed by Google Play Games Services.
- Once completed, send the auth code back to our server for authentication. Now, you can use the API endpoints for linking, unlinking and logging in with your Google Play account.
Apple
- Create an app and follow the steps to authenticate users with Sign in with Apple.
- Once completed, use the JSON Web Token (JWT)/ID_Token back to our server to authenticate with Apple.
Check Authentication API Documentation to authenticate the players using the available endpoints provided by YarsaPlay.
Assets
Assets are those elements that help you build the audio-visual aspect of your game. Character designs, power-ups, backgrounds, user interface components, and animations are all examples of assets that contribute to the overall aesthetic and functionality of your game.
To manage your game assets, YarsaPlay provides Assets module where you can upload, organize and filter all your important 3D renders, 2D sprites, audio files, scripts, and other resources essential for developing your game.
These are the supported file types and formats:
- Unity Addressable — Generated files by Unity, blobs, and JSON
- Image —
.jpg
,.jpeg
,.png
,.gif
, and.webp
- Audio —
.ogg
,.wav
,.webm
,.aac
and.mp3
You can now access and implement the API endpoints for the Assets module.
Inventory
Inventory items are anything a player can own in their gamer inventory, and also entities like shop spend items (coins), shop receive items (buying gems in exchange of coins), rewards(skins, or equipments), or login rewards. An inventory, in this context, refers to a system that manages the supply, usage, and status of the assets within the game.
Define the items added in the Assets module, including elements such as weapons, armor, consumables, and other virtual objects, by specifying their quantity and properties under the Inventory Module. It allows for the control of item occurrences and volumes by defining their commonality or rarity, which directly influences gameplay dynamics, including how often certain equippable items appear and their impact on gameplay.
Game items must be added in the Assets module first to manage and utilize them through the Inventory module. In the Inventory, all game items can be labeled for easy identification and allocated with their default and maximum ownable quantities. This helps define each item's status within the game, making it easier to manage player interactions with those items.
Access and implement the API endpoints for the Inventory module here.
Daily Login Reward
Awarding your players is important as it encourages engagement, establishes loyalty, and enhances overall satisfaction with your game. Provide coins, gems, virtual currencies or any other game items as daily rewards with our Daily Login Reward module.
Add your items in the Inventory module, and create login rewards by specifying the reward item and quantity for each day. When you add items to the list, they are sorted sequentially based on the order you specify. Each item is assigned a number that represents the day it will be given as a login reward.
For example, the item labeled as number 1 will be rewarded on the first day a player logs in, the item labeled as number 2 will be rewarded on the second day of login, and so on. This sequence ensures that players receive specific rewards in a predetermined order as they continue to engage with the game over consecutive days.
Access and implement the API endpoints for the Daily Login Reward module here.
Leaderboard
Leaderboards are a great addition to games, fueling competition and providing a sense of achievement among players. There are multiple ways to translate player’s victory in terms of ranking with the use of missions, tasks, daily challenges, or by fulfilling any other pre-defined goals.
With the Leaderboard module, you can liven up your game by adding rankings based on player’s stats like total kills, missions completed, achievements unlocked, significant milestones, and other interesting criteria. Players can compare their progress across different metrics, deepening their connection with the game and encouraging replayability. Additionally, it allows for recognition of different play styles and strategies, appealing to a broader audience of players.
Customizing the duration and reset interval of the leaderboards is also an option within the Leaderboard module. This feature keeps the competition fresh by allowing players to regularly challenge themselves and others within specified timeframes, ensuring ongoing excitement and engagement.
Access and implement the API endpoints for the Leaderboard module here.
Shop
Players can utilize their in-game economy with Shop module from YarsaPlay. Tokens, credits, gems, coins, or points, acquired through gameplay achievements, microtransactions, or rewards from events and challenges can be used to make these purchases in-game.
This feature empowers you to fully customize your Shop items according to your game requirement. Offer individual items or create player-friendly bundles with item combo, providing flexibility in your game's economy. With the ability to integrate one or more currency types, you have complete control over pricing strategies. For instance, in games where both coins and gems are used for transactions, certain items may be purchased using only coins, only gems, or a combination of both.
This feature facilitated by YarsaPlay promotes in-app purchases (IAP), proving particularly beneficial for indie or small-scale game developers facing challenges in managing game monetization. Overall, implementation with YarsaPlay’s API is also quick, easy and cost-effective.
Access and implement the API endpoints for the Shop module here.
IAP
Showcase your shop and monetize your inventory items alongside validating purchases with YarsaPlay’s IAP validators. Easily implement IAP for Google or Apple with our API endpoints, ensuring secure and reliable transaction process.
Our validators handle purchase verification and fraud prevention, making it simple to manage and authenticate in-app purchases. Protect your revenue, enhance player trust, and seamlessly integrate with your existing systems to offer a smooth purchasing experience for your users.
In the YarsaPlay IAP Dashboard, Google and Apple IAP contain fields for entering specific credentials. Follow these steps to acquire the necessary details for validating IAP with the platforms.
Getting clientId
, clientSecret
and Refresh Token for Google IAP
- Go to Console Cloud and create a new project if you don’t have an existing one.
- Create
clientID
by following the steps listed under Creating an APIs Console Project. - Similarly, use the
clientSecret
corresponding to theclientID
and follow the steps listed under generating refresh token to get one. - Enter the empty fields with the
clientID
,clientSecret
, and generated refresh token.
After completion of the aforementioned steps, you can access our API endpoints for validating in-app purchases done through Google for a specific item.
Getting Password for Apple IAP
After adding the Bundle ID under the Package Name field, you’ll need to retrieve the password from Apple by following the listed steps:
- Head to Apple Store Connect, and login with your Apple developer credentials.
- The password is an app specific secret shared by Apple for auto-renewable subscription. You can access the details under the App Information section of your specific app.
This way, you can fetch the Password for your Apple IAP and proceed to calling the available API endpoints for validating the purchases made through your game application.
Access and implement the API endpoints for the IAP module here.
Stats
Game statistics provide valuable insights into a player’s progression and engagement with the game. These data are crucial for determining a player’s position on the leaderboard, tracking their achievements, and rewarding their efforts. The Leaderboard and Task module rely on information acquired from the Stats module to operate effectively.
As players interact with your game, the system automatically considers all relevant factors that impact leaderboard rankings and reward criteria defined by your team. For example, if you integrate the K/D ratio into the Stats module of your FPS game, you can set conditions such as earning 5 kills without any deaths to reward the player with 500 coins. Once this objective is met, the player receives the coins immediately.
Depending on your game requirements, you can completely create and customize statistics with YarsaPlay. Player K/D ratio, XP, scores, and time efficiency are some examples of statistics that can be used to determine a player’s ability.
Access and implement the API endpoints for the Stats module here.
Task
Tasks are missions that players or groups must complete to earn rewards or experience points (XP). Your game should include specific statistical details in the Stats module to design and assign these missions to players. Players can undertake these missions to expedite game progression, accomplish objectives, and enhance their in-game abilities.
The development team can easily create new tasks based on the statistics they have pre-defined for their games. You can categorize your tasks into two main groups: Parent Tasks and Child Tasks, based on factors like difficulty, rewards, or the player's skill level.
A Parent Task is a main objective that requires significant effort, resources, and advanced player skills to complete, offering substantial rewards. On the other hand, Child Tasks are smaller tasks that together contribute to achieving a Parent Task. They are generally easier to complete, require fewer resources, and offer minimum rewards.
Access and implement the API endpoints for the Task module here.