
If the player creates a channel, they get a room id to share with another player. Players first join the lobby where they can create a channel or join a channel. Click here to try out our live version of the game. Here is what our app will look like once we finish.
#React native game tutorial update
Every move a player makes will be published to the channel to update the other player’s board in real time. In this game, two players will connect to a unique game channel where they will play against each other. In order to show how easy it is to develop a multiplayer game using PubNub, we will build a simple React tic tac toe game using the PubNub React SDK. It is secure, scalable and reliable so you don’t have to worry about creating and maintaining your own infrastructure. With over 70+ SDKs, including the most popular programming languages, PubNub simplifies sending and receiving messages to any device in under 100 ms. PubNub provides the real-time infrastructure to power any application through its global Data Stream Network. But how do you do solve the infrastructure problem? This is where PubNub comes in. It’s not hard to handle 100 users, but how do you handle 100,000+ users? Besides infrastructure issues, you still have to worry about maintaining your game.Īt the end of the day, the only thing that matters is providing a great experience for the players of your game. While this may seem like an appealing route to take, you will encounter several issues one such issue being scalability. You can go the route of building your own infrastructure from the ground up by using technologies and open-source protocols like Socket.IO, SignalR, or WebSockets. There are several ways to provide the real-time infrastructure for multiplayer games. So how does a developer provide a connected experience where the players can play tic tac toe, or any game, no matter where they are in the world? Real-time Multiplayer Game Concepts


If the application does not provide this experience, then you and many people, won’t probably use it anymore.

The application needs to provide a real-time experience so every move you make is seen instantly by the other player and vice versa. But what if you want to play with someone that’s in another location? In this case, you would need to use an application that connects you and another player to the game. All it requires is something to write on and something to write with. Tic tac toe is a quintessential childhood game. Create a real-time multiplayer tic tac toe game in the browser with React and PubNub.
