A sensor game
Figure 1: Dodge Mode Figure 2: Maze Mode Player: You need to rotates the phone to control the ball to move and dodge bullets.
Turret: The turret will appear in a random location and shoot a bullet.
Damage-type bullet: Once the player is hit by this type bullet, he will be killed.
Slow-type bullet: This kind of bullet will bring the player a debuff of about 5s, namely, slow down. In addition, this bullet is faster than the damage-type bullet.
Player with "slow down" debuff.
When game is being played, pause the game is acceptable. The player can touch this button or Virtual Back Key
Level up: Pay attention to this prompt. The game is going to become much more difficult (Maybe the number of turret increases, or the bullets speed up ), as soon as this prompt appears. Whatever, its appearance means that this game is no longer as simple as you think.
Player: Rotating, flipping, and tilting the pitch, yaw, and roll axis of your mobile phone to control the ball to move and arrive at the destination.
Destination: Please, spare no effort to get here.
The player and bullet can move on the screen freely. The collision detections between player and bullets, and between the collision bodies (include player and bullets) and screen boundaries have been finished as well. Moreover, I realized the function that the bullet will move towards the direction of the player initially through the algorithm.
However, due to time constraints, the menu shown at the end of the game is only drawn, while the finger touch event response is not implemented (TODO). Also, the current score of each game will be displayed, while the highest score is not recorded in local (TODO).
- The Main Menu UI. This user interface is composited by a textview and surfaceview. The function of textview is to show the title with a rainbow style (Dynamic style), while the surfaceview is responsible for the response events of the buttons.
- The Connection of Main Menu UI and Game View.
- Store the highest score in local file.
- The difficulty of the game increases with the score. This is implemented by increasing the number of turrets (Increase in the order of top, bottom, left and right). Currently, Difficulty increases every ten scores (I call it LEVEL_THRESHOLD). You can change the difficulty of the game by setting this constant in the class GameData.
- Adding some new buttons and prompts (like the "level up") in Game View to make the game more accessible to players.
- Learn Tile Map and develop a tile map maker by myself.
- Design the maze and generate the map.
- Develop the algorithms for detecting collision of obstacles on the map.
- This is a final version for my COMP3011J Mobile Computing project, but not a final version for my rolling ball game. More interesting epic maze will be developed later, although there is only one maze map currently.
- To simplify, I consider the player ball as a 2D bounding box, which means that the collision is only detected by the four corners of the box. As a result of this, players who are moving on the boundary feel the wall is very rough and hard to move.
- The rainbow textview is available at: https://github.com/hanks-zyh/HTextView
- Some the images are available at: http://box.ptpress.com.cn/y/978-7-115-47555-8
- Others are drawn by myself
More details are available at: Rolling Ball at Github 18372324