Last time , I gave an outline of our Facebook game : now I’m going to take a look at the “game engine.” The game logic is pretty straightforward: Player one initiates a game by selecting an opponent and specifying the five allocations Player two responds to the game by submitting his/her five allocations Calculate game outcome, update score data There are other choices that could have been made, such as player one (P1) firing the game off into the system without specifying an opponent, and be matched with someone automatically – in fact, we really wanted to have both options available, but implemented the one above first, mainly so that people would invite their friends to play to help build up our user base. I’ll talk about P2′s response message first. The information coming from the user will be the identifier for the game being played, the identifier for the player making the move, and the five allocations
View original post here:
The core of the game service