{"author_name":"mohammad","cat":"MiniLD","comments":[],"epoch":1343446320,"likes":0,"metadata":{"p_key":"55547","p_author":"mohammad","p_authorkey":"14064","p_urlkey":"91265","p_title":"more about mutliplayer","p_cat":"MiniLD","p_event":"LD24","p_time":"1343446320","p_likes":"0","p_comments":"0","p_status":"UPD5","us_key":"14064","us_name":"mohammad","us_username":"mohammad","event_start":"1345766400","event_key":"12","event_name":"LD24"},"text":"<p>im still working on some multiplayer games, and heres some more code for you to see (if you dident already see my previous code&#8230;):<\/p>\n <p>\/\/this piece of code is more or less about creating sessions. note that complilation errors will occur if you<br \/>\n \/\/just copy and paste it onto here. this is because only one program or &#8220;{ &amp; }&#8221; can be put at a time.<br \/>\n \/\/and as such, i will try to limit my programs as minimal as possible, still keeping a good deal<br \/>\n \/\/of debuged funtions as possible.<\/p>\n <p>\/\/to start a session, or what would be a server, you would do this:<br \/>\n {<br \/>\n mplay_session_create(name,player_amount,playername);<br \/>\n mplay_session_name(a_number);<br \/>\n }<br \/>\n \/\/to find the amount of sessions avaible, and join, you would do the following:<br \/>\n {<br \/>\n mplay_session_find();<br \/>\n mplay_session_join(the_number,playername);<br \/>\n }<br \/>\n \/\/note that the number may be 0. (the first session, IF avaible)<br \/>\n \/\/to check the status of the session,along with witch connection your using, you wold do the following:<br \/>\n {<br \/>\n mplay_session_status();<br \/>\n mplay_connect_status();<br \/>\n }<br \/>\n \/\/to easily end the session,along with a message, all you must do is this:<br \/>\n {<br \/>\n mplay_session_end();<br \/>\n show_message(either connection lost or the game session has ended.);<br \/>\n }<br \/>\n \/\/to display it as a bug,do the following<br \/>\n {<br \/>\n mplay_session_end();<br \/>\n show_error(the game has ended and\/or crashed.,abort);<br \/>\n }<\/p>\n <pre><\/pre>","time":"July 27th, 2012 10:32 pm","title":"more about mutliplayer"}