Networking / Server Usable to PC and Consoles

To start off I am very new to networking. I'm trying to do my due diligence when it comes to researching and understanding how Game Maker connects online for multiplayer games and knowing all about buffers, sockets, async_load, tcp versus udp, sending and receiving packets, and all I need to learn to set up a online platformer game. I'm following this tutorial by Wizirdi and it has been somewhat helpful as a stepping stone to learn this kind of stuff.

I have two questions I hope that I can get help from on here, and I also ask if you have any source material you would recommend me reading or watching videos on I will take whatever helps guide me to knowing as much as I can about this topic. So my first question has to do with Wizirdi's tutorial part 3, because he makes the server that which is separate from the client by it being essentially a mirror by having both a player inside of the client as well as inside of the server to display the information.

Question 1. Do I need to have objects, sprites, animations, and more duplicated into my server in order to send accurate information to my clients? His part 1 tutorial talks about how the client would retain and display that information, and so is it advisable and possible to have the server accurately tell one client movement and animations to the other clients without having to display that within the server? I imagine the answer is yes just isn't seen in his tutorials.

Question 2. My other question has more to do with a server that can be used on consoles as well as PC. Would I need to use a different language and software to be able to do this? If so what kind? I find it strange that Game Maker has licensing for other platforms if it isn't able to reach them with an online GM Server. I've seen some forums talk about this but not go into great detail as to what is recommended for this purpose. I've also heard some criticisms that a Game Maker server isn't accessible to consoles easily, and that steam has a built in version but that its better to design something that can reach all and not be limited to Steam.

Correct me if I am wrong on some other finer smaller questions:
Some other details if you have time. I've read on forums that platformer online multiplayer games that its advised to use udp instead of tcp. Should I use peer to peer(P2P) instead of having a separate server? Would that make it easier for consoles but put more risk of players having their ip addresses vulnerable as well as make a server within a client more vulnerable? I guess I just don't know the full scale of consequences of this since I myself am not a hacker nor do I know how someone breaches data and how to put up protective measures to prevent it.

Thanks for any and all help.
 
Wizirdi himself actually answers question 1 on this link and also as seen below is his reply in quote

"The server doesn't HAVE to display the info, but it certainly can. You might find it's easier for the server to display it, because it can better keep track of everything that's going on. What I do is have a clone of objects (with very simple sprites with no animations) on the server, so that way the server can keep track of what all is going on such as the x and y of players, collisions, etc. I would also have the servers player objects keep track of each clients (players) hitpoints, inventory, ect... In this video:
at 4:10 you can see my server and what it looks like. Hope that helps."
Show less


REPLY
Thank you Wizirdi 🙂
 
Question 1. Do I need to have objects, sprites, animations, and more duplicated into my server in order to send accurate information to my clients?
Absolutely not.

I find it strange that Game Maker has licensing for other platforms if it isn't able to reach them with an online GM Server.
Not anybody can buy a console license, you have to be an approved developper. Say Nintendo gives you the greenlight, they will supply you with the info you need to be able to purshase the said console license, which comes with the needed functions. Regular Joe also CAN'T acces even this documentation, even for learning purposes, if you are not approved, so it's hard for me to tell you what functions are exactly in those special console licenses, but my guess is all the network, friends list, acheivements, in-app purchases, etc. is more or less console-specific at this point. If anyone knows and is allowed to speak, feel free to enlighten/correct me on this!

Even with a million dollars in your Paypal account, you wouldn't be able to buy a Switch (or any console, just following my previous example) license right now in any legitimate way.
 
Last edited:
Absolutely not.


Not anybody can buy a console license, you have to be an approved developper. Say Nintendo gives you the greenlight, they will supply you with the info you need to be able to purshase the said console license, which comes with the needed functions.

Even with a million dollars in your Paypal account, you wouldn't be able to buy a Switch (or any console, just following my previous example) license right now (in any legitimate way).
The investors helping with the game are planning on buying the licensing for Xbox and PlayStation. I don't believe we have plans for Nintendo but that is good to know and to keep in mind. Thanks!
 
