OFFICIAL Make multiplayer games easier than ever with GameMaker

Kinga

New Member
GameMaker Dev.
Make multiplayer games easier than ever with GameMaker

Want to bring more players to the party? With the latest multiplayer support update from GameMaker, it’s now easier than ever to create your next big game for more players to enjoy at once.

HOW DOES MULTIPLAYER WORK IN GAMEMAKER?
Rollback netcode is the most developer-friendly way of enabling online multiplayer gaming connections, smoothing out laginess, to create a player experience that feels more responsive and instantaneous.

With GameMaker’s fully managed multiplayer servers, there’s no need for creators to spend time programming server-side code. It’s now possible for anyone to create and share a playable online multiplayer game in just a few hours. And that’s only the beginning!

Here are some additions coming to multiplayer in the coming months:
  • Chat: Send messages to players in the same multiplayer session.
  • Player commands: Game can intercept messages from the chat and act on them, allowing the players to set up an in-chat vote, among many other functions.
  • Client preferences: Set up and share player data across clients at game start. This will enable multiplayer games to, for example, use the save state option.
  • Spectators: More players than the game supports can join game and spectate
  • Late join and rejoin: Start a game, and let others join later. (Also allows proper reconnection flow).
  • Cloud saves for games: Game stores save state in the cloud, (also now available for single player games too). If your game supports both mobile and desktop platforms, your players will be able to seamlessly switch between both of them! Potentially allows for a version control save state to allow loading an earlier save, in case of file corruption.

MULTIPLAYER GAMEMAKER GAMES ON GX.GAMES
Initially, creators will be able to publish their multiplayer games on GX.games, where sharing from GameMaker has always been free and as easy as just one-click. Sharing to other platforms like mobile, PC and console will be available later.

Multiplayer features are available now in the latest beta release of GameMaker.

With the launch of multiplayer support, Opera GX users will now be able to play the latest multiplayer GameMaker creations, either with their friends or via matchmaking with other players.


HOW TO CREATE AN ONLINE MULTIPLAYER GAME WITH GAMEMAKER
Ready to get started?

Check out our “How to create an online multiplayer game” guide, or follow along with our tutorial video. More useful tutorials about multiplayer coming soon!
 
Last edited:
D

Deleted member 16767

Guest
Nice! Just a question. Multiplayer games are usually big. How will this work with the 200mb limit on GX?
 

Alice

Darts addict
Forum Staff
Moderator
@mikix I see no reason in particular why multiplayer games would have much larger size than single player ones (unless we're comparing an open-world MMO to a small indie puzzle game).
I'm fairly certain the bulk of the game size comes from its audiovisual assets, not the netcode gluing different instances of the game together.

At any rate, I kinda want to try it out now. At a glance - even if the example uses the high-demand action game, it shouldn't be too hard to downgrade it to a simple turn-based game (turn-based games need some love, too!).
...in fact it might make it easier to have some semi-turn-based game, where both players choose their turn actions independently and only when all make their decisions, then the game processes them... 🤔
 

John4300

Member
Kind of shame to see the easy multiplayer functionality is for Opera GX only, but I guess it does make sense. For a bigger project you'd want to create a netcode of your own anyhow.

It does seem easy to set up however, which will greatly help making fun games to play in a group! Games which already have multiple players but only work on same computer at the moment should be pretty easy to convert to this system, which I think is the biggest point anyhow.
 

gnysek

Member
Multiplayer games are usually big
I think that for most games already published on GX which have coop on same screen, changing to multiplayer shouldn't make them bigger than 0,5 - 1 MB, that's not something big.

New multiplayer system does everything under hood, and generally for simpler games it requires 5-10 lines of code to add.

Seems that YYG made a make_a_game(); function. It was a joke for many years, but this is true now ;)
 
D

Deleted member 16767

Guest
Okay, well, if it's fun for the playerbase to not play a live service game then go for it! I do like things like hang the man or guess the drawing. This will make Opera more popular among people that like to socialize in these kind of things.
 
