Jump to content

HTTP multiplayer?


marko
 Share

Recommended Posts

Hi all,

my first post so I'm new aorund here :)

I was looking over the internet for any resources about creating a multiplayer game with http protocol and not web sockets (for which is plenty of resources).

I'm realizing that game can't be fast paced, but thats not my case, I would really like to see some example of created game with http protocol like blog, tutorial or book.

Thanks for help.

Link to comment
Share on other sites

Websockets use the same transport as ajax/fetch, the only difference is that its a keep-alive connection so subsequent calls don't have the connection overhead but as connections warm up anyway its not a massive hit, biggest issue will be that you lose the ability for the server to send clients anything and become reliant on clients requesting data, but, as you say, that might be fine for your use-case.

Look for anything regarding restful services and service api design, even micro-services as those blogs/info usually pertain to how you communicate with those services.

Losing the ability for the server (or other clients) to send clients messages is a real loss for multiplayer gaming as you'll probably fallback to polling for information (for example, as this site does) which is the main use-case where a keep-alive connection makes sense.

Having said that, there is no reason you couldnt make a multiplayer game. Any blog post about creating forum or messaging software will explain the communications you need to handle, your game will have the same requirements.

Link to comment
Share on other sites

This reminds me of travian / tribalwars, maybe your preferred type of genre is a server that (like as you said) doesn't have to be much fast-paced.

If so, you can look for those games: travian/tribalwars/spartan wars/whatever.. Most of their actions are HTTP-based ^_^ 

Great advantage of websockets though is you can immediately know when a player disconnects from the game.

https://websocket.org/quantum.html

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...