Last edited:
The inventors helping with the game are planning on buying the licensing for Xbox and PlayStation. I don't believe we have plans for Nintendo but that is good to know and to keep in mind. Thanks!
As I said, Nintendo was an example, same goes for every console. Some companies are much easier to get approved for as developper, tho. Nintendo is (used to be?) the harshest to get into. Just Google 'console name' developper program, or some such.
 
As I said, Nintendo was an example, same goes for every console. Some companies are much easier to get approved for as developper, tho. Nintendo is (used to be?) the harshest to get into. Just Google 'console name' developper program, or some such.
Ok! So if approved you're saying that the console will grant me certain functions to connect my server to? Is there a software or language compatible for both Xbox and PlayStation or would I be able to create a Game Maker server but place in particular functions given to me that would allow for those platforms to understand gml?
 
Ok! So if approved you're saying that the console will grant me certain functions to connect my server to? Is there a software or language compatible for both Xbox and PlayStation or would I be able to create a Game Maker server but place in particular functions given to me that would allow for those platforms to understand gml?
I'm saying if you're approved, you are given a key to BE ABLE to buy that console's GM license, which has console-specific functions. You would still create your games in the Game Maker Language for any console, same as usual. You will just have more functions at your disposal. For example, I'm guessing the PS4 GMS version has some function to change the color of the light on the gamepad. But everything will still be the same GML language you used in your first Click The Clown game (or whatever is the new introduction game these days).
 
I'm saying if you're approved, you are given a key to BE ABLE to buy that console's GM license, which has console-specific functions. You would still create your games in the Game Maker Language for any console, same as usual. You will just have more functions at your disposal. For example, I'm guessing the PS4 GMS version has some function to change the color of the light on the gamepad. But everything will still be the same GML language you used in your first Click The Clown game (or whatever is the new introduction game these days).
Awesome I appreciate your words of wisdom, thank you!
 
Awesome I appreciate your words of wisdom, thank you!
Bro, it's not wisdom at all. I never developped for console. Just some bribes of info I stumble onto over the years, because let me tell you, these console guys like to keep their stuff in their inner-circle. Pretty sure those licenses come with heavy NDAs, otherwise more info would be accessible....
Anyway, you'll probably be the one who can tell me soon enough...no NDA breaking, just 2 drunk game devs on Facetime... ;)
 
For the purpose of this forum and anyone in a similar position as I am wanting to know more like myself.
These documents from Yoyo I found useful in the order shown:

