Multiple World Support
#1
This is a feature I really want to have in MCServer.

Is this something you've put any effort or though into yet, FalseTruth?

Do you have any pointers on getting started if not? I've got some basic ideas.
Basically, use your teleport function to move between worlds which use separately named directories.
Reply
Thanks given by:
#2
I haven't added any multiworld support to MCServer but I've thought about how to do it.

I really don't think it's hard to do. In the GetWorld function add the world name as a parameter so you can grab any world you want. Each world should have a separate thread and should pretty much be isolated from the other worlds. When a player wants to go to a different world, you simply remove the player from one world and add it to the other (it requires some special treatment though, special packets need to be sent etc.)
Reply
Thanks given by:
#3
I think having a way to broadcast to either world or server is a good idea.

Code:
// TODO - Need to modify this or something, so it broadcasts to all worlds? And move this to cWorld?
void cServer::Broadcast( const cPacket & a_Packet, cClientHandle* a_Exclude /* = 0 */ )
{
    for( ClientList::iterator itr = m_pState->Clients.begin(); itr != m_pState->Clients.end(); ++itr)
    {
        if( *itr == a_Exclude || !(*itr)->IsLoggedIn() ) continue;
        (*itr)->Send( a_Packet );
    }
}


I think keeping this here and adding one for per world broadcasting is a good idea
Reply
Thanks given by:




Users browsing this thread: 2 Guest(s)