Implementation of a GPS-based Android Game

Master Thesis at ifp - Sreeraj Thamarappilly

Sreeraj Thamarappilly

Implementation of a GPS-based Android Game

Duration of the Thesis: 6 months
Completion: May 2017
Supervisors: Dr.-Ing. Volker Walter
Examiner: Prof. Dr.-Ing. Uwe Sörgel


 

Introduction

The aim of this thesis is to develop a GPS-based Pong-styled Android Game. We are currently seeing the exploding of adoption of the Mobile devices. Of all the Mobile applications, Mobile Games, particularly in the case of Android Games, are emerging as the hottest segment. Comparing to the other Mobile platforms, the unparalleled freedom of Android and its flexibility is making it as a great platform for developers. The main motivation for doing this thesis is to learn the basic concepts of Java programming, and then it was followed by understanding the Android Environment and the principles behind the Design of the Game. By making use of the Google Maps, GPS locations of the user and particular objectives in this Pong game, it is possible to make the progression and achievements feel more palpable. By considering the Single Player and Multi Player game modes; and also the 3 difficulty levels namely Amateur, World Class and Professional; the hope is that the output of this Android application will be satisfying to a certain degree. With Wi-Fi or Internet connection, Multi Player Game mode of this Game application is implemented by using Socket Programming using Transmission Control Protocol for establishing the Client-Server Connection and used I/O streams for their consistent Communication. This Android Game Application with the user-friendly Interface is expected to help in the development of more innovative, vibrant GPS location-based and Geocaching Android games.

Objectives

  1. To develop a user friendly Interface for the Android Game development using Java programming in Android Studio IDE.
  2. To access the current location and to enable the location update of the user using Google Maps API.
  3. To execute Google Maps functionality on the Map View with the Location Coordinates of the Playground border selected by the user in order to get a perfect rectangle for fixing it as the background screen for the Game session.
  4. To enable both the Single Player and Multi Player modes for this Android Game.
  5. To implement the Game according to the 3 different difficulty levels namely Amateur, Professional and World class levels which are classified mainly according to the speed at which the Game runs.
  6. To establish the Connection of the 2 Players to the Server in the case of a Multi Player Game session and to perfectly implement the consistent Communication between them.
  7. To make this Android Game to obey all the basic rules of a conventional Pong Game, and to find the winner of the Game session on the basis of scores obtained by the players.

Methodology

Figure 1. Flow Chart of Methodology.

Figure 1 illustrates the methodology adopted for the development of this Android Game Application. When we start this Android Application, we can get current Location of User in Google Maps by using Google Maps API for Android enabled from Google Developer Console. Then User has to set a playground with minimum area of that of a football ground with length of 100 m and width of 70 m. This playground will be fixed as the background for Pong Game session. In Multi Player Game mode, Client-Server Connection is implemented by Socket programming by using TCP and then their Communication is established by using I/O Streams. Both Clients have to enter the same 4 digit Security Code so that they can play the same Game session. So, by executing this methodology, it is possible to implement an excellent user-friendly Android Game Application.

Results

Conclusions and Future Works

The following conclusions are arrived after the successful completion of this thesis work.

  • Implementation of the User Interface (UI) for this Android Game development using Java programming in Android Studio is completed successfully.
  • Enabled the different Application Programming Interface (API) in the Google Developer Console for accessing Google Maps.
  • Located the current GPS Location of the User in the Google Maps and the User Location is changing as the User moves from one position to another.
  • Executed the Google Maps functionality for the Map View in order to get a perfect rectangle border for fixing the playground border location coordinates selected by the user as background screen for the game.
  • Successfully enabled both the Single Player and Multi Player Game Modes for this Android application.
  • Implemented the Game according to the 3 different Difficulty Levels namely Amateur, Professional and World class levels which are classified mainly according to the Game Speed.
  • Established the Client-Server Connection and Communication during the Multi Player game session.
  • Made this Android game to obey all the basic rules of a conventional Pong Game.

