ANet - The ultimate networkplugin for GS [Demo]

Posted By: Dark_samurai

ANet - The ultimate networkplugin for GS [Demo] - 11/11/08 18:25

Hi!
Finaly it's here: The first ANet demo version. It comes with an german AND english manual. It's possible to use it with A6/A7 and Lite-C/C-Script.

You can get a full working demo here (limited to 4 connections only and you aren't allowed to use it in any commercial projects): ANet Demo

Please note that this is not the final version. This is much more a beta version! If you find Bugs, please report them in ThirdPartyTools with [ANet] at the beginning or write me a PM. If you find any mistakes in the manual (serious or not) post them here.

Homepage and Tutorial(s) comming soon!

Hope you like it!
Have fun wink
(Please tell me your critique!)


PS: Old thread: http://www.coniserver.net/ubb7/ubbthreads.php?ubb=showflat&Number=232436#Post232436
Posted By: Sajeth

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/11/08 18:30

Hahaha, finally!
Thanks mate smile
Posted By: croman

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/11/08 18:31

looking forward to try it. thanx


EDIT::

Could you please post what version types of your plugin will be available for purchasing and what will be the features of each one of them?

btw, plugin looks very clean and easy to use. great work smile
Posted By: Quad

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/11/08 19:06

at last.

im trying now!
Posted By: Sajeth

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/11/08 19:18

Da ich mir nicht sicher bin, ob die Nachrichten hier im Board ankommen, schreibe ichs nochmal direkt hier rein:

Könnte dir kostenlos Webspace (+Top-Level-Domain natürlich) für dein Projekt anbieten - ich hab nen ziemlich grossen Server zur Verfügung (http://www.hosteurope.de/produkt/Virtual-Server-Linux-MAX) und könnte dir volle Rechte für FTP und SQL geben.
Auf Wunsch stehe ich dir auch bei der Programmierung der Webpräsenz zur Seite smile
Grüße, Sajeth wink
Posted By: croman

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/11/08 19:41

Dark_Samurai, i already have a question and a problem.

Click to reveal..

//------------------------------------------------------------------------------------------
//
//
//------------------------------------------------------------------------------------------
void start_clientserver()
{
//Client-Server Modus:
enet_init_server(2300,4,_str("")); //Initializes the server
enet_init_client(_str("127.0.0.1"),2300,_str("")); //Initializes a client
//which connects over the localhost with the server
while(enet_get_connection() == 3) //as long as the client-server mode consists
{
enet_server_poll(); //...needs to be called every frame!
enet_client_poll();
wait(1);
}
}




//------------------------------------------------------------------------------------------
//
//
//------------------------------------------------------------------------------------------
function main()
{
enet_init(); //ENet is initialized

randomize();
fps_max = 60;
video_mode = 8;
video_depth = 32;
video_screen = 2;
time_smooth = 0.9;
fog_color = 1;
camera.fog_end = 75000;

start_clientserver();
wait(-0.5);

level_load("test.wmb");
//enet_set_level("test.wmb");
wait(5);
enet_ent_synchronize();
wait(-0.5);

camera.x = camera.y = camera.tilt = wheel_i = vehicle_i = 0;

on_e = reset_vehicle_manually;
on_f1 = main;
ph_setgravity(vector(0, 0, -320 * 1.4));
ph_setcorrections(25000, 0.05);


camera.x = -500;
camera.y = -500;
camera.z = 150;
camera.pan += 45;
camera.tilt -=15;


shadow_stencil = 3;
//vector (random(200), random(200), 50)
player = enet_ent_create(_str("aut_f360.mdl"), nullvector, vehicle);

wait(-0.5);


}


after running the code it works fine until it reaches the enet_ent_create function. if i comment that out it works okay. why it wont create an entity?



SOLVED!!! But you must update manual cause this is major error. instead of: enet_ent_create(_str("aut_f360.mdl"), nullvector, vehicle); it goes: enet_ent_create(_str("aut_f360.mdl"), nullvector, _str("vehicle"));
you didnt mention in manual that it needs that _str part for action string.




Posted By: Quad

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/11/08 19:56

in fact you can handle that _str()'s inside the plugin. Usage is same in SDK afaik. (but i guess it has something to do with c-script compatilbility)
Posted By: Quad

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/11/08 21:48

im sure im doing it wrong but i cant get it to work:

code:

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

void start_server();
void start_client(); 
STRING* cl_sv="#10";
TEXT* some_txt = {
	strings = 2;
	string = "press c for client or s for server and then press enter!", cl_sv;
	flags |= VISIBLE;
	pos_x = 10;
	pos_y = 10;	
}
var some_number = 0;
PANEL* some_panel = {
	pos_x = 10;
	pos_y = 40;
	digits(0,0,"Client Count: %.0f",*,1,some_number);	
}


void main(){
	enet_init();
	inkey(cl_sv);
	
	if(str_cmp(cl_sv,"s")){
		start_server();
		str_cpy((some_txt.pstring)[0],"Server");
	}
	else if(str_cmp(cl_sv,"c")){
		start_client();
		str_cpy((some_txt.pstring)[0],"Client Mode");
	}
	else{
		printf("UH,oh... Decide if you are a Client or a Server, buddy.");
	}
	level_load("");
}



void start_server() 
{ 
	enet_init_server(2300,4,_str("")); //initializes the server with port 2300, 
	set(some_panel,VISIBLE);
	str_cpy((some_txt.pstring)[1],"Running in server mode");
	enet_set_event(1,_str("sv_client_connected"));
	while(enet_get_connection() == 1) 
	{ 
		enet_server_poll(); //...needs to be called every frame! 
		some_number = enet_connected_clients();
		wait(1); 
	} 
} 

void start_client() 
{ 
	int nameset = 0;
	STRING* name = player_name;
	enet_init_client(_str("127.0.0.1"),2300,_str("")); //Initializes a client 
	wait(-1);
	while(enet_get_connection() == 2) //as long as the client-server mode consists 
	{ 
		enet_client_poll(); 
		while(enet_get_clientid()==-1) wait(1);
		str_cpy((some_txt.pstring)[1],"Connected to server");
		wait(1); 
		if(!nameset) {enet_set_playername(name); nameset =1;}
	} 
} 


void sv_client_connected(var sender, STRING* msg) 
{ 
	printf("A new client connected!"); 
} 

Posted By: Quad

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/11/08 23:34

writing localhost and internal ip (192.168.2.1) instead of 127.0.0.1 worked

sorry for the post-combo.
Posted By: Dark_samurai

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/12/08 13:13

@Quadraxas: Your problem is the poll loop. The poll function MUST be called every frame because this function handles all internal stuff. If you put this into the poll loop: "while(enet_get_clientid()==-1) wait(1);" It will only call the poll function once. After one call the connection can't be asstablished! => there won't be a connection!
To solve this problem put "while(enet_get_clientid()==-1) wait(1);" into another function.

localhost and 127.0.0.1 should work the same way... Please, try changing the problem mentioned above and try it again with 127.0.0.1. Post here if it still doesn't work!

@cerberi_croman: Thanks, I will add this to the manual!

@Sajeth: Thanks for this great offer! smile I will contact you after I finished the homepage!
Posted By: croman

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/12/08 13:57

Hey,
I have a question for you. When i start serverclient mode it works just fine and then when i start the other main.exe file with client mode it crashes. Can you please take a look into a code?

Code:

//------------------------------------------------------------------------------------------
//
//
//------------------------------------------------------------------------------------------
void start_server() 
{ 
	//Server modus
	enet_init_server(2300,4,_str("")); //initializes the server with port 2300, 
	//with max. 4 Clients and no password 
	while(enet_get_connection() == 1) 
	{ 	
		enet_server_poll(); //...needs to be called every frame! 
		wait(1); 
	} 
} 




STRING* svip = "#12";
//------------------------------------------------------------------------------------------
//
//
//------------------------------------------------------------------------------------------
void start_client()
{
	//Client modus
	enet_init_client(_str("127.0.0.1"),2300,_str("")); //Initializes a client 
	//which connects over the localhost with the server 
	while(enet_get_connection() == 2) //as long as the client-server mode consists 
	{ 
		enet_client_poll(); 
		wait(1); 
	} 
}




//------------------------------------------------------------------------------------------
//
//
//------------------------------------------------------------------------------------------
void start_clientserver() 
{ 
	//Client-Server Modus: 
	enet_init_server(2300,4,_str("")); //Initializes the server 
	enet_init_client(_str("127.0.0.1"),2300,_str("")); //Initializes a client 
	//which connects over the localhost with the server 
	while(enet_get_connection() == 3) //as long as the client-server mode consists 
	{
		enet_server_poll(); //...needs to be called every frame! 
		enet_client_poll(); 
		wait(1); 
	} 
} 




var filehandle;
STRING* svcl = "#2";

//------------------------------------------------------------------------------------------
//
//
//------------------------------------------------------------------------------------------
function main() 
{
	enet_init(); //ENet is initialized 
	
	randomize();
	fps_max = 60; 
	video_mode = 8;
	video_depth = 32;
	video_screen = 2;
	time_smooth = 0.9;
	fog_color = 1;
	vec_set(screen_color,vector(150,0,0));
	camera.fog_end = 75000;
	
	
	filehandle = file_open_read("svcl.txt"); 
	file_str_read(filehandle, svcl); 
	file_close(filehandle);
	
	if(str_cmp(svcl, "3") == 1){start_clientserver();}
	if(str_cmp(svcl, "2") == 1){start_client();}
	if(str_cmp(svcl, "1") == 1){start_server();}
	
	
	wait(-0.5);
	
	if(enet_get_connection() == 0){
		sys_exit(NULL);
	}
	
	wait(-0.5);
	
	level_load("test.wmb");
	//enet_set_level("test.wmb"); 
	wait(5);
	enet_ent_synchronize(); 
	wait(-0.5);
	
	camera.x = camera.y = camera.tilt = wheel_i = vehicle_i = 0; 
	
	on_e = reset_vehicle_manually;
	on_f1 = main;
	ph_setgravity(vector(0, 0, -320 * 1.4));
	ph_setcorrections(25000, 0.05);
	
	
	camera.x = -500;
	camera.y = -500;
	camera.z = 150;
	camera.pan += 45;
	camera.tilt -=15;
	


   player = enet_ent_create(_str("aut_f360.mdl"), vector (random(200), random(200), 50), _str("vehicle")); 
	wait(1);
	enet_ent_create (_str("rue_360_d.mdl"), vector (player.x + 17, player.y + 21, player.z - 4.5), _str("tire")); // FR
	enet_ent_create (_str("rue_360_i.mdl"), vector (player.x - 17, player.y + 21, player.z - 4.5), _str("tire")); // FL
	enet_ent_create (_str("rue_360_i.mdl"), vector (player.x - 17, player.y - 33, player.z - 4.5), _str("tire")); // RL
	enet_ent_create (_str("rue_360_d.mdl"), vector (player.x + 17, player.y - 33, player.z - 4.5), _str("tire")); // RR
	
}

Posted By: Dark_samurai

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/12/08 14:12

Hmm... I think the problem is how you call enet_ent_synchronize(); This function should be called in the "Connected with Server" event (look at enet_set_event) and should only be called as client!
And you shouldn't create an entity until the synchronizing is finished (= after "Synchronizing complete" is called).

Correct synchronizing should be done like this:

Code:
function connected_with_server_event(var sender, STRING* msg)
{
enet_ent_synchronize();
}

function synchronizing_complete(var sender, STRING* msg)
{
//now you can create your Entities
}


PS: Don't forget to register your functions with enet_set_event()!


Things like correct synchronizing, level changing,... will be explained in the first tutorial. It's about creating an application where you can select a player, move around with it, shows the playername above the head of the player, simple chatting, correct synchronizing, level changing, kicking a client, correct disconnecting. So I think that this will clear up all necessary things which are important for creating a MP-Game.
I think the tutorial will come this weekend (available in german and english)!
Posted By: Quad

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/12/08 18:10

event 3(connected with server) is not triggered.

1(client connected) on server is triggered, but 3 on client is not.

4-> disconnected from server works too.
Posted By: Dark_samurai

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/12/08 18:33

Can you send my your current code with a PM, please?
I don't want to mess up this thread...

There must be something wrong in your code, because these events are working for sure.
Posted By: Quad

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/12/08 18:49

ok ill send, let me clean up the code a bit
Posted By: Carlos3DGS

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/12/08 18:57

Congratulations on completing your demo!
Im currently programming pathfinding (grrr), but when I finish I will try your plugin.
Looking forward to test it out!
Great idea for the tutorial also!
Posted By: croman

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/12/08 19:11

okay it works now, thanks. i'm looking forward to your tutorials this weekend.

and what about version types(free, standard...) and their features and prices? can you post that here?
Posted By: Puppeteer

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/12/08 19:23

Hm nice
but it is not yet ultimate since the send_unriliable is still missing :-P
Posted By: Dark_samurai

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/12/08 19:36

Quote:
but it is not yet ultimate since the send_unriliable is still missing :-P


Look under enet_set_unreliable() in general functions (=Verwaltungsfunktionen) wink
=> It is ultimate ^^

Edit: Sorry forgot to answer your question:

Quote:
and what about version types(free, standard...) and their features and prices? can you post that here?


The free/demo version is what you have now. Standard will be the same (same features) but connection limit will be 32. Pro has unlimited connections, you can use udp function (broadcast without a connection) and http function (both needed for creating a serverlist-system), extended playername system with skills and strings for each player which are automatically synchronized (can be used for a statistic list like in cs when you press [tab]), encryption, compression,...

These features are planned, I can't prommise that all these features will be implented!

I still don't know how expensive the versions will be.

@all: Thanks for these nice words!
Posted By: WretchedSid

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/12/08 20:49

Ok, hab da ein Problem und da ich das auf deutsch besser erklären kann, schreib ich jetzt einfach deutsch. Sry schonmal dafür.

Also ich starte einen Server indem ich die funktion start_server aufrufe:
Code:
void start_server() 
{ 
	enet_init_server(2300,4,_str("")); 
	while(enet_get_connection() == 1) 
	{ 
		enet_server_poll();
		wait(1); 
	} 
} 


und wenn ich danach den Status über
Code:
if(enet_get_connection() == 0) {error("Keine Verbindung!");} 
	if(enet_get_connection() == 1) {error("Server!");} 
	if(enet_get_connection() == 2) {error("Client!");} 
	if(enet_get_connection() == 3) {error("Client-Server!");} 

überprüfe kommt immer "Keine Verbindung" also irgendwas stimmt da nicht. enet_init(); ruf ich natürlich davor auf. So sieht meine main funktion aus:
Code:
void main()
{ 
	enet_init();
        start_server();
        wait(-1);
        check_status();
}

Posted By: Puppeteer

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/12/08 21:21

Originally Posted By: Dark_samurai
Quote:
but it is not yet ultimate since the send_unriliable is still missing :-P


Look under enet_set_unreliable() in general functions (=Verwaltungsfunktionen) wink
=> It is ultimate ^^

Ooow I beg for your mercy. My Lord *bowing towards dark samurai*
Posted By: Quad

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/12/08 21:26

how can i trigger a user-set event?

and it d be cool if you can add recieve_string, recieve_var etc. events.
Posted By: Dark_samurai

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/12/08 21:27

Es ist besser wenn du in start_server(), enet_get_connection() != 0 in die Schleifenbedingung schreibst.
Bist du dir sicher das genau dieser Code nicht funktioniert? Der ist nämlich 100%ig korrekt und ein Pluginbug ist auch ausschließbar (da ich die Funktionen bereits in mehreren Projekten erfolgreich testen konnte).

Solltest du weiterhin Probleme haben, schicke mir bitte eine PM mit dem vollständigen Sourcecode (also alles was drinnen steht damit ich andere Fehlerquellen ausschließen kann).
Posted By: Dark_samurai

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/12/08 21:30

Quote:
and it d be cool if you can add recieve_string, recieve_var etc. events.


I already thought about this. Maybe I will add this in further updates!

Quote:
how can i trigger a user-set event


Use enet_clsend_event() or enet_svsend_event() (they are under send functions).

Quote:
Ooow I beg for your mercy. My Lord *bowing towards dark samurai*


lol
Posted By: WretchedSid

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/12/08 21:38

Originally Posted By: Dark_samurai
Solltest du weiterhin Probleme haben, schicke mir bitte eine PM mit dem vollständigen Sourcecode (also alles was drinnen steht damit ich andere Fehlerquellen ausschließen kann).


Hmmm komisch, hab das ganze nochmal ausprobiert und auf einmal geht alles... Funktioniert jetzt übrigens durchgängig, obwohl ich nix am Code verändert habe...
Naja, danke für deine Hilfe und sorry das ich jetzt falschen Alarm gegeben hab.
Posted By: Quad

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/12/08 21:43

Quote:
use enet_clsend_event() or enet_svsend_event() (they are under send functions).


i cant find them in manual:


Posted By: Dark_samurai

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/12/08 21:53

Quote:
Hmmm komisch, hab das ganze nochmal ausprobiert und auf einmal geht alles... Funktioniert jetzt übrigens durchgängig, obwohl ich nix am Code verändert habe...
Naja, danke für deine Hilfe und sorry das ich jetzt falschen Alarm gegeben hab


...das kenn ich ^^

@Quadraxas: They are bove under enet_send_event.
Posted By: Quad

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/12/08 22:10

ah ok sorry.
Posted By: Quad

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/13/08 00:12

didnt tested all functions (infact only used events and send_event thingy on this one)


it's really ultimate. And easy to use.
Posted By: DC9

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/13/08 02:42

Posted in Third Party Tools:

http://www.coniserver.net/ubb7/ubbthreads.php?ubb=showflat&Number=236253#Post236253
Posted By: WretchedSid

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/13/08 13:51

bin ich zu doof es zu finden, oder gibt es gar kein Event das man setzen kann wenn etwas per enet_send angekommen ist?
Posted By: Dark_samurai

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/13/08 15:25

Nein gibt es nicht. Wenn du willst, dass eine Funktion ausgeführt wird benutze einfach enet_clsend_event() und sende deine Daten über den msg Parameter.

z.B. senden einer Variable mit enet_clsend_event():
Code:
...
str_for_var(test_string,variable);
enet_clsend_event(11,test_string);
...

function event_func(var sender, STRING* msg)
{
   var value;
   value = str_to_num(msg);
   ...
}

Posted By: WretchedSid

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/13/08 18:03

Ok, hab jetzt ziemlich lange mit dem Plugin rumgespielt und muss sagen, es ist fantastisch. Wirklich 1A Arbeit von dir smile Kannst mich aufjedenfall schonmal auf die Liste der Käufer eintragen.

Wobei, dazu hab ich auch gleich ne Frage, mich würd eher die Standard Verion interessieren. Gibts auch ne Art erweiterte Standard Verion in der man alle Features der Standard Version hat, aber auch unendlich Spieler connecten können? Der Rest der Pro features interessiert mich nämlich nicht, aber ich hätte gerne mehr als 32 User. Bin auch bereit ein bisschen mehr zu zahlen (nur halt net soviel wie bei der Pro Version ^^)
Posted By: Dark_samurai

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/13/08 20:17

Thanks!

Quote:
Wobei, dazu hab ich auch gleich ne Frage, mich würd eher die Standard Verion interessieren. Gibts auch ne Art erweiterte Standard Verion in der man alle Features der Standard Version hat, aber auch unendlich Spieler connecten können? Der Rest der Pro features interessiert mich nämlich nicht, aber ich hätte gerne mehr als 32 User. Bin auch bereit ein bisschen mehr zu zahlen (nur halt net soviel wie bei der Pro Version ^^


Da wird sich sicher eine Lösung finden lassen! wink

EDIT: Wobei man sagen muss, dass du doch sicher eine Server-Liste machen willst und nicht, dass jeder Spieler die IP des Servers eintippen muss. Dann wirst du UDP bzw. HTTP benötigen. Bei kleinen Spielen (~4 Spieler) ist das mit dem IP eintippen vl. noch OK aber bereits bei etwas größeren Spielen wird das sicher lästig...
Posted By: PadMalcom

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/14/08 06:11

Hi, I tested your component all night but I didn't get "enet_clsend_event()" to work...

I'm sure that I registered the function correctly using enet_set_event. No matter what function I pass, the engine crashes (This windows bug reporting crash).

Funnily, the event of connecting works...
Posted By: Dark_samurai

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/14/08 07:47

Can you send me your code (PM)?

Are you sure that you use enet_clsend_event() only with a Client? If you call it with a server, you will produce a crash!
Posted By: Quad

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/14/08 10:47

Originally Posted By: PadMalcom
Hi, I tested your component all night but I didn't get "enet_clsend_event()" to work...

I'm sure that I registered the function correctly using enet_set_event. No matter what function I pass, the engine crashes (This windows bug reporting crash).

Funnily, the event of connecting works...


i get custom events to work, i tried all , only event i cant get to work is 3(client connected with server), no crash, it just dont work.

i cant post my test app if you want.
Posted By: WretchedSid

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/14/08 14:00

Originally Posted By: Dark_samurai
EDIT: Wobei man sagen muss, dass du doch sicher eine Server-Liste machen willst und nicht, dass jeder Spieler die IP des Servers eintippen muss. Dann wirst du UDP bzw. HTTP benötigen. Bei kleinen Spielen (~4 Spieler) ist das mit dem IP eintippen vl. noch OK aber bereits bei etwas größeren Spielen wird das sicher lästig...


Ne, gerade das ja nicht. Ist schon mehr als gut, dass die Clients die IP des Servers wissen müssen. Ein geöffnetes MP Spiel soll nämlich nicht für jeden ersichtlich bzw. zugänglich sein. Allerdings bräuchte ich mehr als 32 mögliche Verbindungen, 128 Verbindung dürften schon reichen.
Posted By: Dark_samurai

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/14/08 14:14

Quote:
Ne, gerade das ja nicht. Ist schon mehr als gut, dass die Clients die IP des Servers wissen müssen. Ein geöffnetes MP Spiel soll nämlich nicht für jeden ersichtlich bzw. zugänglich sein. Allerdings bräuchte ich mehr als 32 mögliche Verbindungen, 128 Verbindung dürften schon reichen.


Du könntest sie mit einem Passwort schützen. Aber egal, am besten du schreibst mich nochmal an, sobald das Plugin erhältlich ist, dann wird sich sicher eine Lösung finden lassen!


@all: If you have any problems with the plugin open a new thread in third party tools starting with [ANet] or write me a PM, please!!
Posted By: Dark_samurai

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/15/08 15:13

It seems like I can't receive PMs since ~2 weeks. So don't send me a PM and send an email instead (peter[.]soxberger[@]gmx[.]net).

I will release a new version of ANet today or tomorrow. It will contain a new manual (less mistakes and some changes) and a changed enet_get_ping() function because it don't works properly in the actual version.
Posted By: Sajeth

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/15/08 15:37

Wäre es möglich, ein fertiges kleines Projekt zur Verfügung gestellt zu kriegen?
Würde das Einarbeiten sehr viel einfacher und schneller machen wink
Posted By: Cowabanga

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/15/08 15:38

Nice Job.
Posted By: Dark_samurai

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/15/08 15:40

Quote:
Wäre es möglich, ein fertiges kleines Projekt zur Verfügung gestellt zu kriegen?
Würde das Einarbeiten sehr viel einfacher und schneller machen


Das Tutorial mit dem kompilierten Beispiel wird noch dieses Wochenende kommen (zumindest auf Deutsch, die Englische Version kommt vielleicht etwas später).
Außerdem werde ich noch min. ein weiteres Beispielskript (ohne Tut) veröffentlichen. Wahrscheinlich das alt bekannte PongMP.
Posted By: croman

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/16/08 17:16

is your new ANet version going to have tutorials? when do you plan to upload it?
Posted By: Sajeth

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/16/08 17:46

Originally Posted By: Dark_samurai
Das Tutorial mit dem kompilierten Beispiel wird noch dieses Wochenende kommen (zumindest auf Deutsch, die Englische Version kommt vielleicht etwas später).
Außerdem werde ich noch min. ein weiteres Beispielskript (ohne Tut) veröffentlichen. Wahrscheinlich das alt bekannte PongMP.

Originally Posted By: Dark_samurai
A tutorial with a compiled example will be released this weekend (german only, english version will follow a little later).
Also I'm going to release at least one additional sample script (without tutorial). Propably the well-known PongMP.

Posted By: croman

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/16/08 17:50

okay, thnx Sajeth
Posted By: Dark_samurai

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/16/08 20:25

The new Version (0.9.51.1) is now online: get it here

It contains several fixes in the manual and the enet_get_ping() function was changed (still not perfect...).
Thanks to Gerry Gerrow (DC9) for his mistake list!


The german tutorial is 90% now. I hope that I can finish it today!

Edit: Sorry it will come with a little delay because I have some troubles with translating the code into C-Script.
Posted By: Sajeth

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/17/08 16:17

Could you upload the lite-c version? smile
Please? smile
Posted By: croman

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/17/08 17:04

it is both lite-c and c-script version. one plugin for both of them but you have different header files.
Posted By: croman

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/18/08 17:53

Do you have any estimate when are you going to finish that tutorial/sample? I'm quite anxious to get it smile
Posted By: Dark_samurai

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/18/08 19:06

The german version is finished now. Because the size is realy big, I made 2 versions. One that also has compiled versions of the examples and one without.

EDIT: Unactual links! Look into the latest posts to get the new versions!

small version (~10 MB)
big version (~20 MB)

Even If you don't understand german, you can make use of this because the whole code is commented in english wink The english vesion of the tutorial will come soon (started today with translating)!

Please report any mistakes/bugs you find.
Posted By: croman

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/18/08 19:11

you're the man smile thnx
Posted By: DC9

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/19/08 01:39

[Time Offered] If you want someone to proof your English tut, let me know.
Posted By: Dark_samurai

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/19/08 21:00

Thanks for your offer!
Sent you a mail!
Posted By: Dark_samurai

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/20/08 21:15

The whole tutorial is ready now (also in english). Here are the links to all available versions:

EDIT: Unactual links! Look into the latest posts to get the new versions!
german small (~10 MB)
german big (~20 MB)
english small (~10 MB)
english big (~20 MB)

Please tell me if you find any bugs/mistakes!



Posted By: DC9

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/21/08 03:33

Dark_samurai, I sent you a couple of updates via email.

cheers,
Posted By: Sajeth

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/21/08 14:31

*removed the profanity, but you know what I was talking about, right?*
This piece of epicness is the BEST Acknex Multiplayer Plugin EVER created.
Posted By: jigalypuff

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/21/08 15:25

! C:\Documents and Settings\Compaq_Owner\My Documents\Downloads\simple_3dchat_tut_eng_comp.rar: Unexpected end of archive

the large english is corrupted, sajeth would you watch the profanity please.
Posted By: Dark_samurai

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/21/08 15:46

@DC9: Thanks for your time! I will upload the updated version soon.

@Sajeth: Thanks!

@jigalypuff: Thanks for the bugreport. I've uploaded a new version.
If it still doesn't work, do you use winrar for unpacking?


The homepage get's better and better. I try to finish it as soon as possible (no date this time because I always miss them :D).
Posted By: jigalypuff

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/21/08 16:29

! C:\Documents and Settings\Compaq_Owner\My Documents\Downloads\simple_3dchat_tut_eng_comp.rar: CRC failed in simple_3dchat\C-Script\compiled\cbabe.mdl. The file is corrupt
! C:\Documents and Settings\Compaq_Owner\My Documents\Downloads\simple_3dchat_tut_eng_comp.rar: Unexpected end of archive

i just tried to extract to here using winrar
Posted By: Dark_samurai

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/21/08 19:13

There must be something wrong with your winrar. I tested the download and extracting worked for me.

I think I will switch back zu .zip, because there were no problems.

Sorry for the problems!

Ok here are the .zip versions (they contain the english and german tutorial):
small version
big version (with compiled project)


Posted By: DC9

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/21/08 23:36

I was having download issues with the previous big English .rar download before as well. The .zip file looks good though.
Posted By: Carlos3DGS

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/27/08 21:30

Cant unzip it.
Winrar gives me an error with your files.
What program do you use?
Posted By: Dark_samurai

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/28/08 12:22

I used Winrar 3.60.
Posted By: Germanunkol

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/28/08 13:31

demo works fine here.
a question: you don't do any movement prediction at all, right? so all movement seen is the one received from the other players?
if so, the "jerkyness" is fine...
Posted By: Dark_samurai

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/28/08 14:25

Quote:
a question: you don't do any movement prediction at all, right? so all movement seen is the one received from the other players?
if so, the "jerkyness" is fine...


Correct. I mentioned that in the manual + methodes how to make better movement (Death Reckoning).
Posted By: lostclimate

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/29/08 21:20

You probably already mentioned this, but what will the cost of this be?
Posted By: MaxF

Re: ANet - The ultimate networkplugin for GS [Demo] - 11/29/08 21:48

Yes how much - BTW this is GREAT smile


Posted By: Dark_samurai

Re: ANet - The ultimate networkplugin for GS [Demo] - 12/02/08 20:45

The price will be released when the homepage is finally released!

The homepage is finished now. After I configured my webserver (I'm having an own now ^^) the homepage will be released!
There will be two new example scripts for free download (already finished!).

After the homepage is finally working, I will start with the pro version.
Planned features: Encryption, compression, unlimited clients, file manager (for sending files like a level...), extended playername system (can be used for lists like in cs when you press tab), udp functions, http functions (both needed if you want to create a serverlist). My target is to finish it before christmas!
Posted By: croman

Re: ANet - The ultimate networkplugin for GS [Demo] - 12/06/08 18:03

i have a problem with updating car tires in my game. there's one action for all four tires and i cant update them properly.

can you please take a look at this code and tell me a way to update, i mean send theirs position correctly?


Click to reveal..

void tire()
{

set(my,SHADOW | CAST);

my.id = wheel_i++ - 1;
wheels[my.id] = my;


while(enet_ent_globpointer(my) == -1) {wait(1);} //wait until the entity gets a global pointer
while(go ==0){wait(1);}

//if(enet_ent_creator(enet_ent_globpointer(my)) == enet_get_clientid()) //if this function runs on the client which created the entity
//{
set_physics(
PH_SPHERE,
PH_SPHERE,
2 + (my.id > 3) * 2,
30,
80,
50,
10,
20,
20
);


printf("");
wheel_ids[my.id] = phcon_add(PH_WHEEL, vehicles[my.id > 3], my);
phcon_setparams1(wheel_ids[my.id], my.x, vector(0, 0, 1), vector(1, 0, 0));
phcon_setparams2(wheel_ids[my.id], vector(
-30 * (my.id == 0 || my.id == 1 || my.id == 4 || my.id == 5),
30 * (my.id == 0 || my.id == 1 || my.id == 4 || my.id == 5),
0), nullvector, vector(spring, damper, 0));

while(enet_get_clientid() > -1)
{
// suspension
ent_animate(vehicles[my.id > 3], (suspensions.pstring)[my.id % 4],
clamp((100.0 / (suspension_max - suspension_min)) * (
(vec_rotate_inverse(vec_diff(my.t1_x, my.x, vehicles[my.id > 3].x), vehicles[my.id > 3].pan)).z
- suspension_min) - 30, 0, 100), ANM_ADD);

phent_getvelocity(my, my.t2_x, nullvector);
vehicles[my.id > 3].speed = (vec_length(my.t2_x) / 32.0) * 60 * 60 / 1000.0;



enet_set_unreliable(1); //send in unreliable mode
enet_send_pos(enet_ent_globpointer(my),-1); //send the new position to all clients

enet_send_angle(enet_ent_globpointer(my),-1);
enet_set_unreliable(0);



wait(1);
}
//}
}



i create tires in this function:

Click to reveal..

function create_player()
{
player=enet_ent_create(_str("aut_f360.mdl"), vector (random(200), random(200), 150), _str("vehicle"));


enet_ent_create (_str("rue_360_d.mdl"), vector (player.x + 17, player.y + 21, player.z - 7), _str("tire")); // FR

enet_ent_create (_str("rue_360_i.mdl"), vector (player.x - 17, player.y + 21, player.z - 7), _str("tire")); // FL

enet_ent_create (_str("rue_360_i.mdl"), vector (player.x - 17, player.y - 33, player.z - 7), _str("tire")); // RL

enet_ent_create (_str("rue_360_d.mdl"), vector (player.x + 17, player.y - 33, player.z - 7), _str("tire")); // RR

}





Posted By: Dark_samurai

Re: ANet - The ultimate networkplugin for GS [Demo] - 12/07/08 09:29

Hmmm... the code looks correct. Does the tires behave correctly if you don't use any multiplayer code?

What exactly happens when you use the code you posted? Are the tires not moved on the other clients or are they moved wrong?

I saw that you commented the "if" out that makes sure that the code only runs on the client that created the entity. This is an important "if" and you need this! Otherwise the whole function is executed on all clients => all clients set the position of the wheels with their physic engine and don't use the sent positions.
Maybe that's the problem.

EDIT: Forgot to say that the homepage will be available this afternoon! You will be able to buy the Standard Version of ANet and get 2 new example scripts.
Posted By: Dark_samurai

Re: ANet - Full version available now! - 12/07/08 13:50

I proudly present you the official homepage of ANet: www.anet-plugin.com

The full Standard Version is in stores now including one month free support! wink

Additionally, there are two new scripts ready for free download: a modified version of the standard default.c file that now displays ANet specific data in the debug panel and pong as multiplayer example.

Enjoy!
Posted By: Tobias

Re: ANet - Full version available now! - 12/07/08 15:33

That looks like a great library! But whats the advantage over the built in functions? On your website you write about TCP, but thats probably a mistake. Network libraries like Directplay use UDP, not TCP. TCP is a handshake protocol and is not suited for multiplayer.

Originally Posted By: manual
Gamestudio uses DirectPlay 9 for sending UDP data packets. By default, a reliable protocol is used for essential messages like joining or transmitting variables or strings, while a faster but unreliable protocol is used for frequent repeated messages like entity updates. The protocol, packet size, and other parameters can be customized and modified through the dplay_ variables.


Have you already made some tests to find out if your library is faster or slower than Gamestudios?
Posted By: croman

Re: ANet - Full version available now! - 12/07/08 15:54

great job Peter. be sure that i'm gonna purchase your plugin once i collect the money and that perhaps in 1-2 weeks we(my boss actually) are gonna purchase it for GroundTacticsGame project.

anyway, i've added you on ICQ...can you get online on your ICQ account, please?
Posted By: Dark_samurai

Re: ANet - Full version available now! - 12/07/08 16:40

@Tobias: You are right! Direct Play is based on UDP not TCP this was wrong in the text (changed!).
Sorry I didn't had the time to do such tests. But I guess that the difference won't be that much.
Although you can make tests if you want. Use the demo version and test as much as you like smile

The real advantage is, that it's easier to use than the built in system. You have much more functions that will help you to get faster results! And of course the tutorials and example scripts.

@cerberi_croman: Good to hear that you like it! I've added you to my ICQ list wink
Posted By: Tobias

Re: ANet - Full version available now! - 12/07/08 17:47

Ive downloaded and tested the Pong demo!

I had to add a line to the "acknex.h" in the folder, your version was probably based on an old .h file, but after replacing it it worked like a charm! I have also added your default.c for comparing the traffic, this did not look so good. The original Pong multiplayer demo from Gamestudio has a traffic of around 88 bps, yours had 3400 bps. Maybe there is some optimization in Gamestudio thats missing in anet?
Posted By: Dark_samurai

Re: ANet - Full version available now! - 12/07/08 17:56

I created this with A7.50, is there something new in A7.60?
The pong code is not optimized! Their is a lot of data sent every frame (ball, and bars). This is not because the plugin causes more traffic!

I wrote a top down shooter (currently frozen) that had a peak of ~1 kbs with 5 players running and shooting at the same time.
Posted By: Dark_samurai

Re: ANet - Full version available now! - 12/08/08 10:26

A new Pong Version is online now!
I've optimized it a lot and reduced the traffic! It uses some kind of death reckoning now and has as much bps as the original demo from conitec wink

Thanks to Tobias for pointing this out!

@Tobias: What's new in the acknex.h file?
Posted By: croman

Re: ANet - Full version available now! - 12/08/08 18:04

if anyone has a problem with lag in 3dchat example... on one side (eg server) client player is laggy and that on another side(eg client) both client and server players are smooth and dont know why, i have a solution for you all.

just add in main.c in main function fps_max = 60; // 60 for example
you forgot that Dark_samurai. if i'm not wrong it needs to be there because of limiting number of packets that are sent.

yeah, it's that simple and it will work like charm smile
Posted By: Cowabanga

Re: ANet - The ultimate networkplugin for GS [Demo] - 12/08/08 18:19

Good Job!
Posted By: Carlos3DGS

Re: ANet - Full version available now! - 12/09/08 12:09

Took a look at your web page, congratulations!!!

I will buy Anet in febuary because I will have more time then and I dont want to waste my free month of support smile
I will probably also buy an extra ticket of 6 month support in feb.
I would like to know i I try it now... when I upgrade to standrad or pro versions, will I have to modify my code or are the functions/parameters/etc the same?

I have tried to download files from your web page and I keep getting the same errors when I unzip that I used to get for the files on this thread.

The Anet_Manual_eng and default.c zip files both work great and I unzip them correctly.
But I get "The archive is either in unknown format or damaged" when I try to unzip the Anet Demo, Chat Tutorial and Pong Example.
Posted By: Carlos3DGS

Re: ANet - Full version available now! - 12/09/08 12:19

I have been thinking, mabe those 2 files that work good for me... Were they compressed afterwards? Or mabe differently?

I use Winrar 3.80, mabe this is why? But it is still strange that I can unzip 2 of the 5 files correctly.
Where can I get an older version of winrar?
Originally Posted By: Dark_samurai
I used Winrar 3.60.

Posted By: croman

Re: ANet - Full version available now! - 12/09/08 12:45

i'm using WinRar 3.80 and i can unrar those files without a problem.
have you tried to download them again?
Posted By: Carlos3DGS

Re: ANet - Full version available now! - 12/09/08 14:52

yup, lots of times cry
Posted By: croman

Re: ANet - Full version available now! - 12/09/08 14:56

have you tried with different browser? if you're using some download software disable it and try downloading with browser only.

i've downloaded it with Google Chrome and unpacked it with WinRar 3.80 and i really dont know why you cant, sry
Posted By: Dark_samurai

Re: ANet - Full version available now! - 12/09/08 16:07

Quote:
when I upgrade to standrad or pro versions, will I have to modify my code or are the functions/parameters/etc the same?


They will be the same, but there will be around 20 new cool functions wink

Quote:
I have been thinking, mabe those 2 files that work good for me... Were they compressed afterwards? Or mabe differently


no... they are copressed the same way.


I will try using winzip or a newer winrar now! I'll tell you when the new versions are online wink


Thanks for your interest guys!
Posted By: Dark_samurai

Re: ANet - Full version available now! - 12/09/08 18:18

Ok I've uploaded new versions of all available downloads (packed with sevenzip). If you can't use them again, use a different unzip program, please!

I've also updated the tutorial (added fps_max = 60;). Thanks to cerberi_croman for the hint!
Posted By: Carlos3DGS

Re: ANet - Full version available now! - 12/09/08 22:45

Thanks for reloading them, they unziped ok this time! laugh
Posted By: Carlos3DGS

Re: ANet - Full version available now! - 12/09/08 23:00

Oh, by the way, I read something about remote procedure calls on a different thread.
Does/will your plugin support remote procedure calls?
If not, that would be a great addition for the pro version wink

remote procedure calls with parameters would be all that and a bag of chips, hehehe
Posted By: Dark_samurai

Re: ANet - Full version available now! - 12/10/08 08:57

Quote:
Thanks for reloading them, they unziped ok this time!


Cool!

Quote:
Does/will your plugin support remote procedure calls?


I have no clue what remote procedure calls are?
Can you give me the link of this thread?
Posted By: Carlos3DGS

Re: ANet - Full version available now! - 12/10/08 12:57

I first started to learn about remote procedure calls when I started looking for an alternative to the 3DGS networking at http://www.jenkinssoftware.com/index.html (raknet).

It is so a system can tell another system to call a function (with parameters).

They talk about remote procedure calls with parameters in a thread about a project (that seems to have been abandoned) for a plugin of raknet for 3DGS.
You can find this thread at:
http://www.coniserver.net/ubb7/ubbthreads.php?ubb=showflat&Number=240024&page=1


I have a question. I have never used a plugin yet for 3DGS and was wondering if I have understood everything correctly...

Would the steps to use your plugin be...?
-Your "default.c" is to be copied into "3DGS\include"?
-"anet.h" is to be copied into my project folder with the rest of my code?
-"anet.dll" is to be copied into (I'm not sure about this one... "acknex_plugins" or "sdk_plugin" or "sed_plugins")?

After I have finished placing those files in those folders I would have to enable it in my code writing...

-in my code then I write #include <default.c> as always?
-in the code I also write #include "anet.h"?

so it would look like this?
Code:
#include <default.c>
#include "anet.h"



So after all that everything should be ready to go and I can use you plugin's functions?
Posted By: Dark_samurai

Re: ANet - Full version available now! - 12/10/08 13:36

It's described in the manual. But it should work like this:

-copy anet.dll and anet.h (Lite-C) into your work folder
-set the plugindir to "." (you need to write this into a .wdl file that is named like your main source file)
-write #include "anet.h" into your main source file

Quote:
It is so a system can tell another system to call a function (with parameters).


Sounds like enet_clsend_event/enet_svsend_event. It let's a client/server call a function with a given parameter (msg).

I will look into the threads later (don't have time yet).
Posted By: Carlos3DGS

Re: ANet - Full version available now! - 12/10/08 13:40

Originally Posted By: Carlos3DGS
It is so a system can tell another system to call a function (with parameters).


Explained a little better...

In some situations (like a mmorpg) you dont want the client to calculate everything to avoid cheating and other things, and because the database for everything is only on the server.

So when the client wants his character to "hit" a different character:
The client sends an order to the server to invoke the "calculate_hit()" function with the parameters (attacking_character, hit_character).

the server recieves that remote proceure call and runs the function:
calculate_hit(attacking_character, hit_character)
{
...
lookup in charatcer database: attacking_character's weapon_ID
lookup in weapon database: weapon_ID's damage
...
lookup in character database: hit_character's armour_ID
lookup in armour database: armour_ID's defence
...
total_damage = damage - defence
...
write in character database: hit_character.life -= total_damage
...
and after all this server does another remote procedure call to clients...
}


The server would do a remote procedure call to the client for them to call their function "reduce_life()" with the parameters (character_ID, total_damage).
The clients recieve that remote procedure call and run the function:
reduce_life(character_ID, total_damage)
{
...
character_ID.life -= total_damage
...
}


This is just an example situation to better explain what is a remote procedure call in both directions (client->server and server->clients).
Basically it is just "tell this other system to run this function (with these parameters)".
To do that of course we would have to make all the functions on the client, and the server has to know the name of all those functions for a remote procedure call to the server->clients.
And for the clients to do a remote procedure call on the server client->server: the server has to have the functions, and the clients need to have the name of the functions they want the server to run.
Posted By: Carlos3DGS

Re: ANet - Full version available now! - 12/10/08 13:50

Originally Posted By: Dark_samurai
Sounds like enet_clsend_event/enet_svsend_event. It let's a client/server call a function with a given parameter (msg).

Yes, that sounds like it. I am still reading your manual and havent gotten to that part yet. It was in there but I thought events werent functions.

Sorry for that dumb question. hehehe

I have another dumb question for you though, hahaha:

I have read what you said
Quote:
-set the plugindir to "." (you need to write this into a .wdl file that is named like your main source file)

but am kind of confused. So if my main code file is called "My_Game.c" I make a "My_Game.wdl" in that same folder that only contains this line in the code?
Code:
PLUGINDIR "."

Posted By: Dark_samurai

Re: ANet - Full version available now! - 12/10/08 13:56

This exaclty how enet_cl/svsend_event works!
The only difference is that you can't use more than the msg parameter. But because the msg parameter is a String, you can copy all parameters into the string and send these (could look like this: "1;4;5;6;89474585.102384;..." = all parameters in one string).

A detailed explanation is in the manual under enet_set_event() and enet_clsend_event()/enet_svsend_event().

These functions are also used in the pong example. The server sends an event (=a function) and let's the client call a function that plays a corresponding sound (depending on which value is sent in msg).


EDIT: Seems like I was to slow ^^

Quote:
but am kind of confused. So if my main code file is called "My_Game.c" I make a "My_Game.wdl" in that same folder that only contains this line in the code?


That's correct! This is because Lite-C has no PLUGINDIR command.

Posted By: Carlos3DGS

Re: ANet - Full version available now! - 12/10/08 14:07

My last stupid question (for the moment, hahaha).

Do I have to write #include "My_Game.wdl" in my code that is in "My_Game.c"?
Posted By: Dark_samurai

Re: ANet - Full version available now! - 12/10/08 14:11

No it's not needed, the compiler includes the file automatically.
Posted By: Carlos3DGS

Re: ANet - Full version available now! - 12/10/08 14:24

Thanks for your help, I will start writing a simple mp (probably just player movement) right now to start learning your plugin.
And when I have learned it I will start right away with testing your remote procedure calls.
Posted By: Dark_samurai

Re: ANet - Full version available now! - 12/10/08 14:28

Please tell me if you have problems and/or tell me if you are missing something in the documentation, because I want to make the learning workflow as easy as possible!
Posted By: Carlos3DGS

Re: ANet - Full version available now! - 12/10/08 14:59

Sorry to bother you some more but I get an error right before the program even starts.

Quote:
Error in 'C:\3D GameStudio A7\include\default.c' line 121: 'diag_status' undeclared identifier

< diag_status();
>
.


my code at the top is:
Code:
 #include <acknex.h>
#include <windows.h>
#include "anet.h"
#include <default.c>

Posted By: Dark_samurai

Re: ANet - Full version available now! - 12/10/08 15:05

What if you don't use the #include <default.c>?

Do you have ICQ? If so, contact me please (makes it easier for me).
Posted By: Carlos3DGS

Re: ANet - Full version available now! - 12/10/08 15:05

I tried changing the order of anet.h and default.c and I then get this error:

Quote:
Error in 'anet.h' line 17: syntax error

<void enet_set_compatibility(var mode);
>
.


My code at the top is now:
Code:
#define PRAGMA_BIND "d3dx9_30.dll"
#define PRAGMA_BIND "ANet.dll"

#include "anet.h"
#include <default.c>

#include <acknex.h>
#include <windows.h> 

Posted By: Carlos3DGS

Re: ANet - Full version available now! - 12/10/08 15:06

one sec, its been a long time since I dont use ICQ.
Let me look for my Id and I will send it to you in a PM
Posted By: Dark_samurai

Re: ANet - Full version available now! - 12/10/08 15:07

Your first version was correct! (the order)

I think their is something wrong with the default.c file. Do you use A7.60?
Posted By: Carlos3DGS

Re: ANet - Full version available now! - 12/10/08 15:11

version 7.06.1
Posted By: croman

Re: ANet - Full version available now! - 12/10/08 15:24

i had the same problem and i did that status info on this kind of way:

Code:
FONT* arial_font = "Arial#20b"; // truetype font 

PANEL* stats =
{
  pos_x = 4; pos_y = 4;
  digits(10,0,"Ping: %.f",arial_font,1,ping);
  digits(10,20,"Data in: %.f",arial_font,1,data_in);
  digits(10,40,"Data out: %.f",arial_font,1,data_out);
  
  
  flags =  VISIBLE;
}


and in main loop you need to add this:

Code:
ping = enet_get_ping(); //get the current ping 
data_in = enet_get_datatransfer(2); //get the received data size of the last second 
data_out = enet_get_datatransfer(1); //get the sent data size of the last second 



you can easily implement hiding/showing of that status panel if f11 e.g. is pressed
Posted By: Dark_samurai

Re: ANet - Full version available now! - 12/10/08 15:27

@cerberi_croman: Which version do you have? Also such an old one?

Maybe an update to a newer gamestudio version could help!
Posted By: croman

Re: ANet - Full version available now! - 12/10/08 15:31

yup some older one.
i tried updating to newer version but i didnt like it. i experienced some weird bugs. current version is completely okay for my current projects + i've easily replaced that default.c with my own stats code. smile
Posted By: Carlos3DGS

Re: ANet - Full version available now! - 12/10/08 15:49

I updated and still get the same error, but I would like to use the default.c

@ cerberi_croman
Could you send me your default.c?
Posted By: croman

Re: ANet - Full version available now! - 12/10/08 16:04

i didn't modify the default.c but my own script
Posted By: Dark_samurai

Re: ANet - Full version available now! - 12/10/08 20:16

I can't reproduce this bug. Are you sure you are including in the right order?

Code:
#include "acknex.h" //don't forget to put it into the game folder or use <>
#include "anet.h"
#include "default.c"


I'm using A7.50 without having the bug.
Posted By: croman

Re: ANet - Full version available now! - 12/11/08 06:10

what is diag_status();? some ANet function or 3dgs function cause in my normal default.c there's no such function call.
Posted By: MaxF

Re: ANet - Full version available now! - 12/11/08 15:18

Hi

Why does it say two versions on web site -
Quote:
> 2 different versions, depending on what you need


when there is only one to buy

Is there another version coming?
Posted By: Dark_samurai

Re: ANet - Full version available now! - 12/11/08 15:21

Quote:
what is diag_status();? some ANet function or 3dgs function cause in my normal default.c there's no such function call.


It's a function of the Gamestudio debugger. It's in my default.c file! Have you tried, making the includes as I posted? Can you use the standard default.c file without problems? Can you use the pong example?

Yes, there is a PRO version with more features and unlimited clients planned (I'm currently working on it).
Posted By: croman

Re: ANet - Full version available now! - 12/11/08 15:32

in my version of default.c (in later version of 3dgs) diag_status(); doesn't exists
Posted By: croman

Re: ANet - Full version available now! - 12/13/08 17:19

how can i know when some client sends to my client some message or even when it updates it's player entity on all clients including my client?
Posted By: Dark_samurai

Re: ANet - Full version available now! - 12/13/08 19:14

If you compare the current value of the player position and the last sent one:

Code:
var save_x;
var save_y;
var save_z;

while(1)
{
   if(my.x != save_x && my.y != save_y && my.z != save_z)
   {
      save_x = my.x;
      save_y = my.y;
      save_z = my.z;
      //do something...
   }
   wait(1);
}


I've updated to A7.60 and the default.c file works totally correct. Can you send me a testproject where your error occurs if you are online the next time (ICQ)?
Posted By: croman

Re: ANet - Full version available now! - 12/13/08 19:59

ok thnx.

no need for that smile...'cause it will work on your pc. as i said in my default.c there is no diag_status(); function and in yours from newer version of 3dgs there is so i firmly believe that this is the reason why it didn't work
Posted By: Dark_samurai

Re: ANet - Christmas offer! - 12/14/08 15:32

*******************************************************************************
I want to announce my Christmas offer: -24% for the ANet Standard Version
(instead of 59.00€ only 38.94€)

The offer runs until 23.12.2008!
*******************************************************************************

@cerberi_croman: Thought you've updated to A7.60...
If you want you can send your default.c file to me and I will modify it, so that it shows the ANet specific data wink
Posted By: Dark_samurai

Re: ANet - Christmas offer! - 12/14/08 19:24

Ok, I've solved the PM problem!!!
I'm sorry for everybody who sent me a PM in the last time, I didn't received any of them because my message box was full (I thought I get a warning message ^^)...

Please send me your PM's again, so that I can answer them!

I'm verry sorry for the troubles!
Posted By: Quad

Re: ANet - Christmas offer! - 12/14/08 20:27

any possibilty releasing pro version before christmas?
Posted By: Dark_samurai

Re: ANet - Christmas offer! - 12/14/08 20:31

I'm working on it, but I can't promisse that.
What feature do you need?
Posted By: Quad

Re: ANet - Christmas offer! - 12/14/08 21:15

i just want to push it to limits. that unlimited players thingy. lots of small spheres floating around, chatting each other etc. i already made the app with demo version.

and ill try a server browser.
Posted By: Dark_samurai

Re: ANet - Christmas offer! - 12/14/08 21:19

The unlimited player thingy will be finished until christmas. If you want this without the other features I can give it to you.

For details contact me at peter@aauer.com, please!
Posted By: Anonymous

Re: ANet - The ultimate networkplugin for GS [Demo] - 12/16/08 11:20

I would be interested in the pro version (non limited connections).
When it will be available?
What will be the price?

I would be also interested in a "implementation concept" documentation with informations about "how to implement the functions, the communication workflow of the plugin and the limites".
Posted By: Dark_samurai

Re: ANet - The ultimate networkplugin for GS [Demo] - 12/16/08 16:22

Quote:
I would be interested in the pro version (non limited connections). When it will be available? What will be the price?


I offer you the same as Quadraxas: A version "between" standard and pro that supports no limited connections but not all the other features because they aren't ready at the moment. You can have this already! Price will be a bit higher than the Standard Version. Just contact me (I think you have my mail address).


Quote:
I would be also interested in a "implementation concept" documentation with informations about "how to implement the functions, the communication workflow of the plugin and the limites".


I think there are already a lot of useful internal informations in the manual and examples how the features should be used. But I can extend this, if you want!
Posted By: Asgadir

Re: ANet - The ultimate networkplugin for GS [Demo] - 12/24/08 10:46

I apologize for the german post but I'm afraid my English is a bit rusty.

Nachdem ich mir jetzt mal alles an anleitungen und beispielen durchgelesen habe, ist mir aufgefallen, daß, zumindest mir, vergleiche fehlen nach dem motto:

Original GS = enet_*_*

bzw. Original GS soundso = "braucht kein mensch mehr"

Mein code hat inzwischen ca. 16000 zeilen und es läßt sich wahrscheinlich nur durch try and error feststellen was ersetzt werden muß, was vollständig geändert werden muß und was nicht mehr gebraucht wird.

Klar, wäre ich am anfang, wäre das nicht wirklich ein problem, zumal alles super für doofe erklärt wurde heist, auch ich verstehe es whistle

Ich starte z.B.. den server und die clients über .bat dateien und übergebe parameter. werden die noch so übernommen wie vorher? Playername, IP, Port usw.

Um das testen zu können, müßte ich ja erst mal den gesamten code anpassen, denk ich mir.

Optimal wäre ein vergleich zwischen der locoweed anleitung für MP umgeschrieben auf ANet,

So wie ich das sehe, hätte ich das schon im januar haben müßen, glaube mir wären unmengen an frust erspart geblieben.

Wenn mein taschengeld das hergibt, bin ich auf alle fälle ein pro-versions anwärter wink
Posted By: Dark_samurai

Re: ANet - The ultimate networkplugin for GS [Demo] - 12/24/08 10:58

Quote:
Ich starte z.B.. den server und die clients über .bat dateien und übergebe parameter. werden die noch so übernommen wie vorher? Playername, IP, Port usw.


Nein werden sie nicht, und genau das ist ja das geniale wink Du kannst im Spiel entscheiden ob du als Server oder Client startest, welchen Port du verwenden möchtest und welche IP. Du benötigst keine Commandlines mehr. Ip, Port und Password müssen einfach den Funktionen enet_init_server() und enet_init_client() übergeben werden. Und vergiss nicht enet_server_poll() bzw. enet_client_poll() jeden Frame aufzurufen. (siehe Tutorials bzw. Codebeispiele im Manual).

Am leichtesten wird der Umstieg für dich sein, wenn du das Projekt neu schreibst. Die zusammenhänge zwischen GS MP und ANet sind nicht wirklich groß. Die Grundstruktur ist einfach anders... (hoffentlich leichter zu verstehen wink ).
Sollte aber kein großer Aufwand sein, da du wahrscheinlich weniger Zeilen an Code benötigen wirst als beim GS MP system.
Posted By: Asgadir

Re: ANet - The ultimate networkplugin for GS [Demo] - 12/24/08 14:46

Originally Posted By: Dark_samurai

Am leichtesten wird der Umstieg für dich sein, wenn du das Projekt neu schreibst. Die zusammenhänge zwischen GS MP und ANet sind nicht wirklich groß. Die Grundstruktur ist einfach anders... (hoffentlich leichter zu verstehen wink ).

Jooo, ich denke auch, daß es auf neuschreiben rausläuft. Macht nix. Wenn das ganze so funtioniert wie ich mir das denke, spar ich die mehrzeit auf alle fälle wieder ein. Und ja, deine grundstruktur entspricht einem server/client system wie ich es kenne. KA was das in GS ist? crazy

Ich meld mich auf alle fälle wenn der code zumindest soweit ist wie jetzt. Denke mal, es ist für viele von interesse wo die unterschiede liegen in sachen performance, effektivität usw. und ob die purzelbäume die man teilweise in GS schlagen mußte geschichte sind. wink
Posted By: ISG

Re: ANet - The ultimate networkplugin for GS [Demo] - 12/24/08 15:47

Woohoo I live mixed language threads.
Posted By: Dark_samurai

Re: ANet - The ultimate networkplugin for GS [Demo] - 12/24/08 17:20

Quote:
und ob die purzelbäume die man teilweise in GS schlagen mußte geschichte sind.


Sollte schon so sein, und falls nicht sag mir einfach bescheid welches Feature/Funktion du vermisst wink

Quote:
Woohoo I live mixed language threads.


All important things are posted in english. The other german parts are only regarding to specific users (unimportant for the others).


Merry christmas!
Posted By: Asgadir

Re: ANet - The ultimate networkplugin for GS [Demo] - 12/25/08 09:53

Hi,
i play this morning a bit with your chatdemo. The server starts in grafic mode. Now, i read a bit in your manual but i can't find any possebility to stop this. My servers, linux - windows, have no display cards in any way.

Another one, i can only start one server on one maschine. Is this right? Then i need for every instanz a virual IP.

For example: I host for my friends 3 CSS server on one Host, only the Port differ.

Take your time. It's not that important.
Posted By: Dark_samurai

Re: ANet - The ultimate networkplugin for GS [Demo] - 12/25/08 10:15

Quote:
i play this morning a bit with your chatdemo. The server starts in grafic mode. Now, i read a bit in your manual but i can't find any possebility to stop this. My servers, linux - windows, have no display cards in any way.


You can do this! Just start with video_mode = 0; but be aware, that you can't load any levels or use other grafical stuff on this machine. This means, that also entities etc. won't work and they won't be synchronized... This is one of the big problems I currently have. I'm trying to fix this in further versions.

Quote:
Another one, i can only start one server on one maschine. Is this right? Then i need for every instanz a virual IP.


This is a limitation of ENet. I can't do anything against it, sorry.
Posted By: Quad

Re: ANet - The ultimate networkplugin for GS [Demo] - 12/25/08 10:18

i am not sure but afaik you can both start 2 servers on same machine and sync entites in video_mode=0;

btw, you cant run GS on linux without windows emulation.


edit: tried 2 servers with diffrent ports. worked.
Posted By: Dark_samurai

Re: ANet - The ultimate networkplugin for GS [Demo] - 12/25/08 10:26

Quote:
edit: tried 2 servers with diffrent ports. worked.


Ok, thought this doesn't work. Thanks for clearing this up!
Posted By: Quad

Re: ANet - The ultimate networkplugin for GS [Demo] - 12/25/08 10:33

apperantly snycing works too, but maybe i am not doing the way it should be.

in this screen shot there is 2 servers 4 clients.(ports in titles)

first player joins and moves, when second player joins it sees the first player in right place. servers are in video_mode =0; (doesn't tihs means they get snyced?)

http://img211.imageshack.us/img211/852/testxw7.jpg
Posted By: Dark_samurai

Re: ANet - The ultimate networkplugin for GS [Demo] - 12/25/08 10:39

What I ment was using enet_ent_synchronizing(), this won't work I think.
Although I'm not sure. I will test this.
If it doesn't work, I will change this in version 1.1 (free update for all those, who already bought ANet).
Posted By: Quad

Re: ANet - The ultimate networkplugin for GS [Demo] - 12/25/08 10:52

yeah, i call it once after player connects to server, and everything looks like as it should look.(server video_mode=0)

(only thing video_mode=0 prevents is just rendering i guess, rest is same with normal mode?)
Posted By: FlorianP

Re: ANet - The ultimate networkplugin for GS [Demo] - 12/25/08 18:50

Im still interested in the version that allows unlimited clients.
An idea when it will be raeady?
Posted By: Dark_samurai

Re: ANet - The ultimate networkplugin for GS [Demo] - 12/25/08 18:59

Quote:
yeah, i call it once after player connects to server, and everything looks like as it should look.(server video_mode=0)

(only thing video_mode=0 prevents is just rendering i guess, rest is same with normal mode?)


As far as I know you can't load a level => I thought also ent_create won't work and if ent_create wouldn't work than also the synchronising wouldn't work correct.
I will look into this...

Quote:
Im still interested in the version that allows unlimited clients.
An idea when it will be raeady?


I'm working on the Professional version everyday wink I'm trying to finish it until the end of my holidays (around Januar 7, 2009).
Posted By: Quad

Re: ANet - The ultimate networkplugin for GS [Demo] - 12/25/08 21:36

you can load a level. (try it by making a level with wed add a entity in wed attach a printf("yehaa"); action to it. it works wink )
Posted By: Asgadir

Re: ANet - The ultimate networkplugin for GS [Demo] - 12/25/08 21:51

Originally Posted By: Quadraxas
i am not sure but afaik you can both start 2 servers on same machine and sync entites in video_mode=0;

Thanks for your work. Sounds very good.

Originally Posted By: Quadraxas
btw, you cant run GS on linux without windows emulation.

yes and no. You can if you know the necessary parts like dll and so on. But, its not easy. Windows emulation packages like Wine are impractical, too slow.
No, for my windowsapplication i use win 2003 and 2008 servers.
Posted By: FlorianP

Re: ANet - The ultimate networkplugin for GS [Demo] - 12/25/08 22:36

Ah, i forgot something very important - has someone tested the plugin on win server 2003/2008 yet?
Posted By: Quad

Re: ANet - The ultimate networkplugin for GS [Demo] - 12/25/08 22:45

do win servers has that 30 day trial thingy?(we can try if it has.)
Posted By: Asgadir

Re: ANet - The ultimate networkplugin for GS [Demo] - 12/26/08 08:55

Originally Posted By: FlorianP
Ah, i forgot something very important - has someone tested the plugin on win server 2003/2008 yet?

Maybe i get something wrong, but you don't need any plugin on serverside.
And the Network will remain unchanged. UTP is UTP, PORT is PORT and IP is IP.

Edit: I start the chatdemo on a 2003 and connect with 2 clients. No problems.
Posted By: Carlos3DGS

Re: ANet - Christmas offer! - 12/28/08 16:57

Will the X-mas offer be available again? Or some other kind of offer?
Posted By: Dark_samurai

Re: ANet - Christmas offer! - 12/28/08 17:26

Quote:
Will the X-mas offer be available again? Or some other kind of offer?


Yeah, next christmas! I don't plan any new offers in the next time!
Posted By: Carlos3DGS

Re: ANet - The ultimate networkplugin for GS [Demo] - 12/30/08 22:14

How is the pro version doing?

What new features are planned so far for the pro vesion?
When do you estimate the launch date for the pro version will be?
What price range can we expect for the pro version?
Posted By: Dark_samurai

Re: ANet - The ultimate networkplugin for GS [Demo] - 12/31/08 11:08

Features:
-unlimited Clients [ready]
-Compression
-Encryption
-global strings/vars for every player [ready]
-File manager for sending files [ready]
-Audio streaming for VoIP [ready]
-http functions for using php scripts (needed for lobbies over the internet)
-udp functions for lobbies over LAN

I think it will be ready after my holidays (Januar 7,2009).

Price isn't fixed yet!
Posted By: Carlos3DGS

Re: ANet - The ultimate networkplugin for GS [Demo] - 12/31/08 17:59

Looks great, and most of what I need is already ready laugh
Cant wait for compression and encryption smile

I would buy at the end of feb (after my exams) even withought the http and udp functions.

Great work!
Posted By: MaxF

Re: ANet - The ultimate networkplugin for GS [Demo] - 01/01/09 18:25

SO cant wait until all features are done and I get my hands on it smile
Posted By: Dark_samurai

Re: ANet - Version 1.1 announced - 01/09/09 18:40

Hi!

I'm currently not only working on the professional version of ANet. I did a lot of improvements and some bug fixes and because of this, I will also release a new version (1.1) of ANet on the same day the Pro will be released.
Ok, that was the good message. The bad one is, that I wasn't able to finish the professional until 07.01.2009. I'm working on it all my free time, but I'm still not totally happy with some features and I'm not the man who gives you unfinished things wink

Ok some details of the new version:
- Less latency due to internal optimisation
- MUCH less traffic ~50-70% (dependes on the function)
- no poll functions, they are handled internal
- some small bug fixes
- functions like enet_send_var use the pointer of the variable now and not the name => instead of enet_send_var(_str("test_var"),-1); now: enet_send_var(test_var,-1);
I think this is more logical!
- free for all those, who already bought ANet

Ok, you want to know when the new version and the proffessional version are ready? I don't know! My goal is to finish it in Januar.

Sorry for the delay!
Posted By: croman

Re: ANet - Version 1.1 announced - 01/09/09 20:41

- Less latency due to internal optimisation
- MUCH less traffic ~50-70% (dependes on the function)
- no poll functions, they are handled internal

great! cant wait to get my hands on that smile
Posted By: Carlos3DGS

Re: ANet - Version 1.1 announced - 01/11/09 09:26

Yup, sounds like great ideas. Each time I check this thread I like it more ond more.
Great!
Posted By: Carlos3DGS

Re: ANet - Version 1.1 announced - 01/14/09 10:27

When you are done with the pro version, will you update the manual and the tutorials/examples for the new code (no polls for example)?
Posted By: Dark_samurai

Re: ANet - Version 1.1 announced - 01/14/09 15:16

Of course the old manual/tutorials/code will be updated.

I'm still working on the pro version. I can't tell you when it's finished, because this is really upredictable, but I do my best to finish it as fast as possible.
Posted By: Helghast

Re: ANet - Version 1.1 announced - 01/14/09 23:12

when pro is out, im willing to buy it from you smile
I'm planning my horror survival game, which conveniently uses Co-op as well (atleast, some chapters are planned).
Any target of when it's done? (not that i'll be needing it the next couple months yet anyway :P).

good job so far!

regards,
Posted By: Dark_samurai

Re: ANet - Version 1.1 announced - 01/15/09 20:59

Some news:
- Today I finished the udp features
- Also the encryption is ready
- Nearly every function that sends data is optimized and produces less traffic now
- I've desided to remove the compression feature. There is no need any more for this. All tests I made came to the results, that the encryption algorithms create bigger data than their source data because the data is already so small wink
- I will start with http tomorrow.

TO-DO
+ optimizing Audiostreaming
+ solving a Bug in the Filemanager
+ 3 functions left to optimize
+ implenting http features

@Helghast: I'm trying to finish it until the end of Januar, but there are still some problems and I don't know how long it will take to fix them.
Posted By: Dark_samurai

Re: ANet - Version 1.1 announced - 01/27/09 20:14

News:
- http feature is ready
- all functions are optimized now
- a bug from the file manager was removed
- I improved the manual a lot

TO-Do:
- finishing the audiostreaming feature
- final testing
- finishing the new manual

Important:
I have some troubles with the Speex codec. If there is anybody out there who has experience with Speex, PM me please!
You would help me finishing the plugin sooner.


If I can solve the Speex problem in time, I will be able to release version 1.1 and the professional version this weekend.
Posted By: DC9

Re: ANet - Version 1.1 announced - 01/28/09 02:09

Reading glasses and a sharp pencil ready if needed cool
Posted By: Carlos3DGS

Re: ANet - Version 1.1 announced - 01/28/09 19:21

Cant wait! laugh
Sorry but I cant help with speex though frown
Posted By: Asgadir

Komisches Phänomen... - 01/30/09 15:38

Mir ist heute beim ändern ein seltsames phänomen aufgefallen. Ich bekomme alle gesendeten skills zurück, nicht aber pos or angel. Hab jetzt ca. 5 stunden getestet und kann es nicht abstellen. Produziert halt netzlast im eingang. Zwar nicht so tragisch wie raus aber... ist es irgendwie mein fehler? Ich finde jedenfalls keine lösung.
Posted By: Dark_samurai

Re: Komisches Phänomen... - 01/30/09 17:35

This is a bug of Version 1.0! It's fixed in the new version.
Posted By: Carlos3DGS

Re: ANet - Version 1.1 announced - 02/04/09 14:15

How is the speex coming along?
Hope you are not having too many problems with it
Posted By: Dark_samurai

Re: ANet - Version 1.1 announced - 02/04/09 14:35

I got this part working wink
If I can finish the english manual in time all will be released later today!
Posted By: croman

Re: ANet - Version 1.1 announced - 02/04/09 15:26

ohhohoo, awesome...cant wait wink
© 2024 lite-C Forums