Author Topic: Question about cross-platform networking  (Read 3293 times)

Chenoso

  • Guest
Question about cross-platform networking
« on: June 04, 2013, 12:26:22 PM »
Hello,

Before i buy the package i have a question about cross-platform networking.

I want to develop a turn-based card game with 2 - 5 players playing simultaneously either on an iOS or Android device.
First i want to attempt doing it offline, so only local connection can be used (Wi-fi on the same router).

My questions:
Will TNet work for this?
If yes, how TNet hosts a server on a mobile device? Does it create one automatically? Will the players need to setup a server before playing together?

Thanks in advance!

SketchWork

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 44
    • View Profile
Re: Question about cross-platform networking
« Reply #1 on: June 04, 2013, 04:37:34 PM »
Hi Chenoso,

This is easily accomplished.  You can add 2-5 or more players playing at the same time with iOS, Android or any other Unity supported platform.  You can even have a mixture of platforms playing the same game.

Yes, you can code it to use only the local network for testing if you wanted.

You can host the game in a few different ways.

1)  Run the server app on a PC/Mac and have your mobile devices connect to it.
2)  Code your game to create a server on the mobile device to host your game if one isn't already running on another device.

It is really up to you how you want to run with it.  It is very powerful.

Justin

Chenoso

  • Guest
Re: Question about cross-platform networking
« Reply #2 on: June 05, 2013, 10:13:19 AM »
Hey Sketch, thanks for replying!

It seems i will be working with this package for sure.
On your 2) answer, is this difficult to do or it is somehow already "included"? As i don't have it yet i can't look for answers like this :(

[]'s

SketchWork

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 44
    • View Profile
Re: Question about cross-platform networking
« Reply #3 on: June 05, 2013, 12:05:43 PM »
It's very easy.  One of the included examples shows you how to create a server on the machine or mobile device and then how to connect to it.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Question about cross-platform networking
« Reply #4 on: June 06, 2013, 07:11:36 AM »
The TNet version of this -- http://www.tasharen.com/forum/index.php?topic=4506.0 -- would actually be an excellent starting point as it already takes care of all the basic UI/networking logic of an iOS/Android game. It's not available yet though. Asset Store approval process is lagging, it seems.