Re: bgt, assigning players in online games

2019-07-01 Thread AudioGames . net Forum — Developers room : NicklasMCHD via Audiogames-reflector


  


Re: bgt, assigning players in online games

Hi.Well for assigning players for when they connect, you have the connect event in bgts manual.I don't really remember the syntax, but it should go something like this (asuming that you're taking care of logins and such):c* client try to connect to your server.* server receives the connection in the connect event.* take the peer_id from that connect_event (which is unique to each connection).* Create your player class with that peer_id, like p = Player(peer_id)* then add that to a global list, so you can get it later.That's the just of it.Hope it helps 

URL: https://forum.audiogames.net/post/445486/#p445486




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


bgt, assigning players in online games

2019-07-01 Thread AudioGames . net Forum — Developers room : Zarvox via Audiogames-reflector


  


bgt, assigning players in online games

SO there are 2 things that I am talking about. The first is assigning players as they join the server. I don't know how to do that. The second is telling who's turn it is. I have the second part down, here is what I did.int play=0;players[play].turn=true;this means it is player 0's turn. Player 0 takes their turn.players[play].turn=false;play+=1;players[play].turn=true;now it is player 1's turn. And the cycle continues. TO wrap back to player 0, if(play>maxplay)play=0;Is this a good turn system? It works, but is there a better way? And how do I assign players when they first get connected?

URL: https://forum.audiogames.net/post/445460/#p445460




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector