Jump to content

HTML5 multiplayer ?


Biggerplay
 Share

Recommended Posts

Yeah, it's far from ready for general audience, but I'm really excited about the possiblities! I'm even tempted to work naïvely with websockets on my experiments for now until proper implementation is ready, but I know any testing I do won't be very usefull outside of a LAN '^^

Link to comment
Share on other sites

  • 2 weeks later...

Well, especially as it's not just for Chrome - but also limited for "Packaged Apps". The user has to install the extension on their system for local usage, which would probably scare potential players who expect an easy setup of a browser based game...

 

Despite the fact they are still rough and in development unreliable DataChannel are based on UDP and partial implemented in Firefox Nightly & Chrome Canary. So far I wouldn't recommend you to use them for production - but at least there will be a technology which should be useful for multiplayer games in the future  ;)

Link to comment
Share on other sites

  • 2 weeks later...

Are there currently any html5 fast-paced realtime multiplayer game with pvp collisions?

 

As far as I know, there are none. The only prototype I'm aware of is this airhockey demo.

 

BTW, for anyone who wishes for an in-depth manual/tutorial about multiplayer over the internet (with examples in C++) and an academically-sound discussion of UDP VS TCP, I highly reccomend: http://gafferongames.com/networking-for-game-programmers/udp-vs-tcp/

 

Also, IDK if it's allowed to link other forums, if it's not then apologies and I shall edit this out, but there's been a very simmilar discussion going on here: http://www.scirra.com/forum/viability-of-realtime-multiplayer-in-html5_topic55617.html

Link to comment
Share on other sites

I've recently began dabbling with this and am having some success in a local environment. The gist of my game is multiplayer snail breeding and racing. Users can register and log in, save and load their snails, create races, etc - all of which gets pushed to a database on the server. 

 

Here is the total list of technologies/frameworks I'm using for this:

 

  • ImpactJS for the engine. 
  • Node.js for the server
  • MongoDB
  • Mongoose
  • Socket.io

Now that I've gotten the hang of the basic principles and guidelines getting data to and from the server is pretty simple. I predict that my main challenges will be:

  • Finding free hosting for my server
  • Managing to migrate this to a live environment smoothly
  • Security of the database
Link to comment
Share on other sites

I've recently began dabbling with this and am having some success in a local environment. The gist of my game is multiplayer snail breeding and racing. Users can register and log in, save and load their snails, create races, etc - all of which gets pushed to a database on the server. 

 

Here is the total list of technologies/frameworks I'm using for this:

 

  • ImpactJS for the engine. 
  • Node.js for the server
  • MongoDB
  • Mongoose
  • Socket.io

Now that I've gotten the hang of the basic principles and guidelines getting data to and from the server is pretty simple. I predict that my main challenges will be:

  • Finding free hosting for my server
  • Managing to migrate this to a live environment smoothly
  • Security of the database

 

Well, here you go with a list of node.js servers, some of which are free (and they are noted):

https://github.com/joyent/node/wiki/Node-Hosting

 

I remember there being "the free nodejs server" which was the best by far, but I can't remember what it was. I think they were affiliated with a learning site or something like that but I might be mixing them up. I'll update if I remember.

 

update: well, as far as I can tell, it seems appfog's free plan is the best free option available. Someone please correct me if I'm wrong!

Link to comment
Share on other sites

Well, here you go with a list of node.js servers, some of which are free (and they are noted):

https://github.com/joyent/node/wiki/Node-Hosting

 

I remember there being "the free nodejs server" which was the best by far, but I can't remember what it was. I think they were affiliated with a learning site or something like that but I might be mixing them up. I'll update if I remember.

 

update: well, as far as I can tell, it seems appfog's free plan is the best free option available. Someone please correct me if I'm wrong!

Ah excellent, thank you! I will try appfrog.

Link to comment
Share on other sites

Oh crap, that's a deal breaker for me :( I'll have to find something else

(Edit: Actually, after some searching around I think I may be able to use it despite lack of websockets. It's not ideal and I'll keep looking around for other options, but at least there's that)

Link to comment
Share on other sites

You can find a few provider in this thread as well. Depending on your plans (e.g. open vs. closed source), you can probably find one which fits your needs  :)

 

As for the database handling, I would recommend to use Firebase - still free during the beta - which allows you to store and retrieve the required data for the account managing quite easy. The security issue shouldn't be a problem, as you will probably just access the records from your backend and not send them directly from the client  ;)

Link to comment
Share on other sites

I used Firebase for my Ludum Dare entry. It's probably no good for hyper-realtime stuff (anything with bullets), but for anything where 300ms latency is acceptable, it works great.

 

Blog post: http://www.ludumdare.com/compo/2013/05/04/how-i-made-a-realtime-multiplayer-art-piece-in-48-hours-and-how-it-turned-out/

 

Game: http://www.ludumdare.com/compo/ludum-dare-26/?action=preview&uid=3120

Link to comment
Share on other sites

I used pubnub for a while. They keep increasing the price or changing the pricing scheme without any notice.

 

If your multiplayer game has small sessions (less than 10 players), it should be fine. If you are using it to broadcast messages to your entire player base (eg. sending a single message to hundreds of players at once) then it is quite expensive.

 

Because of that, it's not very suitable for many kinds of games.

Link to comment
Share on other sites

At a first glance, pubnub looks very similar to http://pusher.com - which I found a bliss to use.

Pubnub seems to be a little bit cheaper than pusher - on the other hand, pusher does offer a free plan with 20 connections and 100.000 messages/day.

 

I would not recommend using both of those services for real-time games. Your server has to send a message to THEIR servers, which then forward it to your clients. The other way around, its the same.

Its way faster to set up the game server in node.js and use for example socket.io for direct Websockets communication.

Link to comment
Share on other sites

I'm hosting my twisted websocket server on VPS at OVH and it works great. But you have to setup enviroment yourself, yet it's not a big problem. I pay about 10 euro per month, but I'm testing right now only, I'll probably need more resources later so price will raise.

Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...

AS a large proponent of node.js and a as a person who as put it into a production environment myself I can personally attest to it's ability to scale. It is as scalable as you build the system, and it scaled fantastically. Distributed network systems are exactly the type use cases node was created for.

 

That being said, Pomelo is a pretty amazing game server framework.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

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