MULTIPLAYER GAMEMAKER GAMES ON GX.GAMES
Initially, creators will be able to publish their multiplayer games on GX.games, where sharing from GameMaker has always been free and as easy as just one-click. Sharing to other platforms like mobile, PC and console will be available later.
Just to make sure I'm interpretting this correctly, is the intention to eventually roll out this multiplayer support for publishing on other platforms, independent of GX.games? For example, will we be able to release a game on Steam or itch.io or something that implements a future version of this multiplayer system?
 

rwkay

GameMaker Staff
GameMaker Dev.
The intention is to bring this to ALL target platforms but we do not have a timeframe for this just now, we are gathering information from this release and we will be making decisions and prioritising based on feedback, so don't wait to try it out - if you want it on all platforms then try it out and let us know.

Russell
 
The intention is to bring this to ALL target platforms but we do not have a timeframe for this just now, we are gathering information from this release and we will be making decisions and prioritising based on feedback, so don't wait to try it out - if you want it on all platforms then try it out and let us know.

Russell
Awesome, that was what I thought - I just wanted to be sure that was the intention before I go around telling people as much.
 
The intention is to bring this to ALL target platforms but we do not have a timeframe for this just now, we are gathering information from this release and we will be making decisions and prioritising based on feedback, so don't wait to try it out - if you want it on all platforms then try it out and let us know.

Russell
do we know if it will be a free, one time payment, or subscription service for other platforms?
 

ThraxxMedia

Member
I'm very keen to see if / how this can be used to supplement currently existing net code in a project, or whether I'd have to completely scrap it and pick one over the other.
 

Khao

Member
Looked at the tutorial and I'm very impressed. I've personally only been able to code LAN multiplayer games in the past, and with great effort. The idea of having full online implementation right out of the box with only a few function calls almost feels too good to be true. And the idea of bringing that to all platforms, especially consoles, is just incredible.
 

Mehdi

Member
Why is synchronization taking so long for me? I'm waiting for last than 10 minutes and only 40 percent sync between players are done. BTW my game has nothing more than two players with simple movement (as Matharoo teaches)
 

Mert

Member
Seems like a BAAS with limited ability. Happy to see that Yoyogames is stepping in for the topic.

Just so saying, you can achieve all of the above; in all platforms(Android to HTML5) with probably a lot more performance via Firebase Cloud Functions.