Yoyo Networking Overview: (This actually follows along well with Wizirdi's Networking tutorials)

Yoyo Console Licenses: (Somewhat of what @Slow Fingers was mentioning above and where to go to seek permission)

Yoyo Permissions and Internet Access Required by GMS2: (This one may not be as relevant to this forum. I am still personally reviewing it)
 

Padouk

Member
@Athena's Owl
Your questions comes quite often and I've stop reading them at some point...
You used the word "Console" and "Licences" and It catched my attention.. I'm assuming you are not going to run a proof of concept in your basement. And you have a little bit more then 2$ worth of budget to spend. (And probably more than that to lose if something goes wrong)
Those online tutorials might not be the safest things to look at from a networking perspective.

Don't get me wrong. The GMS's proposed network api. is great for Learning, local network, proof of concepts or happy code doodling: Sure! by all mean use it
But for production of any value... i'd strongly advice against it in favor for a Relay managed by a 3rd party.

He makes the server that which is separate from the client [...] being essentially a mirror [..]
That's more of a "proof-of-concept"
Running a server an independant GMS is fine for a proof-of-concept and learning purposes, but don't do that in real life.
You would need to serve a GMS server for each game in a none asynchronous environment. Without going into the details, that means you well need to dedicate CPU usage for each single GMS server with little way to share their idle time.

Want to manage 200 games at the same time? That means you need 200 server side instances of your GMS to be loaded, resrvince 1 core and 1Gb ram each.. I can guarantee you, that won't be cheap.

Typical Client / Server will use TWO completly different stack of tools (and TWO completly different state of mind/programming skills)
Game Engine for the Client (here GMS is a good choice)
Async Stack or Serverless cloud stack to handle countless game states in parallel.

If you don't want to learn/manage two stacks, Stick with a Single source code (GML) which serve as both: the Client + the Server. Simply disable the server code on all joining parties.
--
So yeah... P2P...
That render mute most of your questions about duplicating Assets and Objects.. the answer is implicite and yes.


Question 2. My other question has more to do with a server that can be used on consoles as well as PC. Would I need to use a different language and software to be able to do this?
Again! A very valid question. I love it.
GMS is good enough to create your Game on those devices. Again.. I know nothing about your intent.
It's good enough for a single codebase to be deployed on multiple devices.
You will have some portability issues (you will need a few if(os_type == os_xboxone) here and there, and you will need to disable/enable assets on some devices but nothing major really if you plan ahead and know what you are doing).
Depending on what you are trying to achieve, you may need a few native call to reach functionnalities not exposed by GMS. Again... not knowing your intent, in the end that may mean 95% of the code is shared in GMS, the other 5% device specific in native extensions. So yeah.. you may need about 5% spread on the language base.

Some other details if you have time. I've read on forums that platformer online multiplayer games that its advised to use udp instead of tcp.
That's old news my friend!
What's better? Pancakes vs Crepes?

If you worry too much about that question, you will forget the big picture... and something tells me you need to focus a little more on the big picture first.
For commercial needs, the UDP vs TCP is not really relevant anymore.
You "may" want to care about Reliable vs Unreliable... (their derivative forms). They are both interesting for specific use cases, but given the question at hand I would start wrapping my head arroung Reliable first.

All of those Consoles have proprietary sockets anyway so you will need to learn them (or abstract them) in due time..

I'm not saying the question is not valuable...
I'm simply saying it's not the biggest issue you will be facing in your networking journey and you should leave that to the 5 lone wolves in the world who really tackle those for business purposes.


Go for a Relay.
It's the only real way to support at the same time Mobile and PC game and (in some cases) the only way to support Consoles.

Relay are trusted servers who's sole purpose is to ... like their name imply.. to relay your datagram from one souce to another in a completly agnostic way.

That comes with a bigger responsability then intuition can allow
A) Yes. they decide for us if UDP, TCP or WebSocket is more approriate.
B) Yes. they break and bundle MTU so you don't have to worry about that.
C) Oh! They certified origin, so you know you are connecting to the game and not to some random neighboor who's spying on you.
D) Ah! SSL, player's communication is encrypted through communication so they don't have to worry about their Moms looking at their chat streams with a network monitoring tool.
C) Hum! SLA 99%, When one server goes down.. there's always 2 more route to go for. Redundancy so your clients can still communicate one to the other.
D) Yum! Geolocation: With relays in most part of the world connected through enteprise level connection. Reaching the US from EU travers from optimal route with reduced hopes... More chance to match 20 indie player
E) Mgnhu?! Certified Data Protection Authority: Policies and best practice to informe your player what they are doing with the data and what they are storing. So you can protect yourself in case of breach.

Really.. you shouldn't care if you are UDP or TCP anymore... let them find the right one for you and focus on making good games. I love multiplayer game! make me a good one please ;)

Padouk's recommendation: pay for a relay.
Expect: Free for development purposes, from 75$USD to 150$USD/y per year for indie, about 150$USD/m for entry level commercial.
1608667617560.png


Should I use peer to peer(P2P) instead of having a separate server?
You are asking the right questions! I love that.

Now this one is a bit more tricky to answer without knowing the exact intent behind all of this.

I always discourage the Client / Server in favor for the P2P approach because Servers are cost prohibitive on the long run.
-The Client is build with 1 set of technologies, the Server with another one. That ads up to your knowledge. Someone with good enough knowledge of both worlds is usually not cheap.
-The server needs to be up and running at all time (or has some wakeup mechanism) Which mean you are paying for thin air 80% of the time (unless you have some wakup mechanisms.. in that case you are paying for monitoring that..)

You can usually go just fine with P2P + an hidden database (accessible with RPC api calls only through the relay) for storing game states.

