relativistic Posted December 10, 2017 Share Posted December 10, 2017 Airmash is a top down multiplayer missile warfare game. As far as WebGL goes, the most interesting thing technically is the map. It is a 32768x16384 map of the world generated dynamically by only 1.5 MB of downloaded data. (No Antarctica though ) Network wise, the netcode is very efficient and can handle hundreds of players at the same place. Play here: https://airma.sh/ icp, sk1e, labrat.mobi and 2 others 5 Quote Link to comment Share on other sites More sharing options...
icp Posted December 10, 2017 Share Posted December 10, 2017 Looks good! What are you using server side? Quote Link to comment Share on other sites More sharing options...
relativistic Posted December 10, 2017 Author Share Posted December 10, 2017 8 minutes ago, icp said: Looks good! What are you using server side? Node.js Initially it was C++ but then I realized that once you partition correctly (quadtrees or spatial hashes), most of your CPU time is consumed by syscalls - writes to the websocket. So now it's just Node. icp and cpu_sam 2 Quote Link to comment Share on other sites More sharing options...
Umz Posted December 10, 2017 Share Posted December 10, 2017 Really fast, responsive and fun. Great build, and a great result. Quote Link to comment Share on other sites More sharing options...
cpu_sam Posted December 11, 2017 Share Posted December 11, 2017 Where do you learned to create multiplayer game? The tutorials that I've seen are very basic, can you indicate me someone? Quote Link to comment Share on other sites More sharing options...
Skeptron Posted December 12, 2017 Share Posted December 12, 2017 23 hours ago, cpu_sam said: Where do you learned to create multiplayer game? The tutorials that I've seen are very basic, can you indicate me someone? I'd be very surprised if you found tutorials about such games. But I'd be even more interested in reading them! Quote Link to comment Share on other sites More sharing options...
cpu_sam Posted December 12, 2017 Share Posted December 12, 2017 1 hour ago, Skeptron said: I'd be very surprised if you found tutorials about such games. But I'd be even more interested in reading them! Really? Man, I've searched in google with "obvious" terms and it shows me some tutorials, but I'm talking about make multiplayer games with Node.js. Get these: http://www.dynetisgames.com/2017/03/06/how-to-make-a-multiplayer-online-game-with-phaser-socket-io-and-node-js/ (Not using phaser but cool too): http://rubentd.com/blog/creating-a-multiplayer-game-with-node-js/ https://hackernoon.com/how-to-build-a-multiplayer-browser-game-4a793818c29b Quote Link to comment Share on other sites More sharing options...
cpu_sam Posted December 12, 2017 Share Posted December 12, 2017 Note: I wrote "really" but in sense of "serious?", I really should get serious in my English study hehehe Quote Link to comment Share on other sites More sharing options...
Skeptron Posted December 13, 2017 Share Posted December 13, 2017 Ok so let me rephrase : of course you'll find tutorials about making multiplayer games. But I doubt that you'll find in-depth tutorials about how to handle that much players in real-time fights. But if the tutorials you found are enough to get you started and motivated, all the better. Have fun coding! cpu_sam 1 Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted December 13, 2017 Share Posted December 13, 2017 I didnt know its a PIXI game! Do you use that fancy technique with UDP emulation over several websockets? Quote Link to comment Share on other sites More sharing options...
relativistic Posted December 14, 2017 Author Share Posted December 14, 2017 On 12/13/2017 at 10:53 AM, ivan.popelyshev said: I didnt know its a PIXI game! Do you use that fancy technique with UDP emulation over several websockets? Several websockets? Yes. I don't know if you can call it UDP emulation though Quote Link to comment Share on other sites More sharing options...
Jorasso Posted December 14, 2017 Share Posted December 14, 2017 Can you tell a little bit more how such technique looks like? Is it supposed to prevent ping spikes I sometimes see in my WebSockets experiments :)? Quote Link to comment Share on other sites More sharing options...
relativistic Posted December 15, 2017 Author Share Posted December 15, 2017 4 hours ago, Jorasso said: Can you tell a little bit more how such technique looks like? Is it supposed to prevent ping spikes I sometimes see in my WebSockets experiments :)? Preferrably you'd mirror everything in the 2nd websocket and have a sequence ID in every packet so you can discard the duplicates. But that would double the traffic. I only mirror stuff that directly affects the player. That's regarding client-to-server sends. For server-to-client you can't use a sequence ID because it will be different on every client and you would have to serialize and frame the websocket data on every send which is a bit costly. In that case you have to use a different way to detect packet uniqueness, like sending the server clock and checking the entire serialized packet for uniqueness. Then you'd have to send a 1 byte packet every 50-100 ms to the server in order to deal with the delayed ACKs. Antriel and Jorasso 1 1 Quote Link to comment Share on other sites More sharing options...
Jorasso Posted December 15, 2017 Share Posted December 15, 2017 Thank you, that makes a lot of sense. I assumed that the pauses I see are impossible to avoid, never thought about second WebSocket Quote Link to comment Share on other sites More sharing options...
Antriel Posted December 15, 2017 Share Posted December 15, 2017 Some additional resource regarding how to implement that: http://ithare.com/almost-zero-additional-latency-udp-over-tcp/ Jorasso 1 Quote Link to comment Share on other sites More sharing options...
smarty Posted December 15, 2017 Share Posted December 15, 2017 looks awesome game , keep it up 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.