Pages: 1
Author Topic: C++ Socket Based Networking  (48,668 Views)
Offline (Unknown gender) kkg

Member
Joined: Nov 2009
Posts: 84
View profile
Posted on: November 21, 2009, 11:27:44 AM
I think I read somewhere on one of the topics that a member here was planning to write a socket based networking system for ENIGMA. Is that still supposed to be happening? I would love if could stop using WinSock haha ;D Anywho I know zero percent about C++, so I doubt I'd be able to offer much assistance, but I suppose if somebody wrote the system the least I could do is port(script, don't hurt me) it into EML(E++, whatever you guys are calling it :P) functions.

In the mean time I suppose i'll just use ting (http://code.google.com/p/ting/), but if one of you are making one i'll scrap it :] I'd just like to know that i've got cross platform socket based for my (OBVIOUSLY INCREDIBLE AND COMMERCIALLY SUCCESSFUL :P) games :]

Keep up the hard work guyz, you're all doing really well from what I'm reading!

If you guys need any help with anything (I know zilch about anything but PHP and GML :P), I do graphic designing in my free time so if that's of any use to you guys just send me a PM or something.

Thanks!
Offline (Unknown gender) IsmAvatar

LateralGM Developer
LGM Developer
Joined: Apr 2008
Posts: 877
View profile
Reply #1 Posted on: November 22, 2009, 07:28:00 PM
I wrote the networking code for Enigma, written in C using Socket for linux and WinSock for windows. It is very loosely based off of the mplay_ functions for GM, but will be a completely different function set and will be much more powerful (e.g. ability to connect to any web protocol, be it http, ftp, smtp, ssh, or just your own multiplayer protocol). As it stands right now, however, it's much lower level than mplay_, so it may be a fair bit more challenging, especially if you want to port the entire session/game/etc layout of mplay into your game.
Offline (Unknown gender) Game_boy

Member
Joined: Apr 2008
Posts: 228
View profile
Reply #2 Posted on: November 22, 2009, 09:32:33 PM
Quote from: IsmAvatar on November 22, 2009, 07:28:00 PM
I wrote the networking code for Enigma, written in C using Socket for linux and WinSock for windows. It is very loosely based off of the mplay_ functions for GM, but will be a completely different function set and will be much more powerful (e.g. ability to connect to any web protocol, be it http, ftp, smtp, ssh, or just your own multiplayer protocol). As it stands right now, however, it's much lower level than mplay_, so it may be a fair bit more challenging, especially if you want to port the entire session/game/etc layout of mplay into your game.

Does that mean it won't be directly compatible with mplay_ ? As in you can't just load any old Game Maker game into Enigma, hit compile and have it function the same? Because I thought that was the point.
Offline (Unknown gender) kkg

Member
Joined: Nov 2009
Posts: 84
View profile
Reply #3 Posted on: November 22, 2009, 09:51:21 PM
That's still pretty cool Ism D:!

Don't stress too much about making it super massive complete, I'm sure there're people who'll modify it for you down the track anyway. Unless you're some kind of hell spawned perfectionist, then in that case I have no say in whether you'll complete it or not :P

What exactly do you mean by "lower level" than mplay_? I thought mplay_ was about as low level as it got (including low quality <_<)

@Game_boy: I'm sure the lack of mplay_ won't dearly hurt anyone :P. If it's that important though, and if Ism doesn't do it himself (i'm not sure how what you're doing works, so you may be doing this already as you code it) I'll gladly force myself to implement mplay_ functions using another engine or Ism's engine D:
Offline (Unknown gender) Game_boy

Member
Joined: Apr 2008
Posts: 228
View profile
Reply #4 Posted on: November 22, 2009, 10:13:21 PM
Quote from: kkg on November 22, 2009, 09:51:21 PM
@Game_boy: I'm sure the lack of mplay_ won't dearly hurt anyone :P. If it's that important though, and if Ism doesn't do it himself (i'm not sure how what you're doing works, so you may be doing this already as you code it) I'll gladly force myself to implement mplay_ functions using another engine or Ism's engine D:

I'm not coding anything that specifically needs compatibility; I just thought that the idea of the Enigma project was to be 100% source compatible with GM while /also/ providing lower-level stuff and C++. Otherwise it's a C++ IDE with a better standard library and some GM import capability.

You are right though, someone will implement mplay_ on Ism's framework to do it anyway if they need it. mplay_ is a pretty poor setup anyway, no serious online GM game uses it.
Offline (Unknown gender) Josh @ Dreamland