Edit : I wrote SAAS (Software as a service). It should be Back-end as a service.
My best wishes would be that it would be extended for more back-end data processing like physics, server side data management(I'm guessing most of the data processing happens on the clients) and real-time object synchronisation(possibly with custom tickers). I'd love to pay for such a service and definitely be a long-term customer.

In all case, very happy to see that Yoyogames is interested in the topic.
 
Last edited:

FoxyOfJungle

Kazan Games
This sounds like a lot of fun, I think it opens a lot of doors for those who have difficulty understanding how Multiplayer works in general (client, server, packets, buffers...), but just want to make a multiplayer game.

Will the cost of the VPS servers be borne by Opera/YoYo Games? Will it be possible to access the server's source code? Does it use Node.js?
 

Mehdi

Member
as every thing which have networking, servers are overcrowded on first day xD
I haven't managed to set up the Easy Multiplayer so far. it just doesn't connect at all for me. 😞

EDIT: Is being overcrowded the real and only reason? Or it is another issue in work? @milleson @Kinga
I can't get over 20% sync?
 
Last edited:

emoller

GameMaker Staff
GameMaker Dev.
I haven't managed to set up the Easy Multiplayer so far. it just doesn't connect at all for me. 😞

EDIT: Is being overcrowded the real and only reason? Or it is another issue in work? @milleson @Kinga
I can't get over 20% sync?
There are a number of regions to choose from. If it's having problems syncing it sounds like you are trying to connect to a server with a very high round trip time from where you are. Where are you based and if you run locally, what does the share url contain?
 

emoller

GameMaker Staff
GameMaker Dev.
I'd be curious to see a screenshot of the network tab of dev-tools when you reload the game. And also the console output to make sure there are no other errors in there. UK to EU North region (i.e. Stockholm) should be a good connection you'd think.
Screen Shot 2022-06-30 at 22.09.49.png
 

Chaser

Member
Wow! How exciting. Great Job YoYo and Opera. And great tut Matheroo. Online multiplier for novice devs like myself now feels more achievable and highly considerable when prototyping game ideas. Game jams games will be a co-op blast aswell im sure.😃
 

Slyddar

Member
This could be a massive game changer, as it's an area that's immensely important to the longevity of a game, but it's long been a black box for many. Great work Yoyo and Opera teams on getting this implemented, and also nice work @matharoo on the tutorial too.

Have lots of questions, but am super excited to give it a try, so will wait until I can implement it first before bombarding the thread with them.
 
This is super cool! I'm looking through the manual though, and I'm not seeing any functions for matchmaking in-game - am I missing something, is this something that will come later, or will we always be restricted to the "match with other players" button on the GX page?
 

Slyddar

Member
I note that the tutorial shows if you set up a 2 player game, you have to wait for the other player to join before playing. Does that mean if you set up the project in GXC as a 4 player game, the game will only start once 4 players are joined, or can 2 or 3 players play a game once a minimum of 2 have joined?
 
I note that the tutorial shows if you set up a 2 player game, you have to wait for the other player to join before playing. Does that mean if you set up the project in GXC as a 4 player game, the game will only start once 4 players are joined, or can 2 or 3 players play a game once a minimum of 2 have joined?
Looks like you can use rollback_start_game() to force the game to start before a full set of players join.
 

Pzaan

Member
Excited to see this. I have to think about how this would work for a turn-based game. First thought is that the game controller knows whose turn it is, and that info is synchronized across players. Then the player object only accepts (or acts on) inputs if it is your turn.
 
D

Deleted member 16767

Guest
What about match making? How will that work? Like a competitive card game for example.
 

emoller

GameMaker Staff
GameMaker Dev.
We've been working with a small group of testers from the community over the last two months which has been great and helped us take this in the right direction I hope. We're very much looking forward to get feedback from the wider community.
Matchmaking is rudimentary currently (join the first open game slot in your preferred region) so that's definitely an area for us to work on.
 

Sad

Member
What about match making? How will that work? Like a competitive card game for example.
It somewhat already has a built in matchmaking/match finder. If you click it, It will straight match you up with people that are waiting for extra players.
1656655769104.png

We've been working with a small group of testers from the community over the last two months which has been great and helped us take this in the right direction I hope. We're very much looking forward to get feedback from the wider community.
Matchmaking is rudimentary currently (join the first open game slot in your preferred region) so that's definitely an area for us to work on.
Overall im impressed for quick way to get multiplay going in your game. I tried similar thing with Nodejs hosted on Heroku as backend, took me hours, and it doesnt even have quick match finder, and the way it's smoothing the player movement without being janky is by using simple lerp. Cant wait to see the final form, with chat, cloud storage and all.
 

Mehdi

Member
Wh
I'd be curious to see a screenshot of the network tab of dev-tools
Where are these dev-tools?

Dear friends, Are you experiencing any problems connecting and syncing a multiplayer project? Or is it smoothly done? I don't seem to be able to go over 20% syncing between 2 players.
 

Alice

Darts addict
Forum Staff
Moderator
Where are these dev-tools?
For Google Chrome (and similar browsers) at least, you can access dev tools window by pressing F12, or right-clicking somewhere and choosing "Inspect element" etc. Not sure how to activate it in Mozilla and other browsers, but most browsers include dev tools of some kind.

In the Chrome dev tools window, there's a "Network" tab among the top tabs, but to get relevant results, you need to have dev tools open at the time the request is made. If the request starts before you open the dev tools window, it won't be shown in the Network tab.
 

GamerXP

Member
May be wrong to post it here, but no idea where to. I tried messing with it, following tutorial, but I can't run the game on Opera GX target. It shows me error "403 Forbidden" a bit after game is launched (I get to see the game a bit, then it shows the error).

Also, it shows me the same when I try to open

Is it just me?
 

TheMagician

Member
@Kinga I asume you are the head behind this new system? Great job. It looks like a very thorough implementation that is deeply interconnected with GM's existing systems while still feeling light-weight to use from a dev's perspective!

@matharoo Fantastic job with the manual and tutorials!

I've read that rollback networking systems should be used in projects that don't have "too many moving parts" since they decrease the client's performance the more managed objects/instances there are because they have to track / predict / possibly redo all of the managed instances' variables and corresponding game logic. Do you have any recommended upper limit / experience from testing as to the number of managed instances that can be handled smoothly by the server/clients?

Will be intersting to see the adoption of this system as the current networking functions work cross-platform and it might be difficult to run both in parallel.
 

Yal

🐧 *penguin noises*
GMC Elder
@Kinga I asume you are the head behind this new system? Great job. It looks like a very thorough implementation that is deeply interconnected with GM's existing systems while still feeling light-weight to use from a dev's perspective!

@matharoo Fantastic job with the manual and tutorials!

I've read that rollback networking systems should be used in projects that don't have "too many moving parts" since they decrease the client's performance the more managed objects/instances there are because they have to track / predict / possibly redo all of the managed instances' variables and corresponding game logic. Do you have any recommended upper limit / experience from testing as to the number of managed instances that can be handled smoothly by the server/clients?

Will be intersting to see the adoption of this system as the current networking functions work cross-platform and it might be difficult to run both in parallel.
I've dabbled a bit in rollback netcode (...never got my thing stable though...) and it basically (typically) works like this:
  1. The netcode itself only synchronizes player inputs between all players, not the game state
  2. If inputs doesn't arrive on time, the game makes a savestate and keeps going anyway.
  3. When inputs arrive, the game reverts to the last savestate ("rolls back") and then re-runs everything that's happened since to achieve the "correct" version of the current timeline
A big reason my code never got stable was because of the whole, being able to save/load states thing meant I had to reinvent the wheel on instances, collisions etc so I'm really excited to see this being built into the engine now!

Also typically rollback netcode games only have 2 players because every player needs to be able to communicate with every other player for the system to work (quadratic growth), while a server/client model only needs one communication channel for each player (linear growth), and it quickly goes out of hand.
 

j123

Member
Thanks for making this new multiplayer! It's can be brought into an existing project very well!
 

Fanatrick

Member
Gotta say I'm very pleased with this beta, specifically native rollback. Looking forward to future updates and potential cross-platform support, building this correctly can be the biggest game-changer yet.

Many users would appreciate access to the matchmaking/punching api without relying on native rollback (like steamworks/gog/discord and even firebase to an extent).

Triggers not based on user input would be great but I'd guess those are planned according to the content on the blog post.

As @Yal noted rollback stability depends on weakest link's latency, allowing fallback snapshot overwrites for peers that fall too behind would alleviate stress across all clients at cost of rubber-banding.

I'm curious how this scales and performs. Taking 4ms per step (only managed objects, drawing disabled, 60fps) with ~200ms latency would require a step to be recalculated ~10 times, taking ~40ms total. Those conditions are far from ideal but worse is not unheard of, I know we're really early but I'm interested in implications on the overall design.
 

Roa

Member
it's not headerless export... but cool none the less. Any idea on how many players would ideally fit in a session? Is there a cap on the beta, or a limitation to look out for?
 
@Kinga @rwkay
Hi and thank you for your great work. However I'm from Iran and I have no access to your multiplayer system. Because it simply doesn't connect. I have to use vpn and select a european IP. But it has no advantage either. Because apparently the ping rate raises up so drastically and therefore the synchronization dosen't surpass over %20. So the player can't connect to each other at all. (even in the local state).
I have tried all the Opera multiplayer servers (Europe, Australia, Americas), but still no luck.
Would you please explain why is it like this? and is the problem going to be resolved? And re there any Asian server in plans for future?
 
Last edited:

gnysek

Member
you can access dev tools window by pressing F12
Another shortcut is Ctrl+Shift+I. There's however one issue with HTML5 games - when they observe keyboard, F12 or Ctrl+Shift+I doesn't work if web page is focused - way to get around this is to put cursor in URL field on top of browser, and then press proper shortcut - dev tools would open for sure (and probably they can be opened form browser menu too).
 
Top