Gaming

Add PubNub to Your Unity Game to Power Online Features

3 min read Oliver Carson on Oct 25, 2022

Online Unity Games Need Online Features

Unity games that are connected online need social features such as in-game chat for players to communicate with players and teammates, friendly competitions with live leaderboard updates and scores, and notifications to update players on missed messages, in-game events, and news about the game.

While developers can set up this online infrastructure themselves, online features take time, money, and resources to create, secure, maintain, and update constantly. The resources used in this endeavor could be used instead to add more features to the game itself.

How does PubNub Help Power Online Features?

This is where PubNub, a developer API platform that enables applications to receive real-time updates at a massive, global scale, can handle this online functionality infrastructure. PubNub serves as the foundation for over 2000 customers in diverse industries, including gaming. Game developers can depend on PubNub’s scalability and reliability to power their games and tools for in-game chat, live leaderboard updates, and alerts and notifications to bring players back to the game.

Panzerdog’s fast-paced shooter Tacticool, built using Unity, uses PubNub to power their in-game chat. Panzerdog can depend on PubNub’s scalability and reliability to support communications for 100,000 plus daily players and 10 million downloads across the world.

Beamable, once a game developer now turned into a full-stack LiveOps platform for live games for Unity, depends on PubNub’s infrastructure to power its chat platform to build highly engaging and interactive games using their platform.

Mayhem lets gaming communities build customized leagues that attract players. They turned to PubNub to power their chat, real-time leaderboards, and mobile push notifications to ensure a smooth and limit-free player experience.

Check out our other customers to see how they use PubNub to power their gaming and other industry applications.

Build Online Features Using PubNub

Game developers use PubNub as the infrastructure to power their online features for in-app chat, live-leaderboard updates, and notifications to bring players back to their game. But how do these and other developers actually use PubNub to serve as the infrastructure for these online features?

PubNub offers features in its real-time data API that allows developers to fully integrate PubNub into their application for their specific needs, even if the tools and games may differ.

PubNub has the following features built-in to its API and can meet the specific needs of your application.

  1. Publish: Send updates whenever player input is updated, such as chat updates, emoji reactions, leaderboard scores, files, and other complex metadata.

  2. Subscribe: Receive updates to refresh players' screens.

  3. Presence: Update the online status of players and signal changes to friend lists.

  4. Message Persistence: Display any missed information to offline players once they login and leaderboard score information.

  5. Mobile Push Notifications: Notify mobile players who are offline about any missed messages and notify players about new in-game updates, events, and news.

  6. App Context: Store information about your players in one place without the need of setting up or calling your database.

  7. Access Manager: Restrict access for private conversations, chat rooms, special events, and player-restricted content for your players.

  8. Functions: Translate messages, censor inappropriate messages, announce the arrival of new players, and notify other players of mentions.

What's Next?

You’ve learned about PubNub’s key features and how you can use them to enhance your Unity game's online features for your players. Whether you’re creating a community for your players with in-app chat and social features, generating competition amongst players with a real-time leaderboard, or bringing players back to your game through notifications, PubNub can deliver real-time communication updates, so you can focus on your unique game needs.

If you would like to learn more about how to get started building your Unity game, take a look at our growing collection of updates, demos, tutorials, and documentation.

  • Explore PubNub's Unity Developer Path, a guided journey in how you can use PubNub's Unity SDK to build real-time games with ease.

  • Play our Unity demo PubNub Prix, a racing game where you can chat with other players in and view leaderboard updates in real time.

  • Learn how to add PubNub to your Unity game in our How-to guide.

  • Follow our step-by-step tutorial to set up and build the Unity game PubNub Prix.

  • Dive into our documentation for the PubNub Unity SDK, to learn how to customize PubNub's features that uniquely fit your application.

If you would like more personal assistance, please reach out to us. We’ll walk you through the best way to add PubNub to your application.