Design and Development of a Mobile City Game

Design and Development of a Mobile City Game

UNIVERSITY OF PATRAS DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING ELECTRONICS AND COMPUTERS FIELD DESIGN AND DEVELOPMENT OF A MOBILE CITY GAME CITYSCRABBLE DIPLOMA THESIS OF MARCO ANTONIO MUÑOZ ALONSO STUDENT OF THE UNIVERSIDAD DE VALLADOLID SUPERVISOR: PROF. N. AVOURIS PATRAS JULY 2012 2 CERTIFICATION It is certified that diploma thesis with the title: DESIGN AND DEVELOPMENT OF A LOCATION AWARE GAME BASED ON THE ANDROID PLATFORM Of the sudent of the University of Valladolid Muñoz Alonso Marco Antonio__________________________ (Surnames) (Name) Was presented in public at the department of Electrical and Computer Engineering of the University of Patras, Greece on July 13. The supervisor The head of the electronics and computers division 3 4 First of all, especial thanks to Christos Sintoris for his support and guide every day during the last six months. I learned a lot with him and without his effort and dedication have not been possible to complete the project. Thanks also to all the people that were working with me in department. In Particular, Ruben Llorente and Hector Fadrique, Erasmus students from University of Valladolid for all the time that we spent together working in the lab. I would like to thank all my Greek friends and Erasmus people, and most specialty to the people who attended the evaluation session and therefore have worked directly with the project. I want also to thank Professor Nikolaos Avouris (my Erasmus coordinator in Patra) for bring me this interesting project. Finally I would like thank my family, especially to my parents and my brother, for his motivation every day from Spain. 5 6 Contens Abstract ............................................................................................................................. 11 CHAPTER 1: Design .................................................................................................................. 12 Application Architecture ..................................................................................................... 13 Activities .......................................................................................................................... 14 Application Class .............................................................................................................. 14 XMPP Service ................................................................................................................... 14 XMPP Server .................................................................................................................... 14 Working example ............................................................................................................. 14 Interface .............................................................................................................................. 15 First design ....................................................................................................................... 15 Final design .......................................................................................................................... 16 Topic Screen .................................................................................................................... 16 Topic Activity Screen ....................................................................................................... 17 QR Button ........................................................................................................................ 17 GEO Button ...................................................................................................................... 17 Lock Button ...................................................................................................................... 17 CHAPTER 2: The protocol ........................................................................................................ 18 XMPP ................................................................................................................................... 18 History ................................................................................................................................. 18 Why XMPP? ......................................................................................................................... 19 Disadvantages ...................................................................................................................... 20 How works XMPP? ............................................................................................................... 20 Smack................................................................................................................................... 21 Working with Smack libraries .......................................................................................... 22 Creating a Connection ..................................................................................................... 22 Connect and disconnect .................................................................................................. 23 Messaging using Chats .................................................................................................... 23 Packet Properties............................................................................................................. 25 XML Format ..................................................................................................................... 26 Multi User Chat ................................................................................................................ 26 Join a room ...................................................................................................................... 27 CHAPTER 3: First Prototype ..................................................................................................... 29 Introduction ......................................................................................................................... 29 7 Architecture ......................................................................................................................... 29 XML structure ...................................................................................................................... 30 Scanning an Exhibit .............................................................................................................. 30 Processing incoming messages ........................................................................................... 31 CHAPTER 4: Development and implementation ..................................................................... 33 Elements .............................................................................................................................. 33 How to play ......................................................................................................................... 34 New Features ................................................................................................................... 36 Flow Chart ......................................................................................................................... 37 The Java Code ...................................................................................................................... 38 XMPP Service ................................................................................................................... 38 Sending a message .......................................................................................................... 39 Emulating a server for debugging: Google Talk ............................................................... 40 Processing a message from the server ............................................................................ 41 Login .................................................................................................................................... 42 Dialogs ................................................................................................................................. 43 Prompt Dialog .................................................................................................................. 43 Progress Dialog ................................................................................................................ 44 Toast .................................................................................................................................... 45 New Toggle Button .............................................................................................................. 46 The XML Code ................................................................................................................... 47 Changes in the XML code .................................................................................................... 48 Problems fixed ..................................................................................................................... 49 Double association problem ............................................................................................ 49 Unlocking a single Exhibit using QR codes ...................................................................... 50 Not internet connection problem ................................................................................... 51 Scores .............................................................................................................................. 51 Green squares bug ..........................................................................................................

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    107 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us