Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 683 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
LucasJoshua, Baklazhan, Hanky27, firatv, wandaluciaia
19054 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 3 1 2 3
[Anet] I´ve a VServer.. but how to connect? #352188
01/01/11 21:20
01/01/11 21:20
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline OP
Expert
Espér  Offline OP
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Hi there, i´ve a small big problem..

I own a Virtual Server at Hosteurope. Now, with the help of the manual, i created an ANet Testproject:
Click to reveal..

Code:
#include <acknex.h>
#include "anet.h"
#include "default_anet.c"
#include "dr_template.c"
#include "players.c"



#define PRAGMA_PATH "ANetTemplatesProfessional/internetserverlist"

#include "inet_template.c"


FONT* arialer = "Arial#32b";

PANEL* digitaler =
{
	pos_x = 10;
	pos_y = 500;
	flags = SHOW;
	digits(0,0,"Drücke [1] für Server erstellen oder [2] für Client erstellen", arialer, 1, 0);
	digits(0,34,"Drücke [F11] um das Anet Debug anzuzeigen", arialer, 1, 0);
}




//======================================================================================================================================
// ALLGEMEINE VARIABLEN
//======================================================================================================================================
var i;
var max_players = 32;
var players[33];
var glob_port = 2300;


//======================================================================================================================================
// SERVER AUFBAUEN
//======================================================================================================================================
function connected(var sender, STRING* msg) 
{ 
	//... 
	error("Server hergestellt");
} 

function disconnected(var sender, STRING* msg) 
{ 
	//... 
}

function initial_server()
{
	enet_svset_event(EVENT_CONNECTED,"connected"); 
	enet_svset_event(EVENT_DISCONNECTED,"disconnected");
	enet_init_server(2300,4,""); // Port, Spielerzahl, Passwort
}


//======================================================================================================================================
// CLIENT AUFBAUEN
//======================================================================================================================================
function client_connected(var sender, STRING* msg) 
{ 
	//... 
	error("Client hergestellt");
} 

function client_disconnected(var sender, STRING* msg) 
{ 
	//... 
}

function initial_client()
{
	enet_clset_event(EVENT_CONNECTED,"client_connected"); 
	enet_clset_event(EVENT_DISCONNECTED,"client_disconnected");
	enet_init_client("178.77.69.66",2300,"");  // Host, Port, Passwort   - 178.77.69.66
}



//======================================================================================================================================
// SPIELSTART
//======================================================================================================================================
void main()
{
	fps_max = 50;
	video_mode = 8;
	d3d_antialias = 9;
	wait(1);
	enet_init();
	for(i=0;i<max_players;i++) {players[i] = 0;}
	level_load(NULL);
	wait(3);
	
	
	while(1)
	{
		if(key_1 == 1)
		{
			initial_server();
			//			enet_init_server(glob_port,4,""); // Port, Spielerzahl, Passwort
		}
		else if(key_2 == 1)
		{
			initial_client();
			//			enet_init_client("localhost",glob_port,""); // Host, Port, Passwort
		}
		wait(1);
	}
}




1 = Start Server
2 = Start Client



Like you see, i added the IP of my VServer to this Thing. Published, added the Anet keyfile and OpenGL32..something.. and sent it to my friend.


But it doesn´t matter what we are doing.. We can´t get a connection to each other...


Question:
How am i able to connect via server (there´s nearly nothing to it in the manual...)




Ps.: The Anet manual is extremely.. meagerly in infos...


Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: [Anet] I´ve a VServer.. but how to connect? [Re: Espér] #352190
01/01/11 21:48
01/01/11 21:48
Joined: Jun 2008
Posts: 428
Rasch Offline
Senior Member
Rasch  Offline
Senior Member

Joined: Jun 2008
Posts: 428
Have you started the .exe file on your "VirtualServer"? Because if nothing is running on your VirtualServer there´s no server.

Are you allowed to run this application ona VServer on Hosteurope? I´m sure you need to ask them if this is possible and allowed. Maybe they need to forward the ports for you..

More informations please grin

Re: [Anet] I´ve a VServer.. but how to connect? [Re: Rasch] #352191
01/01/11 21:50
01/01/11 21:50
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline OP
Expert
Espér  Offline OP
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
nope.. didn´t started it there...
But i tried.. and it says "no mouse found"

I´ve not really an idea what i need to do.. it´s the first try on MP for me.


Last edited by Espér; 01/01/11 21:51.

Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: [Anet] I´ve a VServer.. but how to connect? [Re: Espér] #352200
01/01/11 22:30
01/01/11 22:30
Joined: Jun 2008
Posts: 428
Rasch Offline
Senior Member
Rasch  Offline
Senior Member

Joined: Jun 2008
Posts: 428
I´m not sure if you can run a 3D Apliaction on a Virtual Server. Better contact Hosteurope and ask them if you can run something like that.

