{"author_name":"mohammad","cat":"MiniLD","comments":[{"author_name":"","time":"July 27, 2012 7:27 pm","epoch":1343435220,"text":"GML is so yucky. *blegh face*","spam":"N"},{"author_name":"mohammad","time":"July 27, 2012 9:39 pm","epoch":1343443140,"text":"note people that only one program or &#8220;statement&#8221; { &amp; } can run per piece of code.<br \/>\n so that makes it impossible to use all programs at one, instead forces you to break them up in different functions.","spam":"N"}],"epoch":1343421060,"likes":0,"metadata":{"p_key":"55548","p_author":"mohammad","p_authorkey":"14064","p_urlkey":"91266","p_title":"a piece of multiplayer code for GML","p_cat":"MiniLD","p_event":"LD24","p_time":"1343421060","p_likes":"0","p_comments":"2","p_status":"UPD5","us_key":"14064","us_name":"mohammad","us_username":"mohammad","event_start":"1345766400","event_key":"12","event_name":"LD24"},"text":"<p>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:<\/p>\n <p>\/\/this connection is made for ipx connections<br \/>\n {<br \/>\n mplay_init_ipx();<br \/>\n }<\/p>\n <p>\/\/this is another for TCP\/IP and its a bit more complicated&#8230;<br \/>\n {<br \/>\n mplay_ipaddress();<br \/>\n \/\/to show the ip address is completely OPTIONAL and is NOT recommended,unless its in a separate room.<br \/>\n mplay_init_tcpip(address_here);<br \/>\n }<\/p>\n <p>\/\/heres one for modem connection,as you only need to enter your phone number<br \/>\n \/\/note that the initilization string is left empty,witch is possible<br \/>\n {<br \/>\n mplay_init_modem(0,95155658066)<br \/>\n }<\/p>\n <p>\/\/finnaly, heres one for serial, witch is much more complicated and im only using this for demonstration.<br \/>\n {<br \/>\n mplay_init_serial(2,100,0,3,1)<br \/>\n }<\/p>\n <p>\/\/heres a short command to see wheather is returns successful<br \/>\n mplay_connect_status()<\/p>\n <p>\/\/and if the command above fails, the server will end to prevent bugs, or &#8220;crash&#8221;<br \/>\n if (false)<br \/>\n {<br \/>\n mplay_connect_status();<br \/>\n }<br \/>\n else<br \/>\n {<br \/>\n mplay_end();<br \/>\n };<\/p>\n <p>\/\/note that this code is VERY buggy and im leaving this open source.if you wish to debug it and repost it, im<br \/>\n \/\/glad to do so. also note that certien pieces of code will not appear normally when i put it up, but will show<br \/>\n \/\/normally in the compiler from where i typed it up.<\/p>","time":"July 27th, 2012 3:31 pm","title":"a piece of multiplayer code for GML"}