Besides making my indie, I'm planning on a server multiplayer game. I'm new to networking and barely know anything how server works. If someone able to give out some code or helping me out making both hoster and player. That would be very appreciated.
EDIT: to be more exact. I just need some thing 2 player co-op and 1v1 game. Like match making with random player.
Multiplayer programming takes quite a while to learn, get used to, and master.
I recommend you don't use Game Maker for a dedicated server.
39ster suggested himself that people migrate onto other connectivity libraries. Net39 dll or HTTP 2 dll are both good options (though the principles shown in the video apply in general to netcode).Finally, forget the internal MPlay functions. DirectPlay is depreciated.As Alert said, writing network code can be tricky. Once you get a grasp of how it works though, it's really simple. Also, I second Juju. You'd be better off writing the server in a different language. C# + Lidgren is a great combination.
Google some examples and tutorials, you'll find some. It's quite a bit to write and explain on the fly. Good luck.So, why's it called "39" dll?
Because 1-38 were already taken
Trufax.
How many people do you see using your game with online features? Whether you need a server coded outside of Game Maker will depend on that answer. If you don't see more than a dozen players connected, then all the GM online tutorials and examples would get you where you need to be with the mentioned DLL's above.
If you're looking at a long term project that will connect hundreds of people to a single server, then you should look into learning C#. I've seen a few Game Maker MMO's use C++ servers with GM clients and they do much better with the upgrade in servers. A GM server may feel slower on updating information. Ping times may be high if there's too much information being passed.Well, to be more exact. I just need some thing 2 player co-op and 1v1 game. Like match making with random player.
Shit. HTTP 2 DLL seems like a better option than 39DLL. I may want to make changes to my API yet again…