Architecture

The class architecture of this game is at the current stage quite unclear. The classes are separated but there are no packages yet. And it could do with a good refactoring. That said, some things remain to be said.

Rules

These are rules that the game intend to implement.

General rules

  • [Done] Systemet shows stalkable players outside the stalking radius.
  • [Done] The player chooses which of those to stalk.
  • [Done] The stalked player is notified about the stalking.
  • [Done] When the stalker is within the radius he receives points. At the same time the stalked opponent loses points.
  • [Done] For each two seconds within the radius the stalkers points increases.
  • [Done] For each two seconds within the stalking radius the stalkeds points ar decreased.
  • [Done] The score received/lost is exponential (roughly) to the distance between the players
  • [Done] When the two players move during the gameplay interaction (Stalking mode) their position is updated in realtime. The stalked may not know the stalkers position, only the distance he is at. The stalker on the other hand knows the exact position of the stalked. [In the 1.0 version of the system real time is defined as each 2 seconds].
  • [Done] When the stalked player moves out of the stalkers control radius he gets invisible to the stalker and is considered to have escaped. The stalker then must move outside the "start to play" radius to restart the game.
  • [Not done] If a stalked player turns of the phone, it results in a huge deduction of score.
  • [Done] The handest contacts the server 1 time / minute to update the position as long as the player wnats to be in a playing situation. For each update the player gets a score.
  • [Not done] If the player is not able to update the server it results in a score deduction.
  • [Done] The position of the stalker is not displayed to the stalked person.

The general flow of the game

My aplogies since this is not yet translated from swedish.

General flow chart of the game

Class diagram

It needs refactoring. This class diagram is a mess, as you can clearly see. The image is an SVG file so you can open it in a browser and zoom in on it. Yo din't think I expected you to see what was going on without that?

SVG Class diagram of Stalker