Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Carldon King
iOS Development Techdegree Student 5,651 PointsMultiplayer networking options for iOS (detailed question)
I'm facing a challenge in a app I am trying to create and it seems to be hard to find information to help. The information is either outdated (tutorials/guides show objective-c type code instead of swift) or is seemingly too limited or possibly too complex.
I am developing a game for iOS that will involve 4 - 16 players. First thing that needs to be understood, is that although I use the term "game", I am not referring to game in the sense of a interactive app that you respond to in real-time, reacting to events while simultaneously creating events. The game that I am creating is more of a social mind game that uses the iOS device to take input from the players, perform logic on the data received, and update the players' devices with the necessary information for each player. I wanted to make the distinction just in case someone knows, for example, a convenient way to transfer simple information between devices but maybe not game data, or something similar.
I have done quite a bit of research on the topic and I've come to the conclusion that my options are limited to Multipeer Connectivity and Game Center. To my knowledge, Multipeer connectivity only allows for networking for up to 4 devices, but I am inclined to believe that I may be able to create a ring network network in which any one device will be connected to a maximum of two devices at a time, completing a circle in which to pass information around. With game center (ignoring the peer-to-peer 4 player max option) I have the option of hosting the game on my own server for up to 16 people (which would require the learning of more technology) or making the game turn-based (which so far seems like my best option).
In closing, I just need assistance with or just to be pointed in the right direction to be able to grasp this seemingly simple concept. I just need multiple devices, up to 16, to be able to connect in some way, whether it be directly (via wi-fi, the internet, bluetooth, etc.), indirectly (all connecting to some central device that receives and transmits packet data), or any way. I'm really trying to avoid making it a single device app and having them pass it around the room. Like I said, worse case scenario, I'll make it turn-based, but it's kinda like playing chess with someone sitting next to you, and you have to make a move, and the app kind of says, "Ok, we'll notify you when it's your turn", and you'll know it's your turn before the app even does.
Any help, big or small, is appreciated.