marko Posted April 18, 2017 Share Posted April 18, 2017 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. Quote Link to comment Share on other sites More sharing options...
rgk Posted April 19, 2017 Share Posted April 19, 2017 You can handle things like you handle ajax, but it would be considerably slower then using websockets. Quote Link to comment Share on other sites More sharing options...
mattstyles Posted April 19, 2017 Share Posted April 19, 2017 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. Quote Link to comment Share on other sites More sharing options...
ClusterAtlas Posted April 19, 2017 Share Posted April 19, 2017 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.