How to use Illuminate to Balance your Games
Published: 2024-07-03 06:30:46

PubNub’s latest product release, Illuminate, is a scalable decision-making tool that we have built to help game developers, product managers, and project managers build, iterate, and experiment within the PubNub platform. 

Designed with a great UI from the ground up, you can use Illuminate to help make decisions to drive a better gamer experience and accelerate monetization in real-time.

**So what's game balancing, and how can you use it in real-time?**
------------------------------------------------------------------

Game balance is a branch of game design that improves gameplay and user experience by balancing difficulty and fairness. Game balance consists of adjusting rewards, challenges, and/or elements of a game to create the intended player experience.

Game balance is generally understood as introducing fairness for the players. This includes;

-   Adjusting difficulty, 
    
-   Modifying win-loss conditions
    
-   Game states
    
-   Economy balancing
    

You can find more information on game balancing on [Wikipedia](https://en.wikipedia.org/wiki/Game_balance).

Using game balancing in real-time can help keep players engaged, make new players feel welcome, and potentially monetize the gameplay. 

**How can Illuminate help you keep your players engaged?**
----------------------------------------------------------

As mentioned, Illuminate is an in-the-moment decision-making tool.  To help keep our players engaged we will focus on new players, those who are new to the game and potentially need some help getting used to how the game is played. 

In this example, I have built an old-fashioned copy of asteroids written in JavaScript and hosted entirely on PubNub functions. You can find out more about PubNub functions at [https://www.pubnub.com/docs/serverless/functions/overview](https://www.pubnub.com/docs/serverless/functions/overview?). 

### **First off, to set the scene.** 

Imagine a new player joins your game and starts to play, they lose and are starting to get bored of the lack of progression. 

Via a publish, we can send a message from the game into PubNub that notifies Illuminate of the player’s progression and score, Illuminate makes some decisions based on predefined metrics and then issues a message back to that player offering them the option to buy three lives or watch a paid for promotion in exchange for getting two lives. 

### **Let's walk through the screens.**

![Use Illuminate to Balance your Games](https://www.pubnub.com/cdn/3prze68gbwl1/5ELOgmKIhdlJDGcsRfeLRr/ea1c9bd24814904ca26d9add6fd150ce/image2.png "Use Illuminate to Balance your Games - Image - 01")

The game starts as normal, but as you can see I’m really not a great player and died with just 70 points.

![Use Illuminate to Balance your Games](https://www.pubnub.com/cdn/3prze68gbwl1/25ixCXROWywRJGXEfuZ1ww/f674cfdcbe0452c50e9a4006b61407cb/image3.png "Use Illuminate to Balance your Games - Image - 02")

To help me continue to keep playing, Illuminate received this score and calculated that I should be offered the opportunity to buy some lives or watch an advertisement to get some lives.

![Use Illuminate to Balance your Games](https://www.pubnub.com/cdn/3prze68gbwl1/6JROao8WMMGqV8dfKIj3XV/e584b545d64fc7edde4332e76c3b2d2b/image5.png "Use Illuminate to Balance your Games - Image - 03")

Choosing to spend some money, I was able to buy some lives and quickly got back into the game.

![Use Illuminate to Balance your Games](https://www.pubnub.com/cdn/3prze68gbwl1/5tUDTkcymTnRqZfkLobWly/1e8982bd6b68b3a1e183e8e292f1c809/image4.png "Use Illuminate to Balance your Games - Image - 04")

### **Going behind the scenes on Illuminate.**

You can find Illuminate in your PubNub account portal - [https://admin.pubnub.com/](https://admin.pubnub.com/?), under the “Optimize” heading.

![Use Illuminate to Balance your Games](https://www.pubnub.com/cdn/3prze68gbwl1/2N5rjdq2zVsuvvJNcihzEV/e924e81bf6edade34287bfd7308524c5/image7.png "Use Illuminate to Balance your Games - Image - 05")

Our first stop here is to examine our Business Objects. Business Objects are the way to get data into Illuminate, they help us define what kind of data we need to capture and from where. 

You can define what data you want to track by adding measures and how you want to segment that data by adding dimensions. 

If you need some help getting set up or understanding any of Illuminate’s setup, you can find the docs here: [https://www.pubnub.com/docs/illuminate/basics](https://www.pubnub.com/docs/illuminate/basics?)

How to balance a game requires knowledge of what you want to track and what you want to offer new players to keep them engaged. 

Such is the skill of Illuminate; without any coding, we can add, remove, or modify variables to hone and even tailor what we offer to different players. 

In this simple example, I chose to measure the score of the game, but you could easily add other measures; examples here include; 

-   Is the player a guest, or do they have an account on your game platform
    
-   Total length of play 
    
-   Device type - web, mobile TV. 
    
-   Have they previously purchased something from you in past events or games?
    

Returning to my business objectives, let me show you the measures I’m working with.

![Use Illuminate to Balance your Games](https://www.pubnub.com/cdn/3prze68gbwl1/5j3WZoN5vgm83pxBmPwqbo/86b0b2ded611de919de4f73b7f061447/image6.png "Use Illuminate to Balance your Games - Image - 06")

**Breaking this down:**

**Measures:** Numerical values one can measure or add up.

**Dimensions:** Qualitative values that can be used to segment measures.

**Metrics:** The aggregation of your measures segmented by your selected dimensions.

**Decisions:** A collection of conditions and actions. When conditions are satisfied, the corresponding action is triggered. 

**Dashboards:** A collection of real-time charts that visualize your metrics and decisions.

In my example, one measure I’m using is the client asking Illuminate for help when the score is below 500 points. 

I then mapped this to a decision: "If a player has a score below 500 points, offer them the opportunity to purchase lives or watch an ad.”

Once the player selects if they want to watch an advert or purchase any lives, this is fed back as a metric which is then displayed on my dashboard.

![Use Illuminate to Balance your Games](https://www.pubnub.com/cdn/3prze68gbwl1/1s61i2Z2ILWGnj4HUhnvPr/f117994e40465a9c34ae34fea2ad8e76/image1.png "Use Illuminate to Balance your Games - Image - 07")

Here's a simplified view of my game-balancing dashboard. You can see that we are tracking which players got less than 500 points and which players chose to pay for their lives instead of watching an advert. 

Again, the scope for expanding the complexity here is very wide;

-   Would more players pay for extra lives if the lives were cheap(er)?
    
-   Would they watch a 30-second advert or a 3-minute one?
    

**Vs. the Traditional Approach?**
---------------------------------

Strategy games? Online games? Balancing the game experience and game mechanics for all players can be a lengthy process. Before launch, you would playtest the various game elements, craft the introductory tutorial and, based on player behavior, ensure a progressive level design to both maximize playtime and prevent the game from being too easy. After launch, you can monitor player forums, check analytics for player retention figures and player actions, and then release patches to address any balance issues... and hopefully not nerf your game in the process!

This can be a very long analysis and release cycle, and this is where Illuminate can help. You can make real-time decisions regardless of your game type: You might have a multiplayer game like an FPS or an RPG, a single-player fighting game on Steam, or a battle arena like League of Legends. As long as the video game is online, where player balance can be affected by taking action in the moment, Illuminate can enhance the player experience - I asked the PM, and they say that tabletop board games and card games are not yet on the roadmap :(

**Wrap up** 
------------

Using PubNub’s Illuminate to help balance your game is a fast, code-free way to introduce instant decision-making reactions and tools into your app, making your player experience excel. 

To learn more about creating your first game with real-time actions, check out our [Illuminate for gaming](https://www.pubnub.com/products/Illuminate-gaming/?) page and our [documentation](https://www.pubnub.com/docs/illuminate/basics?). Our [Support](https://support.pubnub.com/hc/en-us?) team can also help you with guidelines and recommendations.  Hopefully, we will see you at the next GDC conference, where we would love to hear what you have built with PubNub!

How can PubNub help you?
========================

This article was originally published on [PubNub.com](https://www.pubnub.com/blog/how-to-use-illuminate-to-balance-your-games/?)

Our platform helps developers build, deliver, and manage real-time interactivity for web apps, mobile apps, and IoT devices.

The foundation of our platform is the industry's largest and most scalable real-time edge messaging network. With over 15 points-of-presence worldwide supporting 800 million monthly active users, and 99.999% reliability, you'll never have to worry about outages, concurrency limits, or any latency issues caused by traffic spikes.

Experience PubNub
-----------------

Check out [Live Tour](https://www.pubnub.com/tour/introduction/?) to understand the essential concepts behind every PubNub-powered app in less than 5 minutes

Get Setup
---------

Sign up for a [PubNub account](https://admin.pubnub.com/signup/?) for immediate access to PubNub keys for free

Get Started
-----------

The [PubNub docs](https://www.pubnub.com/docs?) will get you up and running, regardless of your use case or [SDK](https://www.pubnub.com/docs?)