ios - What is the best approach to build a real-time, turn-based iPhone game with Rails as backend? -
so want build iphone game, real-time , turn-based, back-end implemented in rails.
the game flow following:
player , player b queue match. server match these 2 players match turn-based.
when match starts, player waits while player b entering action, , player b waits while player entering action.
the game ends after 5 or 6 turns.
what planning use "devise" user authentication, , restful api. ios game client keep sending request server , ask if opponent has finish his/her moves or not.
is approach correct kind of application? first time use rails build app, not sure approach should used. , there far many libraries or tools choose from.
and if use restful api, how can send request
- has_opponent (when queueing match)
- take_actions?actions={...} (submitting user actions @ end of each turn)
any suggestion? thanks!
i can't speak game-design aspects of question, far restful api, try like:
get /available-opponents?ratingmin=xx&ratingmax=yy post /actions { "userid": "bob", "gameid": 231, "actiontype": "stinglikeabee", ... } the verb in uri should http verb: get, post, put, delete, etc.
Comments
Post a Comment