iDevGames Forums
Simple Network Play - Printable Version

+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Game Programming Fundamentals (/forum-7.html)
+--- Thread: Simple Network Play (/thread-9232.html)



Simple Network Play - wquist - Aug 2, 2011 03:35 PM

Hi,

I'm trying to add simple multiplayer to my game. It's pretty basic, mainly I want to communicate each player's mouse position, along with some statuses. I've looked into TCP with Twisted, but I don't know if that is the best choice for a real-time game. Also, I've looked at some Apple sample code, but I think I'm missing something... For example, in the 'CocoaEcho' sample, there is the app delegate, and then a server class. What do you do with the server class? I've noticed in the 'build' folder, there is also a UNIX executable. Does this go on a web server? It would be great if someone could explain what to do with client/server classes, or what the best way to make a game like this would be.

Thanks Smile


RE: Simple Network Play - PoseMotion - Sep 2, 2011 09:07 PM

The server can be initiated by who ever is hosting. Then the client can connect by ip, which is the simplest method. But your game should have both server and client built in. The the user decides if he or she wants to host or connect to another host. I hope that helps. Wink