Home | Rules and Guide | Sign In/Create Account | Write a Post | Reddit | #ludumdare on irc.afternet.org (Info)

Thanks for making Ludum Dare 26 AWESOME! See you in August!

Ludum Dare 26 — April 26-29th, 2013
[ Results: Top 100 Compo, Jam | Top 25 Categories | View My Entry ]
[ View All 2346 Games (Compo Only, Jam Only) | Warmup ]

[ 10 Sec Video Compilation (x3) | 260 Game Video Compilation | IndieCade Deal | Ludum Deals (Unity Deal Ends Soon!) ]


more about mutliplayer

Posted by
July 27th, 2012 10:32 pm

im still working on some multiplayer games, and heres some more code for you to see (if you dident already see my previous code…):

//this piece of code is more or less about creating sessions. note that complilation errors will occur if you
//just copy and paste it onto here. this is because only one program or “{ & }” can be put at a time.
//and as such, i will try to limit my programs as minimal as possible, still keeping a good deal
//of debuged funtions as possible.

//to start a session, or what would be a server, you would do this:
{
mplay_session_create(name,player_amount,playername);
mplay_session_name(a_number);
}
//to find the amount of sessions avaible, and join, you would do the following:
{
mplay_session_find();
mplay_session_join(the_number,playername);
}
//note that the number may be 0. (the first session, IF avaible)
//to check the status of the session,along with witch connection your using, you wold do the following:
{
mplay_session_status();
mplay_connect_status();
}
//to easily end the session,along with a message, all you must do is this:
{
mplay_session_end();
show_message(either connection lost or the game session has ended.);
}
//to display it as a bug,do the following
{
mplay_session_end();
show_error(the game has ended and/or crashed.,abort);
}



																

Leave a Reply

You must be logged in to post a comment.


All posts, images, and comments are owned by their creators.

[cache: storing page]