Re: [Anet] I´ve a VServer.. but how to connect? [Re: Rasch] #352202
01/01/11 22:36
01/01/11 22:36
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline OP
Expert
Espér  Offline OP
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
long lives 24/7 support..

BUT.. it´s not working.

Is there a way to create something like a list of Games (servers) from other players.. so the clients don´t need to type in the server ip everytime..?


Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: [Anet] I´ve a VServer.. but how to connect? [Re: Espér] #352206
01/01/11 23:11
01/01/11 23:11
Joined: Jul 2005
Posts: 1,930
Austria
Dark_samurai Offline
Serious User
Dark_samurai  Offline
Serious User

Joined: Jul 2005
Posts: 1,930
Austria
Your problem has nothing to do with ANet. If Gamestudio can't start on your Virtual Server because no mouse is found ANet isn't even loaded wink
You could try to run the engine in console mode. Look into the manual under video_mode (set it to 0). This was also mentioned in the manual under enet_init_server(). Also why you need to do port forwarding is described in the manual (see introduction). Just read through it. And if you are new to MP programming, also give the workshops on the ANet homepage a try.

Quote:
Is there a way to create something like a list of Games (servers) from other players.. so the clients don´t need to type in the server ip everytime..?


Yes. Just open a Webserver (like Apache) on your virtual server and implement a server list database (SQL) that is accessed via HTTP (PHP). You can make use of ANet's built in htttp functions.
ANet also has a ready to use template that does the work for you. But I would advice you to do this in the last step of your game. First try to make the basics working (connecting, smooth playermovement,...). Then try to extend it with more advanced features.


ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)!
get free version
Re: [Anet] I´ve a VServer.. but how to connect? [Re: Dark_samurai] #352207
01/01/11 23:14
01/01/11 23:14
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline OP
Expert
Espér  Offline OP
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
ah.. ok...

Uhmm. actually.. i can connect local.. but still not to my friend (written my ip into enet_init_client)...

i found my ip via > http://www.wieistmeineip.de/ <, but i can´t connect..

Click to reveal..

Code:
#include <acknex.h>
#include "anet.h"
#include "default_anet.c"



FONT* arialer = "Arial#32b";

PANEL* digitaler =
{
	pos_x = 10;
	pos_y = 500;
	flags = SHOW;
	digits(0,0,"Drücke [1] für Server erstellen oder [2] für Client erstellen", arialer, 1, 0);
	digits(0,34,"Drücke [F11] um das Anet Debug anzuzeigen", arialer, 1, 0);
}




//======================================================================================================================================
// ALLGEMEINE VARIABLEN
//======================================================================================================================================
var i;
var max_players = 32;
var players[33];
var glob_port = 2300;


//======================================================================================================================================
// SERVER AUFBAUEN
//======================================================================================================================================
function initial_server()
{
	enet_svset_event(EVENT_CONNECTED,"svevent_connected"); 
	enet_svset_event(EVENT_DISCONNECTED,"svevent_disconnected");
	enet_init_server(glob_port,max_players,""); // Port, Spielerzahl, Passwort
	level_load("test.wmb");
	wait(3);
	enet_set_level("test.wmb"); //Levelfilename an Enet übertragen
}

function svevent_connected(var sender, STRING* msg, var length)
{ 
	//... 
	wait(1);
} 

function svevent_disconnected(var sender, STRING* msg, var length)
{ 
	//... 
	wait(1);
}


//======================================================================================================================================
// CLIENT AUFBAUEN
//======================================================================================================================================
function initial_client()
{
	enet_clset_event(EVENT_CONNECTED,"clevent_connected"); 
	enet_clset_event(EVENT_DISCONNECTED,"clevent_disconnected");
	enet_init_client("localhost",glob_port,"");  // Host/IP, Port, Passwort
	// local - localhost 
	// Server - 178.77.69.66
	// My - 84.57.165.124
}

function clevent_connected(var sender, STRING* msg, var length)
{ 
	//... 
	if(enet_get_connection() == CLIENT_MODE)
	{
		//Serverlevel laden (msg = vom Server gegebener Levelfilename)
		level_load(msg);
		wait(3);
		enet_ent_synchronize(); //synchronisiere entities
	}
} 

function clevent_disconnected(var sender, STRING* msg, var length)
{ 
	//... 
	wait(1);
}


//======================================================================================================================================
// SPIELSTART
//======================================================================================================================================
void main()
{
	fps_max = 500;
	video_mode = 8;
	d3d_antialias = 9;
	wait(1);
	enet_init();
	for(i=0;i<max_players;i++) {players[i] = 0;}
	
	var testings = 0;
	wait(1);
	while(testings == 0)
	{
		if(key_1 == 1)
		{
			initial_server();
			testings = 1;
		}
		else if(key_2 == 1)
		{
			initial_client();
			testings = 1;
		}
		wait(1);
	}
}




