more about mutliplayer
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);
}