Jump to content

Making a Realtime Multiplayer Game with Phaser


JordanSchuetz
 Share

Recommended Posts

When I started to play around with the Phaser API, I wanted to tackle the challenge of creating a realtime game with multiple players.  I decided to use the PubNub multiplayer framework for the realtime functionality and it worked extremely well.  I put my entire project up on Github and you can try it out by clicking HERE (open up two browser windows to test real time functionality).  PubNub provided me with low latency with message delivery happening in less than 250ms and Phaser is super lightweight which allows it to work in mobile browser and even on low end computers.  The entire project took me a few weeks to develop but most of that was just optimizing the game to send the least amount of messages possible.  I wrote a step by step tutorial if you want to try to make this yourself in Phaser, you can checkout the tutorial HERE.

 screenshot1.png.acbf7c57accaf7d87dbf849b2658a900.png


Link to comment
Share on other sites

6 minutes ago, Nesh108 said:

Cool stuff but I can't help but wonder: is obvious advertising allowed in this section?

All of the code I wrote is open source and up on GitHub and I'm using the PubNub free tier.

 

2 hours ago, Skeptron said:

Is 250ms considered real-time? Congratz anyways on your achievment! Lots of people asking about real-time stuff here, hope they'll find answers in your tutorials :)

The messages are usually received in less than 50ms. Test out the real time functionality by opening up two browsers and trying yourself.  You can even play on your mobile device.  Also thanks for the kind words.

Link to comment
Share on other sites

  • 2 weeks later...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...