Gaming

Broadcasting In-Game Notifications for Multiplayer Games

0 MIN READ • Jan 13, 2015

Ensuring a synced, real-time gaming experience in a multiplayer game is what truly puts the ‘multi' in multiplayer. Sluggish movements, lag, and delayed connectivity ensure the opposite. As a result, real-time interaction between players is essential.

To showcase how PubNub Data Streams can power a multiplayer game, we proposed a Multiplayer Game App Challenge, where game developers built multiplayer games with PubNub. This blog looks at a submission from Erik Hazzard, who built Rect Rangle, a browser-based game using HTML5, JavaScript, Entity Component System, and real-time with PubNub of course!

in-game notifications

Rect Rangle is a simple game of eating white squares and avoiding black squares. You get points when you eat any square, and the goal of the game is to last as long as you can to get as high of a score as you can. Eating white scores replenishes your health; black squares lower your health.

All the source code is available here.

PubNub powers all in-game notifications for Rect Rangle. Using PubNub, when you die, all other players will get your ghost (your position, name, and score are broadcasted) and players will receive a bonus upon eating your ghost.

PubNub = Powering Endless Multiplayer Features

Hazzard has a great blog post on ECS and game development that we strongly recommend checking out. You'll see that with PubNub, you can do more than just ensure real-time lockstepping for player position. Like with Rect Rangle, in-game communication can run 100% over PubNub, like in-game notifications and chat, as well as statistics, game servers and even matchmaking based on skill or at random.

Gaming
May 9, 2013

Lightweight Multiplayer HTML5 Games with melonJS

How to turn regular HTML5 games into a multiplayer HTML5 games. This tutorial covers multiplayer HTML5 game development with a tutorial.
Michael Carroll
Michael Carroll
Gaming
Jan 17, 2024

The Difference between Gaming Servers & Chat Servers

Segregate gaming servers from chat servers using advanced methodologies and recent technologies.
Darryn Campbell
Darryn Campbell
Gaming
Mar 11, 2024

Browser-based Multiplayer Tic Tac Toe Game in React

Create a real-time multiplayer tic tac toe game in the browser with React and PubNub.
Darryn Campbell
Darryn Campbell