gcontroller

Upload: rushabh

Post on 25-Feb-2018

216 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/25/2019 GController

    1/4

    GCONTROLLERANDROID BASEDAPPLICATION TO CONTROL PC GAMES

    Roshan Shetty

    Computer Engineering

    Thakur College ofEngineering and Technology

    Mumbai, India

    [email protected]

    om

    Rushabh Parekh

    Computer Engineering

    Thakur College ofEngineering and Technology

    Mumbai, India

    [email protected]

    Satyam Pandit

    Computer Engineering

    Thakur College ofEngineering and Technology

    Mumbai, India

    [email protected]

    m

    Mrs.Sheetal Rathi

    Computer Engineering

    Thakur College ofEngineering and Technology

    Mumbai, India

    sheetal.rathi@thakured

    ucation.org

    Abstract Latest generation smartphones have become very

    popular among the general public. These smartphones provide

    a high degree of integration, attractive user interface andamazing features. We are creating an android based

    application GController, which will emulate the physical

    game controller on an Android smartphone. This will help the

    game players eliminate the cost of buying a physical game

    controller. The application will provide a user friendly and

    attractive user interface. The application will work for all the

    android phones having version 2.3(Gingerbread) or higher.

    Communication between the android client and the personal

    computer server will be achieved using socket programming

    via the medium of Wi-Fi. The paper discusses about the

    designing and implementation of the android application,

    desktop application and the communication between the two.

    Keywords- Smartphone; Android; Emulator; Mobile-PCCommunication;

    I.

    INTRODUCTIONThe field of mobile phones has evolved immensely and

    has become an integral part of our lives. The growth inmobile sector has resulted in major investment in mobileapplication development. In [1], it has been mentioned thatsmartphones are produced with various features such as G-sensors, speakers, microphones, touch screen, camera alongwith basic communication functionalities. The prices ofthese smartphones vary depending upon the features theyprovide.

    The growth of mobile phone industry has been phenomenal.

    [2] mentions that the growth of Android operating system

    has been remarkable. It had a worldwide smartphone market

    share of 68% at the second quarter of 2012. As of Q3 2012,

    there were 500 million android devices activated and 1.3

    million activations per day. Android has become the world's

    leading smartphone platform.

    Another sector that has witnessed substantial growth is the

    gaming sector as mentioned in [3]. Forecasts suggest that

    the global market for video games is expected to grow from

    $67 billion in 2012 to $82 billion in 2017.

    The excellent graphics quality of todays games is no longer

    a novelty. As a result, game developers and designers have

    started to look for new ways to attract and entertain players.

    One recent trend is to provide new forms of interaction,

    replacing the traditional joystick for more elaborate devices,

    such as dance pads, guitars, drums, pointing devices, etc.

    Though they are appealing, such devices are usually very

    expensive and hence cannot be afforded by the common

    gamer.

    It is clear that there is a need for providing new and

    innovative approaches to gaming that will not only attract

    new users but also help retain the current base of gamers.

    This paper proposes a synergy of game controller and an

    Android powered device that enables a user to use the

    device as a wireless game controller for desktop games. The

    connection between the PC and the device will be

    implemented using Wi-Fi technology.

    Playing a computer game requires few basic devices like

    mouse, keyboard, game controller, speakers or headphones

    etc. This has been the traditional way of playing a computer

    game till date. Here, we have tried to alter this traditionalapproach by introducing a smartphone into this scenario.

    Our aim is to replace the traditional physical game

    controller with an android smartphone. This will provide an

    altogether new experience in playing computer based

    games.

    II.MOTIVATIONThe gaming industry promotes the research of new ways

    through which a user can interact with the game. The

  • 7/25/2019 GController

    2/4

    gamepad or the physical game controllers as shown in the

    figure have been popular since a long time. However, their

    enhancement in terms of performance and user adaptability

    has reached saturation.

    Fig: 2.1. Logitech F510 Gamepad

    At the same time, new ways of interaction have been

    developed which allow a user to control games through

    body movements. However, they are bound to other

    hardware devices such as the console. Such consoles and thecontrol devices are highly expensive and difficult to

    maintain.

    Using a smartphone to control a desktop game makes use of

    the highly developed games and the various abilities of

    smartphones. It allows a user an affordable alternative as

    compared to physical controllers and other game control

    devices. The application will enable the user a rich gaming

    experience using common devices and minimal software.

    III. LITERATURE SURVEYWei-Chin Huang, in [1] came up with a new idea of using a

    smartphone as a game controller. Since the smartphones

    have become very popular among the general public, the

    computer users can interact with a computer via a smart

    phone using various sensors, touch pad, and screen of a

    smart phone .We have used this idea in our project and

    propelled it to a new level which will provide a very

    systematic, attractive and user friendly interface to the user.

    Silvano Maneck Malfatti, in [3] presents a multiplatform

    architecture to support the design and implementation of

    desktop multiplayer games controlled by mobile phones

    with Bluetooth capability. Since the Bluetooth is an ad-hoc

    connection, playing desktop games controlled by mobile

    phones resulted in few drawbacks. Game players

    experienced time lag which adversely affected the gaming

    experience. Thus, we have come up with a new approach,

    i.e. the infrastructure communication. This approach

    overcomes the above drawback. Gamers can now play

    games with a negligible time lag.

    Jianye Liu, in [4] gave an introduction of Android platform

    and the features of Android applications. This paper

    provided guidance while understanding the mechanism of

    Android applications and helped us to develop applications

    on Android platform. This paper has acted as a foundation

    step in our project. Most of the concepts on Android have

    been understood here.

    Benjamin Speckmann, in [5] has introduced a new mobile

    platform named Android. He has given a comparative

    evaluation of the Android and other mobile operating

    systems like Symbian OS. The paper has also compared the

    Software Development Kit (SDK) of Android platform and

    Symbian OS. We can clearly understand the advancement

    of this mobile platform and its user friendliness when we

    compare it with the other operating systems.

    Dao-Yuan Shan, Choon-Sung Nam, Dong-Ryeol Shin , in

    [6] have researched that nowadays Smartphones are not

    only restricted to calling services, but they can be also used

    as an intelligent pocket personal computer. The immense

    quantity of quality features which the Smartphones provide

    have enabled them to think upon making a Smartphone as a

    virtual joy pad which can control playing games on thedesktop. We have referred this paper and developed our

    project with major advancements and taken it to a new level

    which will offer a novel and complete gaming experience to

    the players.

    Chong, P.H.J., in [7] has come up with the concept of

    wireless medium. Mobility of users and limitations faced by

    them in the wired medium has inspired the author to

    propose this concept. Various technologies like GPRS,

    WLAN, Bluetooth and Wi-Fi are all based on wireless

    technology. We have referred this paper to understand the

    concepts of wireless medium and thereby used the Wi-Fitechnology in our project.

    Hwan Heo, in [8] has developed a new realistic game

    system. It is a multimodel interface which invokes gaze

    tracking, hand gesture recognition and bio-signal analysis.

    The author has been successful in developing a highly

    immersive and realistic game as compared to the previous

    game systems. This research played a crucial role in the

    designing phase of our project.

    Tamas Vajk, in [9] has launched Nintendo Wii, which is a

    big success due to the innovative approach of using wireless

    controller or Wiimote. Motion detection and rotation in 3

    dimensional are some of its important features. The paper

    has presented a system that connects phones to large public

    game screens via Bluetooth where it acts as game controller

    for a multiplayer game.

    IV.PROPOSED WORKOur objective is to develop an android mobile application

    and a computer application to be able to use the smart phone

    as a PC game controller, providing an innovative approach

    to the gaming experience. Also, it will eliminate the need to

    buy an expensive physical game controller.

    http://ieeexplore.ieee.org/search/searchresult.jsp?searchWithin=p_Authors:.QT.Dao-Yuan%20Shan.QT.&newsearch=partialPrefhttp://ieeexplore.ieee.org/search/searchresult.jsp?searchWithin=p_Authors:.QT.Choon-Sung%20Nam.QT.&newsearch=partialPrefhttp://ieeexplore.ieee.org/search/searchresult.jsp?searchWithin=p_Authors:.QT.Chong,%20P.H.J..QT.&newsearch=partialPrefhttp://ieeexplore.ieee.org/search/searchresult.jsp?searchWithin=p_Authors:.QT.Hwan%20Heo.QT.&newsearch=partialPrefhttp://ieeexplore.ieee.org/search/searchresult.jsp?searchWithin=p_Authors:.QT.Hwan%20Heo.QT.&newsearch=partialPrefhttp://ieeexplore.ieee.org/search/searchresult.jsp?searchWithin=p_Authors:.QT.Chong,%20P.H.J..QT.&newsearch=partialPrefhttp://ieeexplore.ieee.org/search/searchresult.jsp?searchWithin=p_Authors:.QT.Choon-Sung%20Nam.QT.&newsearch=partialPrefhttp://ieeexplore.ieee.org/search/searchresult.jsp?searchWithin=p_Authors:.QT.Choon-Sung%20Nam.QT.&newsearch=partialPrefhttp://ieeexplore.ieee.org/search/searchresult.jsp?searchWithin=p_Authors:.QT.Dao-Yuan%20Shan.QT.&newsearch=partialPref
  • 7/25/2019 GController

    3/4

    The plan of implementation is to firstly develop an android

    application which will comprise of the gamepad interface

    with buttons and mouse pad.

    The second stage of implementation will consist of

    developing an application for the personal computer which

    will be connected to the smart phone. The connection

    between the android smart phone (client) and personal

    computer (server) will be an infrastructure based connection

    and communication will be done using the Wi-Fi

    connection.

    V.DESIGN

    All the android applications are based on the applicationframework. The application framework includes Views,content providers, resource manager, notification managerand activity manager. The graphical user interface for anAndroid application is built using a hierarchy of View andViewGroup objects. Android provides an XML vocabularythat corresponds to the subclasses of View and ViewGroup

    so you can define your UI in XML using a hierarchy of UIelements. The flowchart of the UI (Android app) is asfollows:

    Fig 5.1: UI Flowchart (Android Application)The programming language used to develop Android

    applications is Java. A single XML file (UI) and its

    corresponding class file written in Java constitutes a single

    Activity. The Activity can be said to be a single screen with

    a user interface. The flowchart for the classes of the desktop

    application is as follows:

    Fig 5.2: Classes Flowchart (Desktop Application)

    VI.

    IMPLEMENTATIONIn the first phase of implementation, we developed anAndroid application named GController that will emulatethe physical controllers. Multiple physical controllers werestudied to understand the design and concept of controllers.The user interface was developed keeping in mind ease ofaccess and attractiveness. The application is developed withmultiple screen size support. The GController applicationbegins with a cover page which makes way to the optionsactivity. The options activity provides the user with multiplechoicesStart, Instructions, About and an option to exit theapplication. The instructions activity displays the set ofactions expected from the user to ensure the smoothworking of the application as a controller. The about screendisplays basic information about the application. The startscreen starts the process of connecting GController to thePC server application. It prompts the user to ensure that theandroid application and the target PC share the same Wi-Finetwork and consequently requests the user to enter the IPaddress of the PC. On successful connection, the gamepad

    activity is started and displayed to the user. This screen isthe actual emulator.The GController app communicates with the PC applicationusing TCP socket communication via Wi-Fi on multipleports. Each object (buttons and mousepad) sends specificdata to the PC server through these sockets. Variousmethods of objects such as onClick, onTouch were utilized.Handlers and threads were used to ensure multi-touchsupport and long keypressed action.

    Fig 6.1: GController Gamepad layout

    The game logo as shown in the figure was designed usingPaint.Net which is a freeware available on the internet.In the second phase, we developed a PC application that

    acts as a server to the android GController client. It isdeveloped using Java Swing and Java programminglanguage on NetBeans IDE. The PC application is a basicserver which runs in the background of the game andenables the use of GController to control it. The serverapplication starts with a cover page that is redirected to themapping page. The mapping page allows the user toestablish the relationship between the GController buttonsand keyboard buttons. It thus allows the user a certaindegree of freedom and also helps in creating a game-specific profile for GController. All the entries by the userare saved and need not be entered by him/her again whenthe application is restarted. The next part of the PC server

    Home.java

    Controls.java

    IP.java

    Serverpage.java

  • 7/25/2019 GController

    4/4

    application prompts the user with the user IP of the serverso that he/she can easily enter it into the GController.Consequently, the server is established and a connectionwith it may be now completed.Once the connection is established successfully, the serverapplication listens on the various ports to detect messagesfrom the GController app. On receiving the messages, thekey corresponding to message is pressed using the Robot

    class in Java. It also manages the actions that correspond tomulti-touch on GController and the long keypressed event.The GController application along with the PC serverapplication sharing the same Wi-Fi network thus allows agamer to enjoy a novel gaming experience.In the third and final phase, the android application wastested on various android powered devices to guaranteemulti screen size support. Multiple games of variouscategories (FPS, racing simulation, sports) have been playedusing the developed applications to ensure integration andthe detected errors have been corrected.

    Fig 6.2: Desktop application cover page

    VII.FUTUREWORKThe GController app has been developed only for the

    Android operating system. Though Android has the largestshare in smartphone market, many other mobile operatingsystems also exist. In future, the GController app may bedeveloped for mobile operating systems other than Android.

    The communication via Wi-Fi has multiple advantagesover communication via Bluetooth. However, an option tocommunicate via Bluetooth might be provided in future forcases where Wi-Fi is not available.

    VIII.

    CONCLUSIONThe Android application (GController) needed for the

    project has been designed and implemented successfullyusing XML, Java and Android SDK. Also, we have installed

    the application on various android devices to test it formultiple screen size functionality.

    We have also developed the desktop applicationsuccessfully using Java Swing language. It helps inestablishing the connection between the android applicationand the desktop. GController has been successfully tested asPC game emulator. It is a unique synergy of the mobiledevelopment sector with the gaming industry and provides a

    unique and immersing gaming experience.

    REFERENCES

    [1] Wei-Chin Huang, Tennyson Lu, and Wai-Chi Fang, Fellow, An

    Innovative Interface Design with Smart Phone for InteractiveComputer Game Applications, IEEE Electrical Engineering and

    Computer Science Undergraduate Honors Program, National ChiaoTung University Hsinchu 300, Taiwan, ROC,[email protected], [email protected], 978-1-4577-

    0259 4/11/$26.002011 IEEE.[2] http://en.wikipedia.org/wiki/Smartphone#Market_share[3] Silvano Maneck Malfatti_, Fernando Ferreira dos Santosy and Selan

    Rodrigues dos Santosz, Using Mobile Phones to Control Desktop

    Multiplayer Games, 978-0-7695-4359-8/10 $26.00 2010 IEEE ,DOI 10.1109/SBGAMES.2010.32.

    [4]

    Jianye Liu School of Information, Research on development of

    Android applications, Yunnan University of Finance and

    Economics KunMing, China [email protected], 978-0-7695-4543-1/11 $25.00 2011 IEEE,DOI 10.1109/ICINIS.2011.40

    [5] Benjamin Speckmann, The Android mobile platform, Approved atYpsilanti, Michigan on April 16th, 2008.

    [6] Dao-Yuan Shan,Choon-Sung Nam, Dong-Ryeol Shin , Researchand implementation of a virtual joypad based on Android, IEEE

    paper in Computer Science and Network Technology (ICCSNT),2011 International Conference , Volume: 3, Page(s): 1367 - 1370,Product Type: Conference Publications

    [7] Chong, P.H.J., Design and implementation of user interface formobile devices,Consumer Electronics, IEEE Transactions on,Dateof Publication: Nov. 2004Volume: 50, Issue: 4, Page(s): 1156 1161.

    [8] Hwan Heo , A realistic game system using multi-modal user

    interfaces, Consumer Electronics, IEEE Transactions, Date ofPublication: Aug. 2010, Volume: 56, Issue: 3 ,Page(s): 13641372

    [9] Tamas Vajk, Paul Coulton, Will Bamford, and Reuben Edwards,Using a Mobile Phone as a Wii-like Controller for PlayingGames on a Large Public Display, Received 26 September 2007,

    Accepted 12 November 2007, Academic Editor: Kok Wai WongCopyright 2008 Tamas Vajk et al.

    http://ieeexplore.ieee.org/search/searchresult.jsp?searchWithin=p_Authors:.QT.Dao-Yuan%20Shan.QT.&newsearch=partialPrefhttp://ieeexplore.ieee.org/search/searchresult.jsp?searchWithin=p_Authors:.QT.Choon-Sung%20Nam.QT.&newsearch=partialPrefhttp://ieeexplore.ieee.org/search/searchresult.jsp?searchWithin=p_Authors:.QT.Choon-Sung%20Nam.QT.&newsearch=partialPrefhttp://ieeexplore.ieee.org/search/searchresult.jsp?searchWithin=p_Authors:.QT.Chong,%20P.H.J..QT.&newsearch=partialPrefhttp://ieeexplore.ieee.org/search/searchresult.jsp?searchWithin=p_Authors:.QT.Chong,%20P.H.J..QT.&newsearch=partialPrefhttp://ieeexplore.ieee.org/xpl/RecentIssue.jsp?punumber=30http://ieeexplore.ieee.org/xpl/RecentIssue.jsp?punumber=30http://ieeexplore.ieee.org/xpl/tocresult.jsp?isnumber=29849http://ieeexplore.ieee.org/search/searchresult.jsp?searchWithin=p_Authors:.QT.Hwan%20Heo.QT.&newsearch=partialPrefhttp://ieeexplore.ieee.org/search/searchresult.jsp?searchWithin=p_Authors:.QT.Hwan%20Heo.QT.&newsearch=partialPrefhttp://ieeexplore.ieee.org/xpl/tocresult.jsp?isnumber=5606236http://ieeexplore.ieee.org/xpl/tocresult.jsp?isnumber=5606236http://ieeexplore.ieee.org/search/searchresult.jsp?searchWithin=p_Authors:.QT.Hwan%20Heo.QT.&newsearch=partialPrefhttp://ieeexplore.ieee.org/xpl/tocresult.jsp?isnumber=29849http://ieeexplore.ieee.org/xpl/RecentIssue.jsp?punumber=30http://ieeexplore.ieee.org/search/searchresult.jsp?searchWithin=p_Authors:.QT.Chong,%20P.H.J..QT.&newsearch=partialPrefhttp://ieeexplore.ieee.org/search/searchresult.jsp?searchWithin=p_Authors:.QT.Choon-Sung%20Nam.QT.&newsearch=partialPrefhttp://ieeexplore.ieee.org/search/searchresult.jsp?searchWithin=p_Authors:.QT.Choon-Sung%20Nam.QT.&newsearch=partialPrefhttp://ieeexplore.ieee.org/search/searchresult.jsp?searchWithin=p_Authors:.QT.Dao-Yuan%20Shan.QT.&newsearch=partialPref