any idea why?

Last edited by Espér; 01/02/11 00:21.

Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: [Anet] I´ve a VServer.. but how to connect? [Re: Espér] #352233
01/02/11 12:05
01/02/11 12:05
Joined: Nov 2002
Posts: 913
Berlin, Germany
S
SchokoKeks Offline
User
SchokoKeks  Offline
User
S

Joined: Nov 2002
Posts: 913
Berlin, Germany
Your router is blocking the incomming connection of your friend because of NAT.

You need to forward all traffic from the port you are using (glob_port = 2300) to the computer you have the server running on. For doing this, you need the local LAN-IP of that computer and have access to your router webinterface.

Unfortunately I can't give you a step-to-step guide as nearly every routers menu is different. Try this page, it has instructions for nearly every model:

http://portforward.com/

Re: [Anet] I´ve a VServer.. but how to connect? [Re: SchokoKeks] #352235
01/02/11 12:08
01/02/11 12:08
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline OP
Expert
Espér  Offline OP
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Port 2300 has port forwarding (done this a few weeks ago)
Port check says that the port 2300 is open ^.^

Ps.: On that site.. there´s nothing for an easyBox from Vodafon xD

actual code:
Click to reveal..

Code:
#include <acknex.h>
#include "anet.h"
#include "default_anet.c"



FONT* arialer = "Arial#32b";

PANEL* digitaler =
{
	pos_x = 10;
	pos_y = 500;
	flags = SHOW;
	digits(0,0,"Drücke [1] für Server erstellen oder [2] für Client erstellen", arialer, 1, 0);
	digits(0,34,"Drücke [F11] um das Anet Debug anzuzeigen", arialer, 1, 0);
}




//======================================================================================================================================
// ALLGEMEINE VARIABLEN
//======================================================================================================================================
var i;
var max_players = 32;
var players[33];
var glob_port = 2300;


//======================================================================================================================================
// SERVER AUFBAUEN
//======================================================================================================================================
function svevent_connected(var sender, STRING* msg, var length)
{ 
	//... 
	wait(1);
} 

function svevent_disconnected(var sender, STRING* msg, var length)
{ 
	//... 
	wait(1);
}

function start_server()
{
	enet_svset_event(EVENT_CONNECTED,"svevent_connected"); 
	enet_svset_event(EVENT_DISCONNECTED,"svevent_disconnected");
	enet_init_server(glob_port,max_players,""); // Port, Spielerzahl, Passwort
	level_load("test.wmb");
	wait(3);
	enet_set_level("test.wmb"); //Levelfilename an Enet übertragen
}


//======================================================================================================================================
// CLIENT AUFBAUEN
//======================================================================================================================================
function clevent_connected(var sender, STRING* msg, var length)
{ 
	//... 
	if(enet_get_connection() == CLIENT_MODE)
	{
		//Serverlevel laden (msg = vom Server gegebener Levelfilename)
		level_load(msg);
		wait(3);
		enet_ent_synchronize(); //synchronisiere entities
	}
} 

function clevent_disconnected(var sender, STRING* msg, var length)
{ 
	//... 
	wait(1);
}

function start_client()
{
	enet_clset_event(EVENT_CONNECTED,"clevent_connected"); 
	enet_clset_event(EVENT_DISCONNECTED,"clevent_disconnected");
	enet_init_client("84.57.165.124",glob_port,"");  // Host/IP, Port, Passwort
	// local - localhost 
	// Server - 178.77.69.66
	// My - 84.57.165.124
}


//======================================================================================================================================
// SPIELSTART
//======================================================================================================================================
void main()
{
	fps_max = 500;
	video_mode = 8;
	d3d_antialias = 9;
	wait(1);
	enet_init();
	for(i=0;i<max_players;i++) {players[i] = 0;}
	
	var testings = 0;
	wait(1);
	while(testings == 0)
	{
		if(key_1 == 1)
		{
			start_server();
			testings = 1;
		}
		else if(key_2 == 1)
		{
			start_client();
			testings = 1;
		}
		wait(1);
	}
}




Last edited by Espér; 01/02/11 12:51.

Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: [Anet] I´ve a VServer.. but how to connect? [Re: Espér] #352237
01/02/11 13:15
01/02/11 13:15
Joined: Jul 2005
Posts: 1,930
Austria
Dark_samurai Offline
Serious User
Dark_samurai  Offline
Serious User

Joined: Jul 2005
Posts: 1,930
Austria
If you can connect local and you have the correct internet ip used for the connection than the problem is not ANet related. It's a networking problem caused by your router and/or firewall.

What protocol is forwarded? UDP or TCP? You should allow port 2300 over UDP.

Also try to turn off your firewall (on the client and the server).


ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)!
get free version
Page 1 of 3 1 2 3

Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1