a piece of multiplayer code for GML
ok ive gotten a bit TOO eager about multiplayer games, and i made a post containing GML code that will show what my game will look like:
//this connection is made for ipx connections
{
mplay_init_ipx();
}
//this is another for TCP/IP and its a bit more complicated…
{
mplay_ipaddress();
//to show the ip address is completely OPTIONAL and is NOT recommended,unless its in a separate room.
mplay_init_tcpip(address_here);
}
//heres one for modem connection,as you only need to enter your phone number
//note that the initilization string is left empty,witch is possible
{
mplay_init_modem(0,95155658066)
}
//finnaly, heres one for serial, witch is much more complicated and im only using this for demonstration.
{
mplay_init_serial(2,100,0,3,1)
}
//heres a short command to see wheather is returns successful
mplay_connect_status()
//and if the command above fails, the server will end to prevent bugs, or “crash”
if (false)
{
mplay_connect_status();
}
else
{
mplay_end();
};
//note that this code is VERY buggy and im leaving this open source.if you wish to debug it and repost it, im
//glad to do so. also note that certien pieces of code will not appear normally when i put it up, but will show
//normally in the compiler from where i typed it up.
GML is so yucky. *blegh face*
Anyway nice job.
although ur right there, there have been some epic programs made with it, ranging from an emote creator to an icon designer to a windows clone!
note people that only one program or “statement” { & } can run per piece of code.
so that makes it impossible to use all programs at one, instead forces you to break them up in different functions.
Another case of GML yuckyness.
But it never was required… :3