Originally Posted By: jcl
For making a multiplayer game, you need some basic knowledge about PCs, networks, IP addresses and so on.

In short: a PC server has normally an internal and an external IP address. The internal IP address is normally generated by the DHCP server on your local network. For connecting to a server on the network, you need to know either its internal IP address or the server name. The internal IP normally begins with 192.168. Give the name or IP in the session_connect command.

Connecting to a server on the Internet works the same way, but you must give the servers _external_ IP address (which does not begin with 192.168), and must make sure that the connection is not blocked by a firewall. Also, you must set up the server's router to port forwarding to the local server.

The procedure is described in short at the end of the multiplayer workshop. Your log and your command line makes not much sense, and your script does not even compile. Just start with the unchanged tutorial script and only experiment further when this works perfectly.
i think that this work, but i dont sure. this is wath i have in the function main:
Quote:
function main()
{
if (!connection) { // not started with -cl / -sv -cl?

if (!session_connect(app_name," HERE MY IP? from http://www.mijnip.nl ? ")) // no client found on the localhost?
session_open(app_name); // start as server
}

do { wait(1); }
while (dplay_status < 2); // wait until the session is opened or joined

dplay_entrate = 4; // 16 ticks/4 = 4 updates per second
dplay_smooth = 0; // dead reckoning not needed
dplay_localfunction = 2;
level_load ("multiplayer6.wmb");
vec_set(camera.x, vector (-600, 0, 100)); // set a proper camera position

if (connection & CONNECT_SERVER) { // this instance of the game runs on the server
STRING* title = str_create("Server: ");
str_cat(title,server_ip);
video_window(0,0,0,title);
ent_create ("redguard.mdl",vector(100,50,40),player_move); // then create the red guard!
} else { // otherwise, it runs on a connected client
video_window(0,0,0,player_name);
random_seed(0); // allow random player positions
ent_create ("blueguard.mdl",vector(-100+random(200),-50+random(100),40),player_move); // create the blue guard
}
}


Last edited by JohnnyIsDutch; 10/05/10 12:08.