Re: Not working server in BGT!
Re: Not working server in BGT! Can anyone explain why my code does not work? URL: http://forum.audiogames.net/viewtopic.php?pid=307154#p307154 ___ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
Re: Not working server in BGT!
2017-04-09
Thread
AudioGames . net Forum — Developers room : ashleygrobler04 via Audiogames-reflector
Re: Not working server in BGT! If i try to log in to the acount that i created, it just keeps quiet.What am i doing wrong?And the options is not translated. please if you can translate it, do that thanks URL: http://forum.audiogames.net/viewtopic.php?pid=306365#p306365 ___ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
Re: Not working server in BGT!
Re: Not working server in BGT! http://www.tdstudios.esy.es/chat2.rar URL: http://forum.audiogames.net/viewtopic.php?pid=306298#p306298 ___ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
Re: Not working server in BGT!
2017-04-08
Thread
AudioGames . net Forum — Developers room : ashleygrobler04 via Audiogames-reflector
Re: Not working server in BGT! Please can you make it english, i want to understand what is going on when tts voice speaks.Thankyou URL: http://forum.audiogames.net/viewtopic.php?pid=306258#p306258 ___ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
Re: Not working server in BGT!
2017-04-08
Thread
AudioGames . net Forum — Developers room : ashleygrobler04 via Audiogames-reflector
Re: Not working server in BGT! Reely cool. going to download URL: http://forum.audiogames.net/viewtopic.php?pid=306257#p306257 ___ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
Re: Not working server in BGT!
Re: Not working server in BGT! My chat programDownload linkhttp://www.tdstudios.esy.es/chat2.rar URL: http://forum.audiogames.net/viewtopic.php?pid=306255#p306255 ___ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
Not working server in BGT!
Not working server in BGT! Hello.I have my server written in BGT.Errors do not occur, but it does not work!Writes that ping-1, as well as when chatting around the chat history, writes runtime error!What could be the problem?Help me please!Client code:#include "form.bgt"#include "includes/logo.bgt"#include "includes/m.bgt"#include "includes/menu.bgt"#include "includes/dlg.bgt"#include "sound_pool.bgt"string[] chat_history;int chat_position;string name="No name";bool connecting = false;network net;network_event event;void main(){show_game_window("Endless war");set_sound_decryption_key("kidsdetki", true);set_sound_storage("sounds.dat");wait(1000);net.setup_client(10, 100);mainmenu();}void test(){dlgplay("test.wav");}void set_name(){name=input_box("Enter name","Please enter youre name: ","");mainmenu();}void game(){net.connect("127.0.0.1", 4321);while(true){event=net.request();if(event.type==event_connect){speak("Welcome to the Endless war.");break;}}while(true){event=net.request();if(connecting==false){net.send_reliable(0,"connect|"+name,0);connecting=true;}if(key_pressed(KEY_F3)){double time=net.get_peer_average_round_trip_time(0);speak("The ping took "+time+" milliseconds.");}if(key_down(KEY_LSHIFT) or key_down(KEY_RSHIFT) and key_pressed(KEY_SLASH))net.send_reliable(0,"/who",0);if(key_pressed(KEY_LBRACKET)){chat_position--;if(chat_position<0)chat_position=0;speak(chat_history[cha t_position]);}if(key_pressed(KEY_RBRACKET)){chat_position++;if(chat_position>=chat_history.length)chat_position=(chat_history.length-1);speak(chat_history[chat_position]);}if(key_pressed(KEY_ESCAPE)){speak("Disconnecting");net.send_reliable(0,"dc|"+name,0);net.destroy();mainmenu();}if(event.type==event_disconnect){net.destroy();mainmenu();}if(event.type==event_receive){string[] msg=string_split(event.message,"|",true);if(msg[0]=="chat"){string chmessage=msg[1]+" say: "+msg[2];speak(chmessage);chat_history.insert_last(chmessage);}if(msg[0]=="dc")speak(msg[1]+" offline");if(msg[0]=="connect")speak(msg[1]+" online");}}}void chatbox(){audio_form form;form.set_ output_mode(active_sr());form.create_window("Chat",false);int chat=form.create_input_box("");int ok=form.create_button("",true);int cancel=form.create_button("",false,true);form.focus(chat);while(true){wait(1);form.monitor();if(form.is_pressed(cancel)){speak("Canceled");return;}if(form.is_pressed(ok)){if(form.get_text(chat)!=""){net.send_reliable(0,form.get_text(chat),0);return;}else{speak("Canceled");return;Server code:network host;network_event event;void main(){show_game_window("Server");string port=input_box("Port", "What port should the server be on?","4321");host.setup_server(string_to_number(port),10,100);while(tr ue){event=host.request();if(event.type==event_receive){string[] msg=string_split(event.message,"|",true);if(msg[0]=="connect")host.send_reliable(0,event.message,0);if(msg[0]=="who"){string whoms;uint[] peers=host.get_peer_list();if(peers.length>1) whoms=peers.length+" players online";if(peers.length==1) whoms="No players online";host.send_reliable(event.peer_id,"who|"+whoms,0);}if(msg[0]=="dc"){host.send_reliable(0,"dc|"+msg[1],0);host.disconnect_peer(event.peer_id);}}if(key_pressed(KEY_ESCAPE)) {host.destroy();exit();wait(5);}wait(5);}}Thanks in advance! URL: http://forum.audiogames.net/viewtopic.php?pid=304895#p304895 ___ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
Re: Not working server in BGT
2017-01-14
Thread
AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
Re: Not working server in BGT Hello again,I am sending the code, it is only connection, things like chat or other game elements are in next cycle, which I haven't included here, because it is not needed.void connect() {connected=false;host.connect(address,port);timer connecttimer;inttemp=1500;while (connecttimer.elapsed<inttemp) {event=host.request();if (event.type==event_connect) {connected=true;break;}}if (connected) {host.send_reliable(1,"name;"+name,1);} else {alert("connection fail","");start_menu();}//***other code***}Happy codingRastislav URL: https://forum.audiogames.net/viewtopic.php?pid=293285#p293285 ___ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
Re: Not working server in BGT
2017-01-13
Thread
AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
Re: Not working server in BGT Hello again,I am sending the code, it is only connection, things like chat or other game elements are in next cycle, which I haven't included here, because it is not needed.void connect() {connected=false;host.connect(address,port);timer connecttimer;inttemp=1500;while (connecttimer.elapsed<inttemp) {event=host.request();if (event.type==event_connect) {connected=true;break;}}if (connected) {host.send_reliable(1,"name;"+name,1);} else {alert("connection fail","");start_menu();}//***other code***}Happy codingRastislav URL: https://forum.audiogames.net/viewtopic.php?pid=293285#p293285 ___ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
Re: Not working server in BGT
2017-01-13
Thread
AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
Re: Not working server in BGT Hello again,I am sending the code, it is only connection, things like chat or other game elements are in next cycle, which I haven't included here, because it is not needed.void connect() {connected=false;host.connect(address,port);timer connecttimer;inttemp=1500;while (connecttimer.elapsed<inttemp) {event=host.request();if (event.type==event_connect) {connected=true;break;}}if (connected) {host.send_reliable(1,"name;"+name,1);} else {alert("connection fail","");start_menu();}//***other code***}Happy codingRastislav URL: https://forum.audiogames.net/viewtopic.php?pid=293285#p293285 ___ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
Re: Not working server in BGT
2017-01-13
Thread
AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
Re: Not working server in BGT Hello again,I am sending the code, it is only connection, things like chat or other game elements are in next cycle, which I haven't included here, because it is not needed.void connect() {connected=false;host.connect(address,port);timer connecttimer;inttemp=1500;while (connecttimer.elapsed<inttemp) {event=host.request();if (event.type==event_connect) {connected=true;break;}}if (connected) {host.send_reliable(1,"name;"+name,1);} else {alert("connection fail","");start_menu();}//***other code***}Happy codingRastislav URL: https://forum.audiogames.net/viewtopic.php?pid=293285#p293285 ___ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
Re: Not working server in BGT
2017-01-13
Thread
AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
Re: Not working server in BGT Hello again,I am sending the code, it is only connection, things like chat or other game elements are in next cycle, which I haven't included here, because it is not needed.void connect() {connected=false;host.connect(address,port);timer connecttimer;inttemp=1500;while (connecttimer.elapsed<inttemp) {event=host.request();if (event.type==event_connect) {connected=true;break;}}if (connected) {host.send_reliable(1,"name;"+name,1);} else {alert("connection fail","");start_menu();}//***other code***}Happy codingRastislav URL: https://forum.audiogames.net/viewtopic.php?pid=293285#p293285 ___ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
Re: Not working server in BGT
2017-01-13
Thread
AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
Re: Not working server in BGT Hello again,I am sending the code, it is only connection, things like chat or other game elements are in next cycle, which I haven't included here, because it is not needed.void connect() {connected=false;host.connect(address,port);timer connecttimer;inttemp=1500;while (connecttimer.elapsed<inttemp) {event=host.request();if (event.type==event_connect) {connected=true;break;}}if (connected) {host.send_reliable(1,"name;"+name,1);} else {alert("connection fail","");start_menu();}//***other code***}Happy codingRastislav URL: https://forum.audiogames.net/viewtopic.php?pid=293285#p293285 ___ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
Re: Not working server in BGT
2017-01-13
Thread
AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
Re: Not working server in BGT Hello again,I am sending the code, it is only connection, things like chat or other game elements are in next cycle, which I haven't included here, because it is not needed.void connect() {connected=false;host.connect(address,port);timer connecttimer;inttemp=1500;while (connecttimer.elapsed<inttemp) {event=host.request();if (event.type==event_connect) {connected=true;break;}}if (connected) {host.send_reliable(1,"name;"+name,1);} else {alert("connection fail","");start_menu();}//***other code***}Happy codingRastislav URL: https://forum.audiogames.net/viewtopic.php?pid=293285#p293285 ___ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
Re: Not working server in BGT
2017-01-13
Thread
AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
Re: Not working server in BGT Hello again,I am sending the code, it is only connection, things like chat or other game elements are in next cycle, which I haven't included here, because it is not needed.void connect() {connected=false;host.connect(address,port);timer connecttimer;inttemp=1500;while (connecttimer.elapsed<inttemp) {event=host.request();if (event.type==event_connect) {connected=true;break;}}if (connected) {host.send_reliable(1,"name;"+name,1);} else {alert("connection fail","");start_menu();}//***other code***}Happy codingRastislav URL: https://forum.audiogames.net/viewtopic.php?pid=293285#p293285 ___ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
Re: Not working server in BGT
2017-01-13
Thread
AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
Re: Not working server in BGT Hello again,I am sending the code, it is only connection, things like chat or other game elements are in next cycle, which I haven't included here, because it is not needed.void connect() {connected=false;host.connect(address,port);timer connecttimer;inttemp=1500;while (connecttimer.elapsed<inttemp) {event=host.request();if (event.type==event_connect) {connected=true;break;}}if (connected) {host.send_reliable(1,"name;"+name,1);} else {alert("connection fail","");start_menu();}//***other code***}Happy codingRastislav URL: https://forum.audiogames.net/viewtopic.php?pid=293285#p293285 ___ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
Re: Not working server in BGT
2017-01-13
Thread
AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
Re: Not working server in BGT Hello again,I am sending the code, it is only connection, things like chat or other game elements are in next cycle, which I haven't included here, because it is not needed.void connect() {connected=false;host.connect(address,port);timer connecttimer;inttemp=1500;while (connecttimer.elapsed<inttemp) {event=host.request();if (event.type==event_connect) {connected=true;break;}}if (connected) {host.send_reliable(1,"name;"+name,1);} else {alert("connection fail","");start_menu();}//***other code***}Happy codingRastislav URL: https://forum.audiogames.net/viewtopic.php?pid=293285#p293285 ___ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
Re: Not working server in BGT
2017-01-13
Thread
AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
Re: Not working server in BGT Hello again,I am sending the code, it is only connection, things like chat or other game elements are in next cycle, which I haven't included here, because it is not needed.void connect() {connected=false;host.connect(address,port);timer connecttimer;inttemp=1500;while (connecttimer.elapsed<inttemp) {event=host.request();if (event.type==event_connect) {connected=true;break;}}if (connected) {host.send_reliable(1,"name;"+name,1);} else {alert("connection fail","");start_menu();}//***other code***}Happy codingRastislav URL: https://forum.audiogames.net/viewtopic.php?pid=293285#p293285 ___ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
Re: Not working server in BGT
2017-01-13
Thread
AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
Re: Not working server in BGT Hello again,I am sending the code, it is only connection, things like chat or other game elements are in next cycle, which I haven't included here, because it is not needed.void connect() {connected=false;host.connect(address,port);timer connecttimer;inttemp=1500;while (connecttimer.elapsed<inttemp) {event=host.request();if (event.type==event_connect) {connected=true;break;}}if (connected) {host.send_reliable(1,"name;"+name,1);} else {alert("connection fail","");start_menu();}//***other code***}Happy codingRastislav URL: https://forum.audiogames.net/viewtopic.php?pid=293285#p293285 ___ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
Re: Not working server in BGT
2017-01-13
Thread
AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
Re: Not working server in BGT Hello again,I am sending the code, it is only connection, things like chat or other game elements are in next cycle, which I haven't included here, because it is not needed.void connect() {connected=false;host.connect(address,port);timer connecttimer;inttemp=1500;while (connecttimer.elapsed<inttemp) {event=host.request();if (event.type==event_connect) {connected=true;break;}}if (connected) {host.send_reliable(1,"name;"+name,1);} else {alert("connection fail","");start_menu();}//***other code***}Happy codingRastislav URL: https://forum.audiogames.net/viewtopic.php?pid=293285#p293285 ___ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
Re: Not working server in BGT
2017-01-13
Thread
AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
Re: Not working server in BGT Hello again,I am sending the code, it is only connection, things like chat or other game elements are in next cycle, which I haven't included here, because it is not needed.void connect() {connected=false;host.connect(address,port);timer connecttimer;inttemp=1500;while (connecttimer.elapsed<inttemp) {event=host.request();if (event.type==event_connect) {connected=true;break;}}if (connected) {host.send_reliable(1,"name;"+name,1);} else {alert("connection fail","");start_menu();}//***other code***}Happy codingRastislav URL: https://forum.audiogames.net/viewtopic.php?pid=293285#p293285 ___ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
Re: Not working server in BGT
2017-01-13
Thread
AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
Re: Not working server in BGT Hello again,I am sending the code, it is only connection, things like chat or other game elements are in next cycle, which I haven't included here, because it is not needed.void connect() {connected=false;host.connect(address,port);timer connecttimer;inttemp=1500;while (connecttimer.elapsed<inttemp) {event=host.request();if (event.type==event_connect) {connected=true;break;}}if (connected) {host.send_reliable(1,"name;"+name,1);} else {alert("connection fail","");start_menu();}//***other code***}Happy codingRastislav URL: https://forum.audiogames.net/viewtopic.php?pid=293285#p293285 ___ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
Re: Not working server in BGT
2017-01-13
Thread
AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
Re: Not working server in BGT Hello again,I am sending the code, it is only connection, things like chat or other game elements are in next cycle, which I haven't included here, because it is not needed.void connect() {connected=false;host.connect(address,port);timer connecttimer;inttemp=1500;while (connecttimer.elapsed<inttemp) {event=host.request();if (event.type==event_connect) {connected=true;break;}}if (connected) {host.send_reliable(1,"name;"+name,1);} else {alert("connection fail","");start_menu();}//***other code***}Happy codingRastislav URL: https://forum.audiogames.net/viewtopic.php?pid=293285#p293285 ___ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
Re: Not working server in BGT
2017-01-13
Thread
AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
Re: Not working server in BGT Hello again,I am sending the code, it is only connection, things like chat or other game elements are in next cycle, which I haven't included here, because it is not needed.void connect() {connected=false;host.connect(address,port);timer connecttimer;inttemp=1500;while (connecttimer.elapsed<inttemp) {event=host.request();if (event.type==event_connect) {connected=true;break;}}if (connected) {host.send_reliable(1,"name;"+name,1);} else {alert("connection fail","");start_menu();}//***other code***}Happy codingRastislav URL: https://forum.audiogames.net/viewtopic.php?pid=293285#p293285 ___ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
Re: Not working server in BGT
2017-01-13
Thread
AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
Re: Not working server in BGT Hello again,I am sending the code, it is only connection, things like chat or other game elements are in next cycle, which I haven't included here, because it is not needed.void connect() {connected=false;host.connect(address,port);timer connecttimer;inttemp=1500;while (connecttimer.elapsed<inttemp) {event=host.request();if (event.type==event_connect) {connected=true;break;}}if (connected) {host.send_reliable(1,"name;"+name,1);} else {alert("connection fail","");start_menu();}//***other code***}Happy codingRastislav URL: https://forum.audiogames.net/viewtopic.php?pid=293285#p293285 ___ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
Re: Not working server in BGT
2017-01-13
Thread
AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
Re: Not working server in BGT Hello again,I am sending the code, it is only connection, things like chat or other game elements are in next cycle, which I haven't included here, because it is not needed.void connect() {connected=false;host.connect(address,port);timer connecttimer;inttemp=1500;while (connecttimer.elapsed<inttemp) {event=host.request();if (event.type==event_connect) {connected=true;break;}}if (connected) {host.send_reliable(1,"name;"+name,1);} else {alert("connection fail","");start_menu();}//***other code***}Happy codingRastislav URL: https://forum.audiogames.net/viewtopic.php?pid=293285#p293285 ___ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
Re: Not working server in BGT
2017-01-13
Thread
AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
Re: Not working server in BGT Hello again,I am sending the code, it is only connection, things like chat or other game elements are in next cycle, which I haven't included here, because it is not needed.void connect() {connected=false;host.connect(address,port);timer connecttimer;inttemp=1500;while (connecttimer.elapsed<inttemp) {event=host.request();if (event.type==event_connect) {connected=true;break;}}if (connected) {host.send_reliable(1,"name;"+name,1);} else {alert("connection fail","");start_menu();}//***other code***}Happy codingRastislav URL: https://forum.audiogames.net/viewtopic.php?pid=293285#p293285 ___ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
Re: Not working server in BGT
2017-01-13
Thread
AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
Re: Not working server in BGT Hello again,I am sending the code, it is only connection, things like chat or other game elements are in next cycle, which I haven't included here, because it is not needed.void connect() {connected=false;host.connect(address,port);timer connecttimer;inttemp=1500;while (connecttimer.elapsed<inttemp) {event=host.request();if (event.type==event_connect) {connected=true;break;}}if (connected) {host.send_reliable(1,"name;"+name,1);} else {alert("connection fail","");start_menu();}//***other code***}Happy codingRastislav URL: https://forum.audiogames.net/viewtopic.php?pid=293285#p293285 ___ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
Re: Not working server in BGT
2017-01-13
Thread
AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
Re: Not working server in BGT Hello again,I am sending the code, it is only connection, things like chat or other game elements are in next cycle, which I haven't included here, because it is not needed.void connect() {connected=false;host.connect(address,port);timer connecttimer;inttemp=1500;while (connecttimer.elapsed<inttemp) {event=host.request();if (event.type==event_connect) {connected=true;break;}}if (connected) {host.send_reliable(1,"name;"+name,1);} else {alert("connection fail","");start_menu();}//***other code***}Happy codingRastislav URL: https://forum.audiogames.net/viewtopic.php?pid=293285#p293285 ___ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
Re: Not working server in BGT
2017-01-13
Thread
AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
Re: Not working server in BGT Hello again,I am sending the code, it is only connection, things like chat or other game elements are in next cycle, which I haven't included here, because it is not needed.void connect() {connected=false;host.connect(address,port);timer connecttimer;inttemp=1500;while (connecttimer.elapsed<inttemp) {event=host.request();if (event.type==event_connect) {connected=true;break;}}if (connected) {host.send_reliable(1,"name;"+name,1);} else {alert("connection fail","");start_menu();}//***other code***}Happy codingRastislav URL: https://forum.audiogames.net/viewtopic.php?pid=293285#p293285 ___ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
Re: Not working server in BGT
2017-01-13
Thread
AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
Re: Not working server in BGT Hello again,I am sending the code, it is only connection, things like chat or other game elements are in next cycle, which I haven't included here, because it is not needed.void connect() {connected=false;host.connect(address,port);timer connecttimer;inttemp=1500;while (connecttimer.elapsed<inttemp) {event=host.request();if (event.type==event_connect) {connected=true;break;}}if (connected) {host.send_reliable(1,"name;"+name,1);} else {alert("connection fail","");start_menu();}//***other code***}Happy codingRastislav URL: https://forum.audiogames.net/viewtopic.php?pid=293285#p293285 ___ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
Re: Not working server in BGT
2017-01-13
Thread
AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
Re: Not working server in BGT Hello again,I am sending the code, it is only connection, things like chat or other game elements are in next cycle, which I haven't included here, because it is not needed.void connect() {connected=false;host.connect(address,port);timer connecttimer;inttemp=1500;while (connecttimer.elapsed<inttemp) {event=host.request();if (event.type==event_connect) {connected=true;break;}}if (connected) {host.send_reliable(1,"name;"+name,1);} else {alert("connection fail","");start_menu();}//***other code***}Happy codingRastislav URL: https://forum.audiogames.net/viewtopic.php?pid=293285#p293285 ___ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
Re: Not working server in BGT
2017-01-13
Thread
AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
Re: Not working server in BGT Hello again,I am sending the code, it is only connection, things like chat or other game elements are in next cycle, which I haven't included here, because it is not needed.void connect() {connected=false;host.connect(address,port);timer connecttimer;inttemp=1500;while (connecttimer.elapsed<inttemp) {event=host.request();if (event.type==event_connect) {connected=true;break;}}if (connected) {host.send_reliable(1,"name;"+name,1);} else {alert("connection fail","");start_menu();}//***other code***}Happy codingRastislav URL: https://forum.audiogames.net/viewtopic.php?pid=293285#p293285 ___ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
Re: Not working server in BGT
2017-01-13
Thread
AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
Re: Not working server in BGT Hello again,I am sending the code, it is only connection, things like chat or other game elements are in next cycle, which I haven't included here, because it is not needed.void connect() {connected=false;host.connect(address,port);timer connecttimer;inttemp=1500;while (connecttimer.elapsed<inttemp) {event=host.request();if (event.type==event_connect) {connected=true;break;}}if (connected) {host.send_reliable(1,"name;"+name,1);} else {alert("connection fail","");start_menu();}//***other code***}Happy codingRastislav URL: https://forum.audiogames.net/viewtopic.php?pid=293285#p293285 ___ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
Re: Not working server in BGT
2017-01-13
Thread
AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
Re: Not working server in BGT Hello again,I am sending the code, it is only connection, things like chat or other game elements are in next cycle, which I haven't included here, because it is not needed.void connect() {connected=false;host.connect(address,port);timer connecttimer;inttemp=1500;while (connecttimer.elapsed<inttemp) {event=host.request();if (event.type==event_connect) {connected=true;break;}}if (connected) {host.send_reliable(1,"name;"+name,1);} else {alert("connection fail","");start_menu();}//***other code***}Happy codingRastislav URL: https://forum.audiogames.net/viewtopic.php?pid=293285#p293285 ___ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
Re: Not working server in BGT
2017-01-13
Thread
AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
Re: Not working server in BGT Hello again,I am sending the code, it is only connection, things like chat or other game elements are in next cycle, which I haven't included here, because it is not needed.void connect() {connected=false;host.connect(address,port);timer connecttimer;inttemp=1500;while (connecttimer.elapsed<inttemp) {event=host.request();if (event.type==event_connect) {connected=true;break;}}if (connected) {host.send_reliable(1,"name;"+name,1);} else {alert("connection fail","");start_menu();}//***other code***}Happy codingRastislav URL: https://forum.audiogames.net/viewtopic.php?pid=293285#p293285 ___ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
Re: Not working server in BGT
2017-01-13
Thread
AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
Re: Not working server in BGT Hello again,I am sending the code, it is only connection, things like chat or other game elements are in next cycle, which I haven't included here, because it is not needed.void connect() {connected=false;host.connect(address,port);timer connecttimer;inttemp=1500;while (connecttimer.elapsed<inttemp) {event=host.request();if (event.type==event_connect) {connected=true;break;}}if (connected) {host.send_reliable(1,"name;"+name,1);} else {alert("connection fail","");start_menu();}//***other code***}Happy codingRastislav URL: https://forum.audiogames.net/viewtopic.php?pid=293285#p293285 ___ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
Re: Not working server in BGT
2017-01-13
Thread
AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
Re: Not working server in BGT Hello again,I am sending the code, it is only connection, things like chat or other game elements are in next cycle, which I haven't included here, because it is not needed.void connect() {connected=false;host.connect(address,port);timer connecttimer;inttemp=1500;while (connecttimer.elapsed<inttemp) {event=host.request();if (event.type==event_connect) {connected=true;break;}}if (connected) {host.send_reliable(1,"name;"+name,1);} else {alert("connection fail","");start_menu();}//***other code***}Happy codingRastislav URL: https://forum.audiogames.net/viewtopic.php?pid=293285#p293285 ___ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
Re: Not working server in BGT
2017-01-13
Thread
AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
Re: Not working server in BGT Hello again,I am sending the code, it is only connection, things like chat or other game elements are in next cycle, which I haven't included here, because it is not needed.void connect() {connected=false;host.connect(address,port);timer connecttimer;inttemp=1500;while (connecttimer.elapsed<inttemp) {event=host.request();if (event.type==event_connect) {connected=true;break;}}if (connected) {host.send_reliable(1,"name;"+name,1);} else {alert("connection fail","");start_menu();}//***other code***}Happy codingRastislav URL: https://forum.audiogames.net/viewtopic.php?pid=293285#p293285 ___ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
Re: Not working server in BGT
2017-01-10
Thread
AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
Re: Not working server in BGT Hello,I guess the problem is, that you didn't use event_connect. For that reason, what happens is:You start server, server is running. You start game, game is running. you enter multiplayer section, so connect method of network object is called. This object is in other thread, so computer don't must to wait until connection is done, he continuing in the main code. In time about 0 milliseconds computer starts cycle while(true), and see, that he must to set connecting to true, because it is false. So, computer set this variable and send message to the server, that connection is made. Hovever, this message will never arrive to the server, because connection is not established yet. Time needed to go from one command to an other is much smaller than time needed to establish connection, especially if there is need to send data like connected peers, ports, ip addresses etc. I don't know what bgt is sending when establishing connection, but that is not important , time is still larger, so message will not go out.I will send a part of connection algorithm from my game Audioslenderman in next post, you can inspire from it.Hope this helps.Best regardsRastislav URL: https://forum.audiogames.net/viewtopic.php?pid=293284#p293284 ___ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
Re: Not working server in BGT
2017-01-10
Thread
AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
Re: Not working server in BGT Hello again,I am sending the code, it is only connection, things like chat or other game elements are in next cycle, which I haven't included here, because it is not needed.void connect() {connected=false;host.connect(address,port);timer connecttimer;inttemp=1500;while (connecttimer.elapsed<inttemp) {event=host.request();if (event.type==event_connect) {connected=true;break;}}if (connected) {host.send_reliable(1,"name;"+name,1);} else {alert("connection fail","");start_menu();}//***other code***}Happy codingRastislav URL: https://forum.audiogames.net/viewtopic.php?pid=293285#p293285 ___ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
Re: Not working server in BGT
2017-01-10
Thread
AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
Re: Not working server in BGT Hello,I guess the problem is, that you didn't use event_connect. For that reason, what happens is:You start server, server is running. You start game, game is running. you enter multiplayer section, so connect method of network object is called. This object is in other thread, so computer don't must to wait until connection is done, he continuing in the main code. In time about 0 milliseconds computer starts cycle while(true), and see, that he must to set connecting to true, because it is false. So, computer set this variable and send message to the server, that connection is made. Hovever, this message will never arrive to the server, because connection is not established yet. Time needed to go from one command to an other is much smaller than time needed to establish connection, especially if there is need to send data like connected peers, ports, ip addresses etc. I don't know what bgt is sending when establishing connection, but that is not important , time is still larger, so message will not go out.I will send a part of my connection algorithm of audioslenderman in next post, you can inspire from it.Hope this helps.Best regardsRastislav URL: https://forum.audiogames.net/viewtopic.php?pid=293284#p293284 ___ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
Not working server in BGT
Not working server in BGT Hello!Not working server in BGT!Please help me!This is code server:network host;network_event event;void main(){show_game_window("Server");string port=input_box("Port", "What port should the server be on?","4321");host.setup_server(string_to_number(port),10,100);while(true){event=host.request();if(event.type==event_receive){string[] msg=string_split(event.message,"|",true);if(msg[0]=="connect")host.send_reliable(0,event.message,0);if(msg[0]=="who"){string whoms;uint[] peers=host.get_peer_list();if(peers.length>1) whoms=peers.length+" players online";if(peers.length==1) whoms="No players online";host.send_reliable(event.peer_id,"who|"+whoms,0);}if(msg[0]=="dc"){host.send_reliable(0,"dc|"+ms g[1],0);host.disconnect_peer(event.peer_id);}}if(key_pressed(KEY_ESCAPE)) {host.destroy();exit();wait(5);}wait(5);}}and this is code client:#include "form.bgt"#include "includes/logo.bgt"#include "includes/m.bgt"#include "includes/menu.bgt"#include "includes/dlg.bgt"#include "sound_pool.bgt"string[] chat_history;int chat_position;string name="No name";bool connecting;network net;network_event event;void main(){show_game_window("Endless war");set_sound_decryption_key("kids", true);set_sound_storage("sounds.dat");wait(1000);install_keyhook();net.setup_client(10, 100);mainmenu();}void test(){dlgplay("test.wav");}void set_name(){ name=input_box("Enter name","Please enter youre name: ","");mainmenu();}void game(){net.connect("localhost", 4321);connecting=false;while(true){event=net.request();if(connecting==false){net.send_reliable(0,"connect|"+name,0);connecting=true;}if(key_pressed(KEY_F1)){double time=net.get_peer_average_round_trip_time(0);speak("The ping took "+time+" milliseconds.");}if(key_down(KEY_LSHIFT) or key_down(KEY_RSHIFT) and key_pressed(KEY_SLASH))net.send_reliable(0,"/who",0);if(key_pressed(KEY_LBRACKET)){chat_position--;if(chat_position<0)chat_position=0;speak(chat_history[chat_position]);}if(key_pressed(KEY_RBRACKET)){chat_position++;if(chat_position>=chat_history.length)chat_position=(chat_history.length-1);speak(chat_history[chat_position]);}if(key_pressed(KEY_ESCAPE)){speak("Disconnecting");net.send_reliable(0,"dc|"+name,0);net.destroy();mainmenu();}if(event.type==event_disconnect){net.destroy();mainmenu();}if(event.type==event_receive){string[] msg=string_split(event.message,"|",true);if(msg[0]=="chat"){string chmessage=msg[1]+" say: "+msg[2];speak(chmessage);chat_history.insert_last(chmessage);}if(msg[1]=="info")speak(msg[1]);if(msg[0]=="dc")speak(msg[1]+" offline");if(msg[0]=="connect")speak(msg[1]+" online");}}}void chatbox(){audio_form form;form.set_output_mode(active_sr());form.create_window("Chat",false);int chat=form.create_input_box(" t");int ok=form.create_button("",true);int cancel=form.create_button("",false,true);form.focus(chat);while(true){wait(1);form.monitor();if(form.is_pressed(cancel)){speak("Canceled");return;}if(form.is_pressed(ok)){if(form.get_text(chat)!=""){net.send_reliable(0,form.get_text(chat),0);return;}else{speak("Canceled");return;Please help me! URL: https://forum.audiogames.net/viewtopic.php?pid=293109#p293109 ___ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
Re: Not working server in BGT
Re: Not working server in BGT Please help me! URL: https://forum.audiogames.net/viewtopic.php?pid=293218#p293218 ___ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
Re: Not working server in BGT
Re: Not working server in BGT Please help me! URL: http://forum.audiogames.net/viewtopic.php?pid=293218#p293218 ___ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
Not working server in BGT
Not working server in BGT Hello!Not working server in BGT!Please help me!This is code server:network host;network_event event;void main(){show_game_window("Server");string port=input_box("Port", "What port should the server be on?","4321");host.setup_server(string_to_number(port),10,100);while(true){event=host.request();if(event.type==event_receive){string[] msg=string_split(event.message,"|",true);if(msg[0]=="connect")host.send_reliable(0,event.message,0);if(msg[0]=="who"){string whoms;uint[] peers=host.get_peer_list();if(peers.length>1) whoms=peers.length+" players online";if(peers.length==1) whoms="No players online";host.send_reliable(event.peer_id,"who|"+whoms,0);}if(msg[0]=="dc"){host.send_reliable(0,"dc|"+ms g[1],0);host.disconnect_peer(event.peer_id);}}if(key_pressed(KEY_ESCAPE)) {host.destroy();exit();wait(5);}wait(5);}}and this is code client:#include "form.bgt"#include "includes/logo.bgt"#include "includes/m.bgt"#include "includes/menu.bgt"#include "includes/dlg.bgt"#include "sound_pool.bgt"string[] chat_history;int chat_position;string name="No name";bool connecting;network net;network_event event;void main(){show_game_window("Endless war");set_sound_decryption_key("kids", true);set_sound_storage("sounds.dat");wait(1000);install_keyhook();net.setup_client(10, 100);mainmenu();}void test(){dlgplay("test.wav");}void set_name(){ name=input_box("Enter name","Please enter youre name: ","");mainmenu();}void game(){net.connect("localhost", 4321);connecting=false;while(true){event=net.request();if(connecting==false){net.send_reliable(0,"connect|"+name,0);connecting=true;}if(key_pressed(KEY_F1)){double time=net.get_peer_average_round_trip_time(0);speak("The ping took "+time+" milliseconds.");}if(key_down(KEY_LSHIFT) or key_down(KEY_RSHIFT) and key_pressed(KEY_SLASH))net.send_reliable(0,"/who",0);if(key_pressed(KEY_LBRACKET)){chat_position--;if(chat_position<0)chat_position=0;speak(chat_history[chat_position]);}if(key_pressed(KEY_RBRACKET)){chat_position++;if(chat_position>=chat_history.length)chat_position=(chat_history.length-1);speak(chat_history[chat_position]);}if(key_pressed(KEY_ESCAPE)){speak("Disconnecting");net.send_reliable(0,"dc|"+name,0);net.destroy();mainmenu();}if(event.type==event_disconnect){net.destroy();mainmenu();}if(event.type==event_receive){string[] msg=string_split(event.message,"|",true);if(msg[0]=="chat"){string chmessage=msg[1]+" say: "+msg[2];speak(chmessage);chat_history.insert_last(chmessage);}if(msg[1]=="info")speak(msg[1]);if(msg[0]=="dc")speak(msg[1]+" offline");if(msg[0]=="connect")speak(msg[1]+" online");}}}void chatbox(){audio_form form;form.set_output_mode(active_sr());form.create_window("Chat",false);int chat=form.create_input_box(" t");int ok=form.create_button("",true);int cancel=form.create_button("",false,true);form.focus(chat);while(true){wait(1);form.monitor();if(form.is_pressed(cancel)){speak("Canceled");return;}if(form.is_pressed(ok)){if(form.get_text(chat)!=""){net.send_reliable(0,form.get_text(chat),0);return;}else{speak("Canceled");return;Please help me! URL: http://forum.audiogames.net/viewtopic.php?pid=293109#p293109 ___ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector