Professional Documents
Culture Documents
G54mdp-Groupwork Report
G54mdp-Groupwork Report
Introduction
Whack-a-mouse is a classic game, which is simple but addictive and popular for many generations. As well as other games such as Gluttonous Snake, LinkGame. One feature of this type of game is they tend to have a shorter game cycle. Users (players) they do not have to spend much time for a round of the game, so they are able to play the game at some scattered time, such as commuting or waiting people. This type of game is popular among different age groups of people. Certainly it is also applicable whenever someone wants to kill the time. In this work, we aim to make the game more attractive visually and more interesting to play. We mainly described the concept of UI design, the functionality implemented, the key application components used and the structure of the code in this report. Some unsolved problems were presented in the last.
character Hamtaro which is a guinea pig. The scenario and process still followed the mainstream, with which players are familiar. ! Sounds - Secondly, we used a variety of sound effects in this game. Due to the limited resource, the files of sounds were selected and downloaded from the Internet. The sounds were mainly sorted in two types, for backgrounds and events. Background music was embedded in the home page and game pages. Special sound effects were trigged in the events of whacking mice and obtaining special items. ! Haptic In order to provide a richer user experience, the game include a vibration feature. Vibration is triggered by only whack on a wrong mouse, which will also lose 3 points of score. At the beginning, we would like to set vibration with each triggered events (when whack items). However, we awarded that this approach will cause numbness of users after they played few rounds of game, so we decided to set the vibration on certain event.
Click Back
Result Page
Pause Page
When the game launches, the home page shows. In the home page (Figure 1), players can choose to see the instruction first or play the game directly. The instruction page (Figure 2) appears when How to play clicked. As seen in the page, there are three types of mice. The pink mouse is special, because hit on her can cause a reduction of 3 points in score. The clock, wing and peanut are special items. Their functions are: Clock: The remaining time minute 5 seconds Wing: The mice show up and disappear faster Peanut: The mice stay up longer
After knowing how to play this game, click Back to return to home page. By clicking play, the game starts (see Figure 3). Mice pop up from the holes randomly. As the remaining time decreases, more mice will come out. In this page, players can turn on/off the background music and sound effects by tapping mute button. The pause button allows players to pause or continue the game.
When the time becomes 0, the games ends. The result page (Figure 4) shows the final score and the top three records. Click menu to go back to the home page and click replay to start the game again.
running daemon threads exist. When the process is killed, all the daemon threads would finish. Another way to kill a thread was to allow it to finish itself. Using onDestroy() was not safe. Then we used a flag in while loop , which was in run(). When the flag became false, the process jumped out the loop and run(), and the thread ended itself.
left and score earned. An onClickListener was deployed to monitor the button pressed, so that the application can make appropriate response. In this activity is where section the vibration feature implemented. To implement the vibration, the user permission should be specify in the manifest file, so that the app able to use vibration function. ResultActivity works with DBHelper closely, this main function of this activity is to add a new score record to the database and display the top three scores and new score sent form GameActivity via bundle. In order to extract DB logic from game logic, a DBHelper was created as a mediator to handle all interaction between database and activities. According to the actions required, DBHelper provides function such as, insert, update, and select. The GridPack served as a function like JAVA bean to packing attributes of each image of games view and associate with GameActivity.
Unsolved Problem
We encountered many technical difficulties during the development. Among them, the layout of UI components was the biggest difficulty we faced, and we were not managed to find a once and for all solution for this issue. We made a compromise in this problem, which almost likely meet our expectation. As we know, there are different sizes of screen of mobile devices. What we aimed to do was to adapt the UI of our game to most of the existing android devices. However, this task was not so easy as we thought. It was known that the components should be generated dynamically in code, if we wanted the components fit in diverse resolutions. Since we could obtain the screen resolution parameters via the code and locate the components in proportion. But we got more problems when using this method. We
had different image buttons (the mice), they were not located with regularity. And the buttons were of different style. These conditions required a block of code. Then we chose to set the components statically in XML file. Then came the problem that the graphics went in different places in different devices. We tried different layouts and failed. Due to the limited time, we have to leave it like this. But we will still seek for the solution when we have time.
Peer Assessment
Chun-Chang, Wang In this group work, my tasks were mainly on the designing the structure of the application, solving difficulties that we encountered in the development and optimize the code. Since the work was conducted near the end of this semester, we didnt have many face-to-face meetings, instead of that we communicated through SMS or message software, since we separate the tasks well, so we can work independently pretty well. Over all this is a pleasant group work experience.
Chunxiao Ni We three had discussions before started. And we reached an agreement on what kind of application to develop for the coursework and what functions to be implemented. I designed the UI and colleted the sounds for the game. And I created a class in which the main functions of the game were implemented. Wang helped me to refine it and he bound it to the structure as Gameactivity. I mainly focused on the solutions for the problems caused by the thread and and layout. Yuma were also helpful in the wholse process. Anyway, i was happy with the group.