Multiplayer using javascript

Hi! Can gdevelop create an online game using javascript?

1 Like

Yes, it sure can.


Good day! Is there a tutorial of something?

No, there is not, sorry.

How was that question ‘solved’ actually?

No idea I’m not the one who marked it as solved

the_gem_dev 16 hours ago

what do you mean by that?

He meant it was the gem dev who changed the title to solved

Too bad I guess. I was looking for clever ways to support multiplayer games.

If you are interrested I am almost done with the Firebase extension (Firebase Extension by arthuro555 · Pull Request #1694 · 4ian/GDevelop · GitHub) Which will add stuff like realtime database where you can sync in real time player data to achieve multiplayer

For other ways to do multiplayer, you can try via JS to use, or the WebRTC standard. @Erigatohishima is working on something for making multiplayer games easily in GDevelop. You can also go the http server way, but I would not recommend it at all. It would be having a server in NodeJS or PHP and using the network requests for syncing data with the server. It would be very slow and unefficient tho.

Firebase sounds great! I am using an HTTP backend to get data from the server, no user interaction yet. I was also thinking of using Server Sent Events but I am not sure how this will work at the end. I might get in mood to test it eventually.

If you’re comfortable with websockets you can get multiplayer working. Making a multiplayer game in GDevelop | GDevelop 5 walkthrough - YouTube

Yes, web sockets is probably the way to go for multi-user experience, but there is no simple way to integrate that to GDevelop at the moment. I have seen the available libraries to help you work with web sockets, but my lack of experience with JS limits me to things I know how to use for now.