680 likes | 775 Vues
IPhone Application III. Group: IK0804 Supervisor: Prof. KING Kuo Chin, Irwin Member: Ng Hon Pan (s06679724) Wong Hung Ki(s06641853). Agenda. Overview Game review Design Implementation
E N D
IPhone Application III Group: IK0804 Supervisor: Prof. KING Kuo Chin, Irwin Member: Ng Hon Pan (s06679724) Wong Hung Ki(s06641853)
Agenda Overview Game review Design Implementation Problem encountered Demo Further suggestion
Overview Develop a mini game called Monster Manager on iPhone The idea comes from another game called Zoo Keeper
Motivation Base on the idea, many chances for us to show our creativity develop a comparable or even better game than Zoo Keeper iPhone is so popular Great iPhone SDK gain some experience in developing game on mobile device Share our game ideas.
Game Review Zoo Keeper Trism Diamond Twister Jewel Quest II
Game Review - Zoo Keeper http://www.yukz.com/games/html/zookeeper.html
Game Review - Trism http://hk.youtube.com/watch?v=hy0ptZisr70
Game Review - Diamond Twister http://hk.youtube.com/watch?v=DJmEVd3T7hg
Game Review - Jewel Quest II http://hk.youtube.com/watch?v=4-2U_XOcMiU
General Game Idea • Shared among the reviewed games • Inside a frame • Many objects are packed tightly • Move them and get matches • Many levels • Timer • Scoring system
General Game Idea • Important questions • What is the shape of the monster? • How do the monsters move? • What is the definition of a match? • How to set the timer? • Is it a must to have at least one match per move? • How to fill up the empty spaces after a match? • How to set up different levels?
Agenda Overview Game review Design Implementation Problem encountered Demo Further suggestion
Shape of Monster Square, a circle, a triangle, etc. Appropriate data structure Squares, circle 2D array Triangle 2D array + ??? avoid any overlapping Easy to change their positions in DS Square is the best
Move Monsters There are many ways. Swap Pick and Push Rotation …
Move Monsters - Swap Adopted in Zoo Keeper, Diamond Twister, and Jewel Quest II
Move Monsters - Swap • Pros: • Simple, easy to implement • detecting matches after swapping can perform extremely fast • Cons: • Used many times • Too straight forward • Does not affect the next swap
Move Monsters - Pick and Push Designed by us Four versions Pick means pick a monster inside the frame Push means push a monster back from the edges of the frame
Move Monsters - Pick and Push 1 • Pros: • More variations compared to the Swap method • Direct vs. indirect • More thinking required • Cons: • ↑Computation time of checking matches & changing monsters’ positions
Move Monsters - Pick and Push 2 • Pros: • Same as ver. 1 • Solve the last problem in ver. 1 • Cons: • Have loophole • See the next page.
Move Monsters - Pick and Push 3 • Pros: • Player will no longer be able to play tricks any more. • Cons: • It seems that shifting an entire line is very straight forward. • The same problem in ver. 1
Move Monsters - Pick and Push 4 • Pros: • lots of variations in real time. • Cons: • ↑ thinking time • becomes not exciting
Move Monsters - Rotation • Pros: • lots of variations in real time. • Cons:
Definition of Match • In general, two definition • At least three monsters of the same type grouped horizontally or vertically • A square with four monsters with the same type.
Timer Global time gauge Each monster would have a local time gauge A set of monster images to indicate the timer of each monster
One Move One Match • If yes… • If no matches, move the moved monsters back to their original positions • game program must guarantee player must be able to find a match in one move • If no… • players can move the monsters that they want without any restrictions, which is bad
One Move One Match Introduce life counter. restrict player to move monsters without thinking. If no match happens, life will decrease by one. If life reaches zero, the game will be over. Player is allowed to have some freedom to find a match in more than one move.
Filling up Empty Space When a match happens, the matched monsters must be removed The empty spaces left are filled by the monsters above the empty spaces. using the accelerometer installed in iPhone to change the direction of gravity Simply replace the matched monster with new monsters.
Level Settings In Zoo Keeper, players need to achieve the required number of matches for each type of animal in each level In Trism and Diamond Twister, player must get the required points in order to go to the next level. In Jewel Quest II, once there is a match, the matched square become golden. A level is completed only if all the squares are golden.
What is Monster Manager? • What is the shape of the monster? • Square • How do the monsters move? • Rotation • What is the definition of a match? • At least three monsters of the same type grouped horizontally or vertically • How to set the timer? • Global time gauge • Is it a must to have at least one match per move? • No • How to fill up the empty spaces after a match? • Simple replacement • How to set up different levels? • Score system
Compare Zoo Keeper with Monster Manager • Similarities: • move monsters and group them up • have timer and score systems. • A match may trigger other matches. This can keep the whole map changing periodically.
Compare Zoo Keeper with Monster Manager • Differences: • How to move monsters? • Swapping vs. Rotation • How to add new monsters into the frame? • Falling vs. Replacement • One move one match? • In Zoo Keeper, no matches move back to their original positions. • In Monster Manager, no matches nothing happens
Agenda Overview Game review Design Implementation Problem encountered Demo Further suggestion
Implementation • Board • ImageLoader • Monster • Square • MonsterManagerAppDelegate • MonsterManagerViewController • TheGame
TheGame creates all object used in the game handle the game logic and animations.
Board container of all the monsters. has methods to set and get particular monster create all monster before the game start initialize the positions of monsters update the timer, life and score.
ImageLoader helps loading all the monsters’ images to memory allows other objects to retrieve them.
Monster inherits the class Square. represents a monster. It has a type attribute, and methods to change the image of monster.
Square inherits the class UIImageView. Represent a square object in game stores its location in the game
MonsterManagerAppDelegate must exist in any iPhone app.. creates all the necessary objects in order to run the application.
MonsterManagerViewController responsible to add the elements of the game, such as all monsters, background, labels to the game.
Class Diagram Relationship UIImageView 1 TheGame 1 1 1 Square Board 1 117 117 Monster ImageLoader 1 1 1 MonsterManagerAppDelegate MonsterManagerViewController 1 1
Control flow diagram 1.Waiting for player single tap or double taps, iteration=1 Single Tap Double Tap 2.Clockwise rotation around the tapped monster 3.Anti-clockwise rotation around the tapped monster 4.Update the positions of all the moved monsters 5.Check whether there is at least one match No and iteration > 1 No and iteration =1 Yes 7.Update the score 6.Decrease life by one 8.The matched monsters perform shaking animation 9.Determine new types of monster for replacement, and run the replacement animation 1 / 2 1 / 2 10. CPU randomly tap a monster for another rotation as bonus. (iteration++)
Agenda Overview Game review Design Implementation Problem encountered Demo Further suggestion
Problems Encountered Design Problems Implementation Problems