Author Topic: question  (Read 4886 times)

bravery

  • Guest
question
« on: July 19, 2013, 12:20:14 PM »
Hi Aren,First this looks interesting, but excuse my limitted knowledge about the networking.My question is: if I want to build an online network games like for example "Perfect Kick" game where you enter the game and you automatically get connected to a game server (no need to enter any information other than your name), and then you can start challanging any person avalible there, so can this be achived with TNet and if yes please elaborate on how to ahcive that?Thanks in advance.

pyscho2day

  • Jr. Member
  • **
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 74
    • View Profile
Re: question
« Reply #1 on: July 19, 2013, 01:56:54 PM »
Yes it can be done, in fact that is what I have been working on in my spare time. 

Once its done and Aren doesn't mind I will post it so that other can use. In my learning I saw a bunch of questions but no solutions so I hope it will help others.

bravery

  • Guest
Re: question
« Reply #2 on: July 19, 2013, 04:03:20 PM »
Can you elaborate on how we can do that?

I heard that you can use amazon cloud services?

Can anyoone elaborate  on this?

pyscho2day

  • Jr. Member
  • **
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 74
    • View Profile
Re: question
« Reply #3 on: July 19, 2013, 04:34:45 PM »
Yes it can.  Currently i am running a server on a Amazon AWS EC2 server. Just the basic free setup.  All I am using that for is a TCP lobby server. (TNServer.exe -name "Test Server" -tcpLobby 5127)

I use that to keep track of all server running.  and if my game takes off may try and get one on the other coast and over seas, but to be honest not needed as the game will always connect to a close server.

so the steps are

1. get the server list from master server
2. go through the list and look for an open game
3. connect to server to get ping time then disconnect
4a. if server count was ok and ping was ok then stop looking for a server and full on connect to the server and join the initial channel.
4b. if no suitable server are found start my own server.
5. win


As for the amazon stuff go to http://aws.amazon.com/ and setup a free account.  This took me an hour or so to do but that is because i was reading alot of stuff and seeing what all is available and what not to do so i don't start getting charged.

Once you are remoted in, set up the TNServer as a lobby server, and make sure to add a firewall rule for the port(s) you are using.

Then in unity set up a basic scene that can connect to the server and go from there.

A key thing i found out today though is that with TNET out of the box you can only have 1 open connection. You have to create a new file mimicking TNManager to connect to a second server.

I hope this makes sense and once i am done with my file and its ok with Aren ill post it up here for other people. I just need to clean it up, comment it better, test it some more, and get a license on it.

pyscho2day

  • Jr. Member
  • **
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 74
    • View Profile
Re: question
« Reply #4 on: July 21, 2013, 06:48:34 PM »
@bravery

File is attached to this thread.

http://www.tasharen.com/forum/index.php?topic=5089.0