Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What technology would you use to communicate between a two-player,turn-based, board game (like checkers or Othello) running native on iOS, and a remote game server

The remote game server is just the artificial intelligence portion of the computer player and it is coded in Lua.

share|improve this question

One option is Websockets.

There's a Lua Websocket server. I'm pretty sure iOS will be able to communicate with that (at least with regular sockets)

share|improve this answer
Why would you use websockets for a native app and a server? Just use real sockets. – coderanger Jan 29 '11 at 1:29
because websockets are firewall-friendlier. – egarcia Jan 29 '11 at 2:19
How exactly is that the case? If you mean HTTP is usually allowed as an outbound port, then you can just run anything on port 80 (and usually 443) and be fine. If you mean that HTTP is usually allowed through protocol inspection, then that doesn't apply to websockets anyway. Websockets are a hack to create a highly restricted TCP-stream-like API for browsers that no one uses (indeed Firefox recently disabled it due to major security issues). – coderanger Jan 29 '11 at 3:52
I didn't know about the security issue you mentioned. Thanks. I wouldn't call them a "hack" though. I can't answer the rest of your questions here. I'd suggest creating a question in Stack Overflow. – egarcia Jan 29 '11 at 18:34

ZeroMQ is a great layer for taking care of the actual transport and has bindings available for both C# and Lua. For the actual messaging I would probably use either Protocol Buffers (again, available for both langs) or simply use JSON strings (available for everything ever).

share|improve this answer
I checked Protocol Buffers and there's no Lua implementation. – Tokyo Dan Mar 16 '11 at 9:23
1 – coderanger Mar 16 '11 at 14:26

For a turn-based board game? I would use typical REST programming and make it act like a website, with the server taking in POST or GET requests and returning information back. I wouldn't even bother with sockets unless it was closer to being real-time.

See this answer for more information.

share|improve this answer
It's bad style to have "EDIT:" parts of your post, since whilst you're editing you can just integrate the amendment with your post itself. This isn't like forums, where you need to preserve what was originally stated, since on Stack Exchange people can see the post's edit history. – doppelgreener Oct 28 '12 at 0:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.