Padouk's recommendation: Go P2P my friend.


I guess I just don't know the full scale of consequences of this since I myself am not a hacker nor do I know how someone breaches data and how to put up protective measures to prevent it
When it comes to networking. The core interface proposed by GMS is "fine" but not "great" there are so many little subtilities you need to account for...

If you do use it... don't let me play your game.. I'll be more than happy to use your open unprotected port to stream 10 TB of porn into you sockets... That might be useful, but it will sure raise questions from your IPS.

--
Not to promote any in particular, but here are a few networking channels i've been using
For local network, proof of concepts or code doodling: Sure! by all mean use GMS's proposed network api.
For Steam: https://partner.steamgames.com/doc/api/ISteamNetworkingSockets
For Html5 (newgrounds) games: https://www.newgrounds.io/
For Mobile, Consoles and Agnostic communication: I almost alway use photon https://www.photonengine.com/en-US/Realtime.
https://playfab.com/.. well go ahead search

In either case, everything you've learn from tutorials about network_sockets and network_send_broadcast and such is still be applicable, you simply need to substitute your network_* by some proprietary calls
 
Last edited:
@Athena's Owl
Your questions comes quite often and I've stop reading them at some point...
You used the word "Console" and "Licences" and It catched my attention.. I'm assuming you are not going to run a proof of concept in your basement. And you have a little bit more then 2$ worth of budget to spend. (And probably more than that to lose if something goes wrong)
Those online tutorials might not be the safest things to look at from a networking perspective.

Don't get me wrong. The GMS's proposed network api. is great for Learning, local network, proof of concepts or happy code doodling: Sure! by all mean use it
But for production of any value... i'd strongly advice against it in favor for a Relay managed by a 3rd party.

That's more of a "proof-of-concept"
Running a server an independant GMS is fine for a proof-of-concept and learning purposes, but don't do that in real life.
You would need to serve a GMS server for each game in a none asynchronous environment. Without going into the details, that means you well need to dedicate CPU usage for each single GMS server with little way to share their idle time.

Want to manage 200 games at the same time? That means you need 200 server side instances of your GMS to be loaded, resrvince 1 core and 1Gb ram each.. I can guarantee you, that won't be cheap.

Typical Client / Server will use TWO completly different stack of tools (and TWO completly different state of mind/programming skills)
Game Engine for the Client (here GMS is a good choice)
Async Stack or Serverless cloud stack to handle countless game states in parallel.

If you don't want to learn/manage two stacks, Stick with a Single source code (GML) which serve as both: the Client + the Server. Simply disable the server code on all joining parties.
--
So yeah... P2P...
That render mute most of your questions about duplicating Assets and Objects.. the answer is implicite and yes.



Again! A very valid question. I love it.
GMS is good enough to create your Game on those devices. Again.. I know nothing about your intent.
It's good enough for a single codebase to be deployed on multiple devices.
You will have some portability issues (you will need a few if(os_type == os_xboxone) here and there, and you will need to disable/enable assets on some devices but nothing major really if you plan ahead and know what you are doing).
Depending on what you are trying to achieve, you may need a few native call to reach functionnalities not exposed by GMS. Again... not knowing your intent, in the end that may mean 95% of the code is shared in GMS, the other 5% device specific in native extensions. So yeah.. you may need about 5% spread on the language base.


That's old news my friend!
What's better? Pancakes vs Crepes?

If you worry too much about that question, you will forget the big picture... and something tells me you need to focus a little more on the big picture first.
For commercial needs, the UDP vs TCP is not really relevant anymore.
You "may" want to care about Reliable vs Unreliable... (their derivative forms). They are both interesting for specific use cases, but given the question at hand I would start wrapping my head arroung Reliable first.

All of those Consoles have proprietary sockets anyway so you will need to learn them (or abstract them) in due time..

I'm not saying the question is not valuable...
I'm simply saying it's not the biggest issue you will be facing in your networking journey and you should leave that to the 5 lone wolves in the world who really tackle those for business purposes.


