serenobs wrote: > For example, > Ordering troops to attack enemy's territory, how this command maps to > ROA? > If I make troops as resource, which method map to attack? > POST? then there are many other commands to chage its state. > To figure it out, I have to add other query. But I think it's like RPC > style.
If you have to ask... The first issue is there's two kinds of games: - thoughtful turn-based strategy games - thoughtless eye-hand-coordination games You can do the first kind at ordinary HTTP speed (CGI or Ajax hits to a web server). The second kind requires an out-of-band server connection, for higher speed reflexes, and it requires much more processing inside the user's browser. Here's an example of the first kind: http://64squar.es/ . It's chess. Use Flash for the second kind - that makes it essentially Not a Rails Problem. The next issue is: To create either game you need to build a game engine. That's one of the hardest tasks in programming. The engine must be... - efficient - secure - smart - object-oriented - event-driven - configurable - autonomous - synchronized. To play against the computer you need AI, and to play against another human you need a perfect data bus that provides exactly the same details, simultaneously, at both ends of the wire. To map all that onto REST, let's say you have player records and faction records. One division of an army is a player belonging to a faction. To attack, you send a POST containing an "intent" variable containing "attack", and a "target" containing the player id of the defender. But you can see that these design details are trivial once you have all the hard parts in place! -- Phlip --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