Prince of all Goldfish
Developer
Joined: Feb 2008
Posts: 2,950
View profile
Reply #5 Posted on: November 23, 2009, 02:49:39 AM
My vision for MPlay was to take Ism's code and add a loose-fitting wrapper to it. By loose-fitting, I mean that half the functions won't do anything. Like session ID and the related functions. Honestly, I wrote an MPlay library for GM once, and the terminology was so vague and preposterous I never managed to give it my own naming convention.

Not to mention the fact that, as far as I can tell, GM's MPlay hardly works for anyone. Seems to me to be for a couple reasons. Number one, those who use MPlay do so because they don't understand 39Dll or don't have a registered GM. These are the people that don't understand that MPlay isn't designed to turn their routed network into an MMO server.

Everyone that does understand that concept moves onto 39Dll. Except me, I suppose. ...Okay, so some people have made games with it, but honestly, I've never seen an MPlay game that was truly worth porting anywhere. All the good ones are 39Dll (Do correct me if I'm wrong, I'd be happy to believe MPlay was a sound system)

So ideally, MPlay will "work," but it will work in the same sense that it is understood: Superficially.
Offline (Unknown gender) IsmAvatar

LateralGM Developer
LGM Developer
Joined: Apr 2008
Posts: 877
View profile
Reply #6 Posted on: November 23, 2009, 11:45:52 PM
QuoteDoes that mean it won't be directly compatible with mplay_ ? As in you can't just load any old Game Maker game into Enigma, hit compile and have it function the same? Because I thought that was the point.
As my code stands, mplay_ will remain in the set of "currently unimplemented functions, aka TODO", while there will be a functional set of alternative online functions using my library to achieve the ends. How mplay is implemented ultimately is of no interest to me - I just wrote my code on my own set of functions, and if someone wants to wrap mplay into my functions or wants to do a serious rewrite or re-implementation of DirectPlay for porting to mplay, then more power to them, but it's beyond my scope.

QuoteI'm sure there're people who'll modify it for you down the track anyway
Precisely.

QuoteWhat exactly do you mean by "lower level" than mplay_? I thought mplay_ was about as low level as it got (including low quality <_<)
Low level in software terms refers to how closely to the hardware level you are, and high level refers to how abstracted or detached from the hardware level you are. For computer languages, PHP and Java would be considered high level languages, whereas C and ASM would be low level languages. In terms of networking, you can consider the entire stream of individual bits as they go through the tubes, including your own code determining where the bits go (which is very low level). Or you can consider "Protocols", which is a predefined arrangement of bits that computers all agree on to use for networking. Protocols, then, are a higher level than individual bits. Even within protocols, you have lower level protocols, like IP, which is a very basic definition of how bits are sent in a packet-like fashion (so we're looking at bunches of bits, or packets, rather than each individual bit in the stream, and each packet contains a set of information like who it's headed to). On top of IP (that is to say, higher level), there's two primary protocols of TCP and UDP, which basically define how computers try to compensate for packets that get lost or damaged along the way. On top of each of those are a number of higher level protocols like HTTP, FTP, SSH, etc, which define how data inside those packets is formed for specific kinds of communication. Another kind of protocol, kind of along the same lines as HTTP and FTP and such, is DirectPlay, or an online game handling library for Direct X, which builds off of both TCP and UDP to create protocols for handling game servers and game clients and handling more abstract concepts like online variables, sessions, and players. GM's mplay_ functions are built off of DirectPlay, so they are even higher level than DirectPlay. Unfortunately, DirectPlay is based on Direct X, is windows only, is proprietary, and worst of all, is deprecated. It's a very complex library of network related routines that I certainly would not want to rewrite myself. As such, I cannot write mplay_ functions. Instead, I went a couple layers down, down to TCP and UDP, and created my routines from there. I also made a couple wrapper functions that extended those routines into HTTP, FTP, and SSH protocols, mostly just for testing and personal purposes, but it was pretty easy to do. As such, whereas DirectPlay/Mplay is restricted exclusively to games, with my routines now you are allowed to communicate with webpages, online databases, and other things of that nature, or you can just use routines for game communication - it's completely open ended.

Quoteand if Ism doesn't do it himself
Herself.

QuoteYou are right though, someone will implement mplay_ on Ism's framework to do it anyway if they need it. mplay_ is a pretty poor setup anyway, no serious online GM game uses it.
Exactly.
Offline (Unknown gender) kkg

Member
Joined: Nov 2009
Posts: 84
View profile
Reply #7 Posted on: November 24, 2009, 03:56:06 AM
Yeah the only mplay_ based game that I remember being half popular was RoPW anyway, and that's long dead.

Thanks for clearing that up Ism :]
Pages: 1