Comments

Log in with itch.io to leave a comment.

(2 edits)

Hi, great game and code, anyway couple questions, I did a multiplayer game in js using webrtc with peerjs, I can connect multiple players to one id without using any server (just give the generated ID to the others),also signaling with webrtc throught peerjs. Should be possible doing this on Godot? thx

PeerJS still uses a server, it's just that they run one for you so you don't have to set up your own. Using PeerJS from godot would require porting their library and negotiation protocol over. Not impossible, but a fair amount of work.

Thanks for the reply, I don't mean to port PeerJS on godot, anyway I'm trying to connect more than 2 players on your project.

Ohh, sorry. Yeah, sure. The original webRTC example that my code is based on can do that.https://github.com/godotengine/godot-demo-projects/tree/master/networking/webrtc...

We Played this Multiplayer Fps Game, WebGL & WebRtc native Godot 3+ export Html5 Wasm, WebSocket Server-Signaling: Godot-Plugin or Js-Host, thanks for share-ing Dev-Blogs. Follow Like 2.

Iktqo

Hey, great game. How do handle mouse inputs? Whenever I try to export for html5, I fail to make anything respond to mouse inputs, while keyboard inputs work fine.

(+1)

Just… the normal way, I think? You can check out the project on github and take a peek at the code if you want! https://github.com/NuclearLighthouseStudios/Screenhead-Arena

(1 edit)

how do you handle signalling? do you host a websocket? can webrtc of godot run on android?

Signalling is handled by a small websocket server written in node.js. I'm not sure if there is a native implementation of the webrtc library for android.

I found out there is a library for android but not implemented to godot yet https://github.com/godotengine/webrtc-native/issues/9  check out the last comment . I saw the server.js code already, meant do you host the code for just this game or bought a vps?

Yeah, at the moment it's hosted on one of my VPSs

do you do rate limiting, how do you protect your websocket?

nothing aside from just limiting the number of concurrent lobbies

Hey, just played it. And runs smoothly ! I've been working with Godot for some months now making a multiplayer game but I'm having some problems using the traditional methods that Godot provides. WebRTC appears to be a solution for easy connection through the internet without dealing with NAT traversing, NAT punch through etc. Any chance you could share the network part of the game ? Some real world example would be very beneficial. If it's not possible could you point to some good example ? Thanks.

Hey! I haven't done anything official or anything, but check out this reddit thread and the linked zip file.

https://www.reddit.com/r/godot/comments/efuazd/i_made_a_small_game_with_the_new_...

That's basically the networking part of Screenhead Arena, just cleaned up a little. If there is interest I might also put this on itch as a slightly more official thing with a proper explanation?

(+1)

Yeah, I've found it already and have already adapted it for my game! Saved my life :) WebRTC can be really confusing hehe. Many thanks!

(+1)

Unsettling atmosphere with a great aesthtic. Super cool that this works on browser.

i have no F11. i have chromebook

I've enabled the fullscreen button on the embed!

ok

(+1)

great game 

Thanks!

Deleted 2 years ago

Thank you!