Thus, the main objectives of this thesis is successfully implemented and the final output of this Android game development is a user-friendly Interface of this GPS-based Pong-styled Android Game.

For the future works, it is highly recommended to solve the Game design and software development issues by considering the unpredictable nature of GPS-based Android Games. There are Hardware limitations since this game rely highly on the accessing of GPS Location and Data Connection in the Android phone. The information issues related to the availability and suitability of the Location, the problems related to the Fitness and Pace of the Player playing this real world Android Game, and Data Protection issues of the Player have to be addressed in the future GPS-based Android Game developments. Accuracy of the GPS Location accessed via the Google Maps has to be improved considerably. Also, the Client-Server Communication has to be more consistent in order to smoothly run a Multi Player Game session. Moreover, the accuracy of the controlling of the paddle by the User has to be improved because sometimes the paddle is not so accurately moving as per the movement of the Player in the playground during the Game session because of the issues related to delay in GPS signals, which automatically reduces the quality of the performance of this Android Game. For solving this problem, new and better functionalities have to be developed which reduces these errors and maximizes the GPS accuracy in the future works. Also, another limitation of this Android application is that the size of the playground which is selected by the User must atleast has an area of a football ground with a length of 100 m and a width of 70 m. By considering the visibility of the ball and paddles in the day light and in the night, the UI of the Game can be improved, especially by enabling the options to select different Size and Colours for the ball and paddles. Even though this Android application is working reasonably well, it is necessary to solve the problem of delay of few seconds in the paddle movement during the game session. Even if this delay of few seconds in the paddle movement is occurring only on few game sessions because of the issues with GPS signals, this will certainly decrease the playability and overall performance of the Game session. It is highly recommended to develop an excellent Java Framework for this GPS-based Pong-styled Android Game which can perfectly tackle all these issues. Overall, I and my friends had some good experiences whenever we tested the proper working of this Android application.

Bibliography

Gassner, D. (2013). Building Mobile Apps with Google Maps Android API v2. Retrieved on 29 December 2016 from https://www.lynda.com/Android-tutorials/Building-Mobile-Apps-Google-Maps-Android-API-v2/133347-2.html

Google Maps APIs. Retrieved on 30 December 2016 from https://developers.google.com/maps/documentation/

Mario Zechner and Robert Green (2012). Beginning Android Games. 2nd Edition. Apress, US, Pages 107-191. Retrieved on 29 December 2016 from http://pdf.th7.cn/down/files/1312/beginning_android_games_2nd_edition.pdf

Mian Badar and Thakrar Nikhil (2013). Development Guidelines for Mobile Multiplayer Games. KTH Computer Science and Communication, Stockholm, Sweden, Pages 7-11. Retrieved on 30 December 2016 from http://www.csc.kth.se/utbildning/kth/kurser/DD143X/dkand13/Group1Vahid/report/Mian,%20Baddar%20&%20Thakrar,%20Nikhil.pdf

Wikipedia, the free encyclopedia (2016). Pong. Retrieved on 20 December 2016 from https://en.wikipedia.org/wiki/Pong

G. Administration Part

In Administration part, there are some facilities which are provided for the administrator to check the list of the user, create new user, and geo statistical data report. The administration part can be seen in figure 11 and 12 below.

Figure 11: Admin pages for administrator
Figure 12: Statistical report for land tenure type

Conclusions

  • There is a growing need of WebGIS cadastral/land information as a tool for legal, administrative, economic and decision making.
  • QGIS, GeoServer, PostgreSQL/PostGIS, LeafletJS work optimal for developing WebGIS application
  • Leaflet provides a lot of Plugins (GIS power)
  • Interactive map application is the key of Cadastral web application
  • Spatial analysis tools is a power of WebGIS
  • Security login is needed since the data is sensitive

Ansprechpartner

Dieses Bild zeigt Volker Walter

Volker Walter

Dr.-Ing.

Gruppenleiter Geoinformatik

Zum Seitenanfang