More people are using smartphones than ever before. Pew Research estimates that as soon as 2015, 50% of U.S. adults will use a smartphone. As the consumer base grows, the amount of potential uses for a smartphone also rises. Smartphone apps have heavily diversified over the years, growing from news and weather to GPS capability to games and others. Over the summer, I will develop a game engine to be used for Android apps that would allow for easy creation and customization of different player vs. player games of a selective type. The defining characteristic of this type of game is a large initial group of players which over time is reduced according to certain criteria until only one player remains: the winner. A large number of commonly played games fit this characteristic, from freeze tag to the popular game Assassins. Seeing how generalizable these kinds of games are and making my engine as friendly as possible to different variations on this premise will be one of the major challenges of my project. Using the full capabilities of Android phones is another facet of my project. Smartphones have become so ubiquitous that it becomes feasible to design tools for large group games that require players to own a smartphone to play. This allows my engine to enhance popular games with features found only on phones. As an example, in a game of Assassins players could get real-time updates on the players still in the game, track their targets via GPS, or take a picture of their target to “assassinate” them. Theorizing possible implementations of the hardware and seamlessly incorporating them into my engine is a major goal of my project. Unfortunately, smartphone hardware also has its share of limitations, and working with those is another major challenge I will face. Overall, this project should be challenging, fun and interesting, resulting in a fully functional app that can be downloaded from the Android Market.
During the first few weeks of my project, I was primarily focused on research, rather than application. I focused on the Android mobile phone and learned about software development on the Android operating system, common problems Android developers face, how the operating system functions, and development on mobile devices in general. I found that one of the more interesting differences between normal software development, and development for mobile devices is that the developer must be conscientious of power consumption since mobile devices typically have issues with battery life. The developer then has to find a balance between performance and efficient power consumption. With this new motivation in mind, I began to focus my project with the goal of improving software development for mobile devices, specifically with regard to power consumption.
At this stage during my research project, I began to look for a solution to the problems I found with software development on mobile devices. The main issue for the Android device, appeared to be a lack of tools to allow developers to recognize inefficiencies in code that may cause high power consumption, resulting in poor battery life and disgruntled application users. In order to improve this aspect of development, I determined the information regarding power consumption that developers might need such as CPU usage, screen brightness, and network traffic and planned a means for displaying this information in a manner in which developers could easily utilize this information to spot problems in their code and fix them. This organized information, accompanied with time stamps, could be useful when properly analyzed by another piece of software.
During the last few weeks of my research project, I set about implementing a tool that would provide developers with a means of analyzing device performance and power consumption, something that does not yet exist in a polished manner. Initially, I developed some code that records a log file of the device’s performance and subsequent code being executed in real time. This log file, containing all the necessary information a software developer would need to develop mobile software, is not very useful in its raw XML format. Although it is organized and readable, it would be very tedious for a developer to read or sort through, which means an additional piece of software is needed to visually display the results. Building off the Traviando (http://www.cs.wm.edu/~kemper/Traviando.html) research that my advisor, Dr. Peter Kemper, is involved in, I added code to this existing code base to allow the software to utilize the log file that my other piece of software creates, and visually display the information along with a trace view of all of the methods called in the application’s run in an easy to read manner for the developer.
To concisely summarize this research, I investigated software development techniques for mobile devices, specifically the Android phone, which is currently the most popular mobile operating system with about 40% of the current market share. The main topics of investigation were interprocess communication (IPC), which is unique on the Android OS and far more technically to adequately describe in this summary, and power consumption on mobile devices, which ultimately became to primary focus. After fully understanding the underlying architecture of the Android OS, as well as its IPC and methods of acquiring system data such as CPU, I developed a custom logger that logs the system data as well as a trace of the methods called during the application’s execution and stores the output into a log file on the phone’s internal SD card. Using this data, and the existing visualization structure of Traviando, I was able to generate a modified visualization to display the collected data in a readable and sequential view. Traviando itself, takes in specially formated XML files to generate a visualization, which the user can also interact with after generation. I created a converter that would take my custom Android system log and trace files as input and output a Traviando formatted XML file that incorporated the additional system data I collected. This visualization, although not fully polished or featured yet, has the potential to greatly aid Android developers with software development, specifically helping them recognize inefficiencies in code that may cause poor power consumption.