What are you looking for?
Hero background image

Nine use cases for Unity’s Game Backend tools

Learn more about how Unity Gaming Services work together

Breaking down game backend

Building a backend to support your game systems isn’t easy, and you may not be able to build, host, and scale your own servers.

With Unity’s Game Backend suite, you can focus on creating content while we handle the heavy lifting.

Nine use cases for Unity’s Game Backend tools

Find out below what Unity’s Cloud Code, Cloud Save, Economy, and Authentication can do for you.

Use centralized server time
Use centralized server time

The simplest way to build timed elements in a game is to use device time. While that’s viable, unreliable device times can pose a challenge considering some players may use device time to cheat.

For example, players could manipulate the time on their device in order to expand the window during which they can access limited-time items.

Cloud Code allows you to write stateless server-side code and can offer a trusted, centralized "server” time that you can use when writing game logic.

Offer redeemable coupons
Offer redeemable coupons

Designing a rich system of in-game rewards can keep players engaged for a long time. Using Cloud Code, you can write scripts that can validate coupon codes and reward items in your game.

Plus, you can alter coupon logic even when the game is live without requiring a new game client update. Publishing changes on the server is enough to enforce new coupon redemption rules in the client.

You can use Cloud Save to track whether a player has redeemed their coupon and, once you’ve set up Economy, you can gift resources like in-game currencies or items.

Create daily reward schedules
Create daily reward schedules

Daily rewards can be an effective way to keep players coming back while letting them earn a variety of in-game items, especially in mobile games.

Since Cloud Code can be integrated with other Unity services, it’s a great tool for building the logic around daily rewards. You can define items and currencies in Economy, probabilities in Remote Config, and write the underlying algorithm in Cloud Code.

This allows you to alter the logic of daily rewards on the fly, without needing to update the game client.

Save player data across devices
Save player data across devices

Players expect to have all their in-game achievements and purchases to be preserved, no matter what. Their progress should not only be intact, but tied uniquely to them and consistent across all the devices they use to play.

By combining Cloud Save, Economy, and Remote Config with Authentication, you can save a player’s progress automatically and link it to their account.

When you use Authentication, you can set up sign-ins with platform accounts so the same player can sign in from Google, Facebook, Apple, or Steam and continue playing from wherever they left off from any device.

Protect your game economy
Protect your game economy

Once you’ve designed your in-game economy, you need to make sure you set up safeguards for it. Some ill-intentioned players may try to impersonate others in order to reap their in-game rewards or in-app purchases.

Economy works with Authentication and allows you to identify each player using unique tokens and IDs which can’t be manipulated by cheaters. This way, you’ll know which player has logged in and what their current inventory of currencies and items is.

Adding Cloud Code can make this process server authoritative, which adds another layer of protection to your in-game economy.

Change in-game logic instantly
Change in-game logic instantly

Rolling out live updates, bug fixes and improvements to your game often come with a difficult release process.

By moving in-game logic away from the game client by using Cloud Code, you can make changes for all of your players instantly. If you isolate your game logic away from the client device, you could update the game logic without requiring the player to update their installed version.

Build a smooth user experience
Build a smooth user experience

Using many online services for a mobile game means sending data via the internet multiple times. This can cause a jarring experience if a player’s connection is slow.

Normally, when you make changes to services like Economy or Cloud Save, you would read data from the server and decide what happens on the device. The resulting data would then have to be sent back to the server.

With Cloud Code, there is only one round-trip of information and the changes are implemented directly on the server. This creates a smoother experience for all players, no matter the speed of their internet connection.

Implement P2P for your multiplayer game
Implement P2P for your multiplayer game

If you’re using the Unity engine to develop a multiplayer game, you can take advantage of tools that are integrated in the editor in order to build and test your game securely, as well as maintain a consistent tech stack.

You can use Unity’s Relay service with Authentication to authenticate players connected on Relay in one of two ways: Anonymous sign-in or platform-specific sign-in.

These tools allow you to build, test, and operate your multiplayer game without needing a third-party solution or a dedicated game server.

Form compatible parties and lobbies
Form compatible parties and lobbies

When developing multiplayer games, you have to consider how your game’s features will encourage people to connect and play together.

Having a good understanding of which players to group into specific lobbies, parties, or matches can greatly impact players’ experiences.

By combining Unity’s Lobby and Matchmaker services with Authentication, you can group specific types of players and allow them to anonymously authenticate, connect, communicate, and play together.

These tools are flexible enough to support an array of game types, and scalable enough to support an influx of players in your game.

GBUC callout
Learn more ways to use Unity’s Game Backend tools

Our collection of samples shows you how to combine various Unity Gaming Services to solve common game development challenges, like creating loot boxes, starter packs, seasonal events, and more.