Phaser Quest

Phaser Quest is a reproduction of Mozilla’s multiplayer online game Browserquest. Explore the world, find better equipment, fight monsters and defeat the final boss, alone or with friends! It was made with Phaser, Node.js and Socket.io.

Click here to play the game!

This game is open source under the MIT license. The code is accessible on the Github repository.

The name comes from the fact that this is essentially Browserquest made with Phaser, hence Phaser quest.
Disclaimer: This is an independent project, not an official project from the Phaser development team. Rich kindly agreed to let me use the name ‘Phaser’ for the game.

The purpose of this game was for me to gain first-hand experience with the creation of a real-time multiplayer online game and all the challenges such an endeavor involves. Attempting to reproduce Browserquest had two advantages in this respect:
– A reasonable scope: Browserquest is a full-fledged and entertaining game, but with a small amount of features. It’s big enough to be considered a serious project, but small enough to fit as a didactic one.
– A fixed set of features: reproducing every feature was not always fun, but it forced me to solve problems that I might have, consciously or not, tried to avoid when designing my own original project. A good example is the user interface. I was at first reluctant to work on it, as it didn’t seem as interesting as the core game features. It turned out to be more interesting than I thought, and made me learn a few useful Phaser tricks.

The code is publicly available. I will write a few articles about the development of this game in the coming weeks. Hopefully, this project will be valuable learning experience for others as well!

Related articles

The following articles have been written on development aspects of Phaser Quest:
Clients synchronization in Phaser Quest
Latency estimation in Phaser Quest
Custom Binary Protocol implementation
– And a more general one on interest management in multiplayer online games, with a section about Phaser Quest

Related work

– A refactored version of Phaser Quest in ES2015 by eugenioclrc
Another browser-based MMO inspired from Browser Quest, but with more features and built from scratch, by Tach-Yon

Credits

The Phaser Input plugin was used for the in-game input boxes (player name and chat).

Easystar.js was used for the client-side pathfinding.

The following node packages were used:
clone to clone update objects
express to serve the files
– The official MongoDB driver for Node.js
optimist to handle command-line arguments
– The comprehensive pathfinding module for, well, pathfinding
quickselect to compute median latency using the Floyd-Rivest algorithm
random-weighted-choice to perform weighted random selection of what loot the monsters should drop
– The socket.io module for the clients-server communication

All assets are the initial Browserquest assets. The initial Tiled map was re-used, although re-processed quite a bit to improve performance.

Music courtesy of Cartrell.

Screenshots

Thanks to Richard Davey for the nice screenshots (better than the ones I took..!).

If you want to support Dynetis Games to make more open-source projects like Phaser Quest, consider having a look at my donation page. In particular, take a minute to have a look at my Patreon page, where you can find a listing of rewards for various levels of recurring contributions!

Jerome Renaux

I'm an independent game developer, working mainly on browser-based multiplayer online game (HTML5 & Javascript). I love to discuss about all aspects of game development so don't hesitate to get in touch!

More Posts

Follow Me:
Twitter

Jerome Renaux

I'm an independent game developer, working mainly on browser-based multiplayer online game (HTML5 & Javascript). I love to discuss about all aspects of game development so don't hesitate to get in touch!