Libraries for online web game multiplayer?

Started by
6 comments, last by hplus0603 6 years, 1 month ago

I want to make a html5 canvas / javascript game, similar to agar.io. I know a little node.js, and I think I understand the way online multiplayer works, but now that I do understand I realize it's gonna be a ton of work if I want to do it from the ground up with something like socket.io. My question is: are there libraries that can help with the multiplayer aspects of my game (sending game packets, etc.), and if so, is the performance for that library fast enough to run my game? (has a latency at least as low as agar.io)

 
Advertisement

I did find Lance, but the list of games built on it is suspiciously small. I'll look into it, but please post your recommendations!

I have heard some people use Photon Engine: https://www.photonengine.com/en/OnPremise.
Maybe it is what you are looking for.

I also know the UnityPark SDK, I suspect that only works if you are using Unity3D.

http://developer.muchdifferent.com/unitypark/

phaser.io with socket.io described here:

http://www.html5gamedevs.com/topic/13472-four-player-pong-example-with-socketio/

My Gamedev Journal: 2D Game Making, the Easy Way

---(Old Blog, still has good info): 2dGameMaking
-----
"No one ever posts on that message board; it's too crowded." - Yoga Berra (sorta)

I write my game server from scratch. I don't think socket.io can handle the workload of any serious multiplayer web game, try to use `ws` or `uws` library.

Thanks, by now I’ve decided to learn Unity and release my game for WebGL. (I’m assuming the networking on that is reasonably fast and reliable, Unity is a very widely used game engine) That way I can release for any other play form if I want later. It’s encouraging to hear that someone actually has built their game from scratch with web sockets though!

I don't think socket.io can handle the workload of any serious multiplayer web game, try to use `ws` or `uws` library.

I don't think there's a significant difference in what server-side socket library you're using. The main problem is that all websockets use TCP, and that you will need to funnel player counts across multiple threads (hard with Node.js) and multiple servers (hard in general.)

 

enum Bool { True, False, FileNotFound };

This topic is closed to new replies.

Advertisement