im making a fps game that will be eventually turned into an mmofps.
My server works and shows that players are connected but you cant see them. What code do i have to use to display other players online.
Right now to connect to the server all i have is Netsetport(23) and netconnect(127.0.0.1)
The server im using i found off of another post
here is the code for the server
// Dark GDK - The Game Creators - www.thegamecreators.com
// Simple Telnet style server for MultiSync.
//
//
//
//
#include <DarkGDK.h>
#include "multisync.h"
#define MAX_CONNECTED 16 // Begin with modest goals.
char MultiSyncServerName[] = "Simple Multisync Server";
char serverip[] = "127.0.0.1";
char tempstr[256];
bool connected = false;
int connection = 0;
int connections = 0;
int playerleft = 0;
void DarkGDK(void)
{
dbSyncOn();
dbSyncRate(60);
dbPositionCamera(10, 10, -20);
NetSetPort(23);
if (!NetHost(MAX_CONNECTED))
{
NetGetError(tempstr, 256);
MessageBox(NULL, tempstr, MultiSyncServerName, MB_ICONEXCLAMATION);
}
else MessageBox(NULL, "Ready for connections.",
MultiSyncServerName, MB_ICONINFORMATION);
while (LoopGDK())
{
dbClear(0, 0, 0);
dbText(0, 0, MultiSyncServerName);
connection = NetPlayerJoined();
if (connection != 0)
{
NetPutString(MultiSyncServerName);
NetSend(connection);
connections++;
}
playerleft = NetPlayerLeft();
if (playerleft)
{
connections--;
}
//
sprintf(tempstr, "%i connected.", connections);
dbText(0, 32, tempstr);
dbSync();
}
//
return;
}
The South Will Rise Again Software Development Comp.