• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

network planning

Pfap

Member
I'm working on learning networking and would like to release a multiplayer game on ios, but after doing some research here and elsewhere I'm concerned I wont be able to create a server and client that can be released on ios due to Apple only accepting IPv6. Is it possible to code an IPv6 solution that will work with http?

Here is a Gamemaker function: http_request(url, method, header_map, body);

So, a url is a web address right? And a web address can be either IPv4 or IPv6 to my understanding.

How I am going to go about creating this really has me stumped, (no surprise, as the consensus on network difficulty seems to place it out of the reach of "weekend coders").

Is it possible to create a connection between players using just http? I've spent the past 2 days giving myself a crash course in networking and not really sure where to start.

Or does this basically make gamemaker no longer suitable for ios development?
(I enjoy gamemaker because it makes things streamlined for simplicity)
There always seems to be some coding "magic" that can be done to solve most problems, but I'm looking for a solution that could be implemented with some level of certainty.

Using the built in networking functions for IPv4 is something I can handle with my current knowledge, but I'm stressed about this IPv6 stuff.

Forgive me if this seems ranty.



Is it possible to code an IPv6 solution that will work with http? And if so does anybody have any tips or resources to get me started on learning how?

Would I need a dedicated server? Or could I code the client/server in one?
 
A

Adam Tompkins

Guest
Pfap, I wish I had an answer, glad to see I am not alone in the IPv6 struggle with Game Maker Studio and IOS Apple development.

25% of the United States is now on IPv6, the United Kingdom is almost at 15%.

This problem is only going to get worse and I really don't want to learn another coding language (Unity) after investing so much of my time with Game Maker Studio.

I did receive a response from the GM Staff about this, but they only mentioned it was a tricky fix and that it was not on the top of their list.

IPv6 TCP/IP support needs to move up in priority, but sadly there is not much noise coming from the Game Maker community to drive action.
 

Fern

Member
IPv6 isn't directly supported but if you are making a mobile game with networking it is almost certainly necessarily to have a middle-man (dedicated server) anyways. Said server can handle IPv6 and connect users based on that. The IPv4 networking is mostly targeting desktop/console I'd imagine. Also IPv6 is getting more popular but it certainly isn't being utilized by 25% of the USA. I've lived in a few places now, California, Hawaii, now Oregon and nowhere have I seen IPv6 used. It isn't common practice which is why it has existed for years yet we stick to IPv4.

If you are making a mobile game IPv4 shouldn't be an issue anyways.
 

Pfap

Member
I had seen some of Adam’s earlier post which is why I began researching IPv6 and while I hear what you are saying Seabass, I can’t wrap my head around it.

If I code my game as a client with IPv4 to communicate with my server which is IPv6 the initial send out would be in IPv4. Unless it only matters with the server?

Also, I was under the impression that the http functions worked with the IPv6.

In any case I plan on continuing development, but just wanted to begin looking for solutions, so when the time comes I’m not stuck with any surprises.

Are you continuing to look for a solution Adam?
 
A

Adam Tompkins

Guest
Haven't had any success. My server is in C# and is correctly setup and functional with IPv6. The issue is that to release on Apple, the application must support IPv6-Only.

The reason why the IPv6 conversion is seamless (and yes its 25% in the US) is because most mobile providers also have an IPv4 address, or are using NAT64/DNS64 translation to synthesize an IPv4 address from IPv6. The issue is the GMS built in networking functions do not resolve the DNS from an IPv6-only client to reach an IPv4 server. So really, your server need not be IPv6, but the client needs to be able to make the conversion and currently Game Maker does not.

I am not experienced enough to solve this myself by creating my own networking scripts and if the developers at Game Maker are saying its difficult for them, I don't image I would be able to figure it out.

Next step for me is to dabble around in Unity...but really not looking forward to it.
 

Pfap

Member
IPv6 from what I’ve been reading is eventually going to phase out IPv4 and with Apple’s decision I imagine it will happen sooner rather than later. Have you read about Apple’s Bonjour networking? It would be difficult to implement, but might be worth learning I’m not sure how to go about using it with Gamemaker though. (You would probably need to make your own scripts as well.) Otherwise, maybe you could talk to a service like Photon or Smartfox? I think some of them offer free trials, I haven’t studied enough to know if any of these are viable solutions, but I haven’t given up on Gamemaker yet.
 

