Setting up geckos.io in gdevelop

So I’m planning on making an mmorpg, using geckos.io. I don’t really know how to word this, but can someone tell me how to like, set up geckos within the gdevelop engine? Thanks.

You can take a look at how the MQTT extension is made, it shouldn’t be that hard to make it work with geckos. If you are not able to understand JS enough to do so yourself, keep in mind you have to know JS well to code the server.

1 Like

Thanks for the quick response. I’ll take a look at the MQTT structure. I already had a quick glance at it last night as I was experimenting with extensions.

Didn’t you make a multiplayer extension @arthuro555 ? I saw lot of posts mentioning it. Wouldn’t that be easier than him setting up geckos by himself? Or is the extension not finished? I got excited when I saw the posts lol

Well the “multiplayer” extension ended up being the built in p2p extension. OP explicitly said they wish to use geckos.io.

Oh gotcha. will you ever make an extension with something like geckos.io or socket.io? It would be VERY helpful lol because i dont really know javascript that well

I have been considering this for a long time now, but the main problem is the server part. That part only works on node via npm, and npm packages are tricky to use in GDevelop, I managed to add in GDevelop support for those but there is a catch, it only works on PC exports, not on other platforms nor on previews :confused: . I don’t think there’ll be a better solution in the future, I already looked into installing packages on-the-fly in the IDE for making it work at least in previews and it doesn’t work well sadly, so I’d better get starting making this as waiting more probably won’t help.

Oh. So if you were able to do it, you wouldnt be able to test it without exporting it and it wouldnt work on mobile, is that what im understanding from this?

Well the client (the part that connects) would work anywhere, but the server part (the part that is accepting connections) would only work on PC exports, not in browsers or mobile or previews.

So someone could play on mobile and in browser? But the host would have to have pc export? Im still learning about servers lol. im not an expert thats for sure

do you think you will end up doing this because i agree it would be very helpful. i got too confident in myself and didnt realize how hard making an mmo in gdevelop would be.

For an MMO, personally, I would use Firebase (or another database if anyone writes bindings for one) for syncing most of the data (inventory, user data, location, status…) as it is fast enough for most stuff and allows for verifying data pretty easily. But it isn’t ideal for stuff like player position that require a lot of fast updates (as it can get expensive if you have too many writes, and isn’t really the fastest), I would use the MQTT extension for that, as it is a lightweight and proven protocol allowing to only download the data that you need thanks to the pub/sub pattern.

So your saying I could potentially create an mmo with the extensions GDevelop already has (firebase and MQTT)? Or would I have to still do my own stuff to have a functioning mmo?

You wouldn’t have to make your own extension or to code javascript, but you would have to

  1. Set up a MQTT server over WebSockets

  2. Write security rules for Firebase Firestore

Else you shouldn’t have to write any code or extension by yourself

Would it be pretty simple to do? And how many players
do you think I could host?

Hm i think mosquito can handle easily 500 players per room, and firebase in the 10 000 users, maybe more? You would have to do stress tests by yourself to be sure, my estimates aren’t very good as I’ve never pushed too far those technologies.

Struggling using mosquito. I downloaded it from github but idrk what to do from there because its just a bunch of files.

Personally, I am on windows and it is pretty straightforward there:

  • Download from Download | Eclipse Mosquitto
  • Run installer
  • Go to installation directory
  • Change protocol to websockets in mosquitto.conf
  • Run in the installation directory mosquitto -v -c ./mosquitto.conf

Thanks! I also forgot to ask, would I be able to complete the mmo for free? becasue ik firebase has paid versions and stuff.

Also, honestly, do you think it would be better for me to learn JS and use a different, perhaps stronger game engine?