Go for a Relay.
It's the only real way to support at the same time Mobile and PC game and (in some cases) the only way to support Consoles.

Relay are trusted servers who's sole purpose is to ... like their name imply.. to relay your datagram from one souce to another in a completly agnostic way.

That comes with a bigger responsability then intuition can allow
A) Yes. they decide for us if UDP, TCP or WebSocket is more approriate.
B) Yes. they break and bundle MTU so you don't have to worry about that.
C) Oh! They certified origin, so you know you are connecting to the game and not to some random neighboor who's spying on you.
D) Ah! SSL, player's communication is encrypted through communication so they don't have to worry about their Moms looking at their chat streams with a network monitoring tool.
C) Hum! SLA 99%, When one server goes down.. there's always 2 more route to go for. Redundancy so your clients can still communicate one to the other.
D) Yum! Geolocation: With relays in most part of the world connected through enteprise level connection. Reaching the US from EU travers from optimal route with reduced hopes... More chance to match 20 indie player
E) Mgnhu?! Certified Data Protection Authority: Policies and best practice to informe your player what they are doing with the data and what they are storing. So you can protect yourself in case of breach.

Really.. you shouldn't care if you are UDP or TCP anymore... let them find the right one for you and focus on making good games. I love multiplayer game! make me a good one please ;)

Padouk's recommendation: pay for a relay.
Expect: Free for development purposes, from 75$USD to 150$USD/y per year for indie, about 150$USD/m for entry level commercial.
View attachment 36520



You are asking the right questions! I love that.

Now this one is a bit more tricky to answer without knowing the exact intent behind all of this.

I always discourage the Client / Server in favor for the P2P approach because Servers are cost prohibitive on the long run.
-The Client is build with 1 set of technologies, the Server with another one. That ads up to your knowledge. Someone with good enough knowledge of both worlds is usually not cheap.
-The server needs to be up and running at all time (or has some wakeup mechanism) Which mean you are paying for thin air 80% of the time (unless you have some wakup mechanisms.. in that case you are paying for monitoring that..)

You can usually go just fine with P2P + an hidden database (accessible with RPC api calls only through the relay) for storing game states.

Padouk's recommendation: Go P2P my friend.



When it comes to networking. The core interface proposed by GMS is "fine" but not "great" there are so many little subtilities you need to account for...

If you do use it... don't let me play your game.. I'll be more than happy to use your open unprotected port to stream 10 TB of porn into you sockets... That might be useful, but it will sure raise questions from your IPS.

--
Not to promote any in particular, but here are a few networking channels i've been using
For local network, proof of concepts or code doodling: Sure! by all mean use GMS's proposed network api.
For Steam: https://partner.steamgames.com/doc/api/ISteamNetworkingSockets
For Html5 (newgrounds) games: https://www.newgrounds.io/
For Mobile, Consoles and Agnostic communication: I almost alway use photon https://www.photonengine.com/en-US/Realtime.
https://playfab.com/.. well go ahead search

In either case, everything you've learn from tutorials about network_sockets and network_send_broadcast and such is still be applicable, you simply need to substitute your network_* by some proprietary calls
Sorry for the late reply. I actually only just noticed all of your spoilers attached. It was amusing to read some of your responses, 😂 also I really appreciate the feedback and you enjoying my questions. I'll for sure check out those sources you've attached, and look more into 'relay managed by a third party' and will greatly consider 'P2P' among your other suggestions you have given me. Thank you greatly.
 

Padouk

Member
Sure! No worries
Don't take my recommendation for granted.. I'm a nobody hiding behind a weird peudo. And I know nothing about your end game or Budget. And I know nothing about what's included in those premium GMS licences.

I was mostly trying to help you align your taught on your core business: Making games.

To me UDP vs TCP... DDOS... Latency... Nat traversal... Encrypted communication... Swear/Curse words detection... Redundancy...
Those are all valid questions that needs to be revisited/addressed everytime a new exploit is found...

I just feel like my time as more value on either end of that communication channel.
Some people buy arts, some people buy extensions, I buy peace of mind when it comes to networking.
 
Last edited:
Top