Pfap

Member
After further review, Bonjour won’t work. Maybe learning python or some other networking language would be better than learning a whole new game engine though?
 

PNelly

Member
I'm working on learning networking and would like to release a multiplayer game on ios, but after doing some research here and elsewhere I'm concerned I wont be able to create a server and client that can be released on ios due to Apple only accepting IPv6. Is it possible to code an IPv6 solution that will work with http?

Here is a Gamemaker function: http_request(url, method, header_map, body);

So, a url is a web address right? And a web address can be either IPv4 or IPv6 to my understanding.

How I am going to go about creating this really has me stumped, (no surprise, as the consensus on network difficulty seems to place it out of the reach of "weekend coders").

Is it possible to create a connection between players using just http? I've spent the past 2 days giving myself a crash course in networking and not really sure where to start.

Or does this basically make gamemaker no longer suitable for ios development?
(I enjoy gamemaker because it makes things streamlined for simplicity)
There always seems to be some coding "magic" that can be done to solve most problems, but I'm looking for a solution that could be implemented with some level of certainty.

Using the built in networking functions for IPv4 is something I can handle with my current knowledge, but I'm stressed about this IPv6 stuff.

Forgive me if this seems ranty.



Is it possible to code an IPv6 solution that will work with http? And if so does anybody have any tips or resources to get me started on learning how?

Would I need a dedicated server? Or could I code the client/server in one?

