23 Jun Using PubNub for a multiplayer game
Almost all real time web applications need an easy way to exchange data or commands between users. Publish/Subscribe messaging models are one of the most common ways to do that and there are many commercial frameworks which can help you with this functionality.
While you can also use open source web sockets servers to accomplish the same things, commercial platforms like PubNub offer Platform as a Service (PaaS) advantages: scalability, managed hosting, quick response times.
The design and development team at AgilityFeat (who also manage and edit RealTimeWeekly) have put together an example of how to use PubNub in a Clojure application. The app is a simple multi player online game, where players have to flip a set of coins as quickly as possible and then virtually pass them to other players in their browsers.
It’s a game that has a purpose, it’s frequently used as an educational tool for agile and lean teams who are learning about the benefits of working in small batch sizes.
The game is called “Remotely Flipped” and this short video shows you how it works: