Upgrade to Pro — share decks privately, control downloads, hide ads and more …

AmbiScrabble Game for the iPhone

AmbiScrabble Game for the iPhone

Nick De Cooman

May 13, 2013
Tweet

More Decks by Nick De Cooman

Other Decks in Programming

Transcript

  1. Project proposal Create a decentralised distributed version of a Scrabble-like

    game. • Context: research at SOFT lab about how to provide linguistic symbiosis between Objective-C and MacScheme 2 Objective-C Object-oriented Support Cocoa API’s MacScheme Macro system Higher order functions
  2. 3 AmbiScrabble • Players are organised in teams and work

    collaboratively to form words. • Team players can see and request each otherʼs letters. • When player submits a word, half of the letters are thrown to random opposite team player. • The team that first consumes all its letters wins A decentralised distributed version of a Scrabble-like game. A M P F Z R F Z R A M P
  3. Game initialization 5 1. Wrap remote reference of discovered player

    with additional player information 2. Join or create team 3. Publish player in network 4. Generate rack of letters 5. Exchange rack of letters with all team players
  4. Fault-tolerance 6 Detecting Disconnections Application disconnection Due to application exit

    Other player are notified 1 1 Hardware disconnection Network failure between players Simulate disconnections • No MacScheme support yet.
  5. Fault-tolerance 7 Handling disconnection 1 2 Handling reconnections 1 3

    Initially, a disconnection is considered to be temporary Disconnection is permanent player Reconnection? NO YES Lookup disconnection status Synchronize playerʼs rack if temporary Report exclusion if permanent
  6. Fault-tolerance 8 Message delivery 1 4 Messages can only be

    sent iff both payers are connected. • Extented remote-send construct • What if disconnection is not (yet) detected?
  7. Game state maintenance 10 1 1 Form words Two preconditions

    must succeed: 1. Word has to be valid 2. Word should be consumed by throwing half of the letters to random opposite team player. • Note that more than 1 team should exist! • Avoid inconsistencies
  8. Make request by selecting letter in rack of team player.

    Process request via queue to buffer all incomming requests Game state maintenance 11 1 2 Exchange letters L S K S TIMER TIMER TIMER TIMER
  9. Game termination 12 Team wins game • All players in

    certain team do not have letters anymore • All players in certain team are connected. • Broadcast termination to all players • Go offline • What with temporary disconnected players?
  10. Conclusion 13 ✓ This project meets all requirements! Improvements possible

    on • Game termination • Buffer remote message during disconnection