Here: (https://forum.yoyogames.com/index.p...-help-nat64-dns64-and-ipv6.33339/#post-206509), according to Russel, GM's http functions should work just fine over ipv6. The tcp/udp suite of functions however are only ipv4, and yoyo has "no plans to support ipv6 over tcp and udp connections".

A web address is a uniform resource locator but not all uniform resource locators are web addresses (all squares are rectangles). When you type a web address into your browser the address is resolved into an IP by a domain name server (like using a name to lookup a phone number in the white pages) so that your computer actually knows where to connect.

http can be used to develop mobile games (and often is), but it does impose some restrictions. http isn't really suited to building anything that happens in real time. Games that require only periodic updates between players/a server will work just fine, but something like smash bros is a no-go.

Regarding connections between players, an http client can only connect to machines that are running a web-server that can understand http requests. GM makes it very easy to build an http client application but I'm skeptical of a server. It might be possible to put something together by running network_create_server on port 80 and interpreting the request strings yourself, but I'm just speculating. Even so, you'd still have to resolve the problem of locating other players on a network/over the internet, which is one of the spots where dedicated servers come into play.

GM's http functions handle ipv4 vs ipv6 under the hood, there's literally no difference in how you would use them as a GM programmer.

As you say, networking is really cool, but it is not easy. Getting it right requires going slow, being careful, and learning a ton of stuff outside of the GMS box.

In general, Apple is pretty obnoxious to work with as a developer. I'd be pretty leery of using GM's http/networking functions for that purpose, because if you don't do everything precisely the way Apple wants to they'll simply reject your title. If they want some sort of deep level change made that GM won't allow then you'd simply be up the creek. You'd want to have a really thorough understanding of Apple's requirements for networked applications before trying some sort of ad-hoc http peer to peer thing with gamemaker.

EDIT: Here's link to the Apple dev forum regarding networking related app rejections and ipv6: https://forums.developer.apple.com/message/147579#147579
 
Last edited:

Pfap

Member
Here: (https://forum.yoyogames.com/index.p...-help-nat64-dns64-and-ipv6.33339/#post-206509), according to Russel, GM's http functions should work just fine over ipv6. The tcp/udp suite of functions however are only ipv4, and yoyo has "no plans to support ipv6 over tcp and udp connections".

A web address is a uniform resource locator but not all uniform resource locators are web addresses (all squares are rectangles). When you type a web address into your browser the address is resolved into an IP by a domain name server (like using a name to lookup a phone number in the white pages) so that your computer actually knows where to connect.

http can be used to develop mobile games (and often is), but it does impose some restrictions. http isn't really suited to building anything that happens in real time. Games that require only periodic updates between players/a server will work just fine, but something like smash bros is a no-go.

Regarding connections between players, an http client can only connect to machines that are running a web-server that can understand http requests. GM makes it very easy to build an http client application but I'm skeptical of a server. It might be possible to put something together by running network_create_server on port 80 and interpreting the request strings yourself, but I'm just speculating. Even so, you'd still have to resolve the problem of locating other players on a network/over the internet, which is one of the spots where dedicated servers come into play.

GM's http functions handle ipv4 vs ipv6 under the hood, there's literally no difference in how you would use them as a GM programmer.

As you say, networking is really cool, but it is not easy. Getting it right requires going slow, being careful, and learning a ton of stuff outside of the GMS box.

In general, Apple is pretty obnoxious to work with as a developer. I'd be pretty leery of using GM's http/networking functions for that purpose, because if you don't do everything precisely the way Apple wants to they'll simply reject your title. If they want some sort of deep level change made that GM won't allow then you'd simply be up the creek. You'd want to have a really thorough understanding of Apple's requirements for networked applications before trying some sort of ad-hoc http peer to peer thing with gamemaker.


That answers my question and also answers why asking it was pointless, lol (it's just the wrong tool).

I'm wondering right now if making some extension with python and then using that to make a server would work? It's just amazing how difficult it is to do something when you don't know what you don't know (I guess that's why jumping in is best), but what are some good languages for coding networks for multiplayer games? After GML python is the language I'm most aware of, but I know there are others like ruby and I think I may have heard of cocoa. Sitting down and making games with GML is fun and enjoyable; especially, after learning the functions and not needing to open the manual every few minutes. It's exciting when stuff works and your characters are doing things you programmed (there's a satisfying reward to it) this whole networking thing while cool, seems to have high potential to be a drag hopefully I'm wrong though #jumping_in.
 

PNelly

Member
That answers my question and also answers why asking it was pointless, lol (it's just the wrong tool).

I'm wondering right now if making some extension with python and then using that to make a server would work? It's just amazing how difficult it is to do something when you don't know what you don't know (I guess that's why jumping in is best), but what are some good languages for coding networks for multiplayer games? After GML python is the language I'm most aware of, but I know there are others like ruby and I think I may have heard of cocoa. Sitting down and making games with GML is fun and enjoyable; especially, after learning the functions and not needing to open the manual every few minutes. It's exciting when stuff works and your characters are doing things you programmed (there's a satisfying reward to it) this whole networking thing while cool, seems to have high potential to be a drag hopefully I'm wrong though #jumping_in.
GM's networking features work quite well (in my opinion anyway), but it might be the wrong tool for real-time multiplayer iOS games or peer-to-peer iOS games because of the ipv6 restriction. That being said, you could certainly still build an iOS game that relied on a remote dedicated server, and used GM's built in http functions on the client side.

It may be possible to shoehorn an ipv6 web-server into your game, extension or no extension, but it's tough to know if that kind of solution would pass muster during app review.

When you talk about server programming the language you use is going to depend on your target platform. If you're talking about writing iOS server code you'll have to work in something that iOS supports, which appears to make your choices swift, c, objective c, or c++.
 

Pfap

Member
Yea, there are a lot of things to try and consider. I don’t expect it to be easy, but it would be nice to be able to pick one method and be gauranteed it will work.


I will keep this thread updated with my progress.
 

Pfap

Member
Ok, I put up a php server and started making http requests it all works pretty good I haven't done anything that requires real time connectivity though. I was wondering if anybody has tried using a service like Apache Cordova or cocoon by ludei to create a native application for ios or google play from an html5 browser game? The adobe phonegap one cautions that Apple will reject apps that don't feel native enough and they might run slower than expected, not sure if I'll give it a try or not as I would still need to use an extension for web sockets or socket.io. I'm considering using a polling system and http to provide as close to real time as is possible with a response / request system. Otherwise, a native solution in Xcode may be what I end up using.
 
Top