1 Group: IK0804 Supervisor: Prof. KING Kuo Chin, Irwin Member: Ng Hon Pan (s06679724) Wong Hung Ki(s06641853)

Slides:



Advertisements
Similar presentations
YEARBOOK Layout and Design.
Advertisements

Background Virtual memory – separation of user logical memory from physical memory. Only part of the program needs to be in memory for execution. Logical.
Karla Goldhahn Mathematics Instructional Lead teacher Patrick Henry Academies Math Games at Home.
Computer Basics Hit List of Items to Talk About ● What and when to use left, right, middle, double and triple click? What and when to use left, right,
CS 450: COMPUTER GRAPHICS FILLING POLYGONS SPRING 2015 DR. MICHAEL J. REALE.
Tetris – Genetic Algorithm Presented by, Jeethan & Jun.
IKI 10100: Data Structures & Algorithms Ruli Manurung (acknowledgments to Denny & Ade Azurat) 1 Fasilkom UI Ruli Manurung (Fasilkom UI)IKI10100: Lecture22.
Virtual Memory Introduction to Operating Systems: Module 9.
CSE 380 – Computer Game Programming Pathfinding AI
Logic Networks …and the card game Boolette
Asteroids Games and Simulations O-O Programming in Java The Walker School The Walker School – Games and Simulations
Game Rules Implementation Lecture 5 1. Revisit 2  Lab 4 – Other Input Methods  Touches Basics  Relationship between TouchesBegan, TouchesMoved, and.
Touches Detection and Other Remaining Parts Lecture 3 1.
Cosc 5/4730 Game Design. A short game design primer. A game or animation is built on an animation loop. – Instance variables of “objects” are updated.
Processes CSCI 444/544 Operating Systems Fall 2008.
CS 206 Introduction to Computer Science II 10 / 14 / 2009 Instructor: Michael Eckmann.
ART: Augmented Reality Table for Interactive Trading Card Game Albert H.T. Lam, Kevin C. H. Chow, Edward H. H. Yau and Michael R. Lyu Department of Computer.
Lecture 5 of Computer Science II Arrays Instructor: Mr.Ahmed Al Astal.
INTRODUCTION TO SCRATCH. About Me Resources Scratch Website Learn Scratch Washington-Lee Computer.
Module 6 Lesson 16.
Sprite Animation CSE 391 Fall 2012 Tony Scarlatos.
MrsBillinghurst. net A2 Computing A2 Computing Projects Game Animation in Pascal.
Data Structures Week 9 Towards Weighted BFS So, far we have measured d s (v) in terms of number of edges in the path from s to v. Equivalent to assuming.
Recursion Chapter 7 Copyright ©2012 by Pearson Education, Inc. All rights reserved.
Introduction to Scratch!
CMPE 421 Parallel Computer Architecture
11 Finding Winners Using Arrays Session 8.2. Session Overview  Find out how the C# language makes it easy to create an array that contains multiple values.
Othello Artificial Intelligence With Machine Learning
1 CO Games Development 1 Week 6 Introduction To Pathfinding + Crash and Turn + Breadth-first Search Gareth Bellaby.
Chapter 9.  Mathematical morphology: ◦ A useful tool for extracting image components in the representation of region shape.  Boundaries, skeletons,
Recursion, Complexity, and Sorting By Andrew Zeng.
VB Games: Preparing for Memory Brainstorm controls & events Parallel structures (again), Visibility, LoadPicture, User-defined procedures, Do While/Loop,busy.
Idea1 : Net Aooni Arcade Idea2 : Shooting Arcade Project Brainstorming Computer Game 2011 Fall ♣ Lee Sang Min.
The Stolen Heart A Homemade PowerPoint Game By Kaelin Farrington University of Georgia Play the game Game Directions Story Credits Copyright Notice Game.
Making Decisions uCode: October Review What are the differences between: o BlueJ o Java Computer objects represent some thing or idea in the real.
11 Adding Tomato Targets Session Session Overview  We now have a game which lets a player bounce a piece of cheese on a bread bat  Now we have.
Programming Video Games
Game Maker Terminology
Introduction to Objective-C and Xcode (Part 5) FA 175 Intro to Mobile App Development.
Design Elements and Principles
Shooters in GameMaker J Parker.
Coaching Pack 9 – 11 Years. What Am I Coaching Today? What Might the Players Learn or Get Better at? TechnicalPsychological example PhysicalSocial example.
Digital Image Processing CSC331 Morphological image processing 1.
UPGRADING MEMORY BY : tuan mohd fariz.  Choosing and Installing Memory.
Electronic Analog Computer Dr. Amin Danial Asham by.
CHAPTER 14 Classes, Objects, and Games XNA Game Studio 4.0.
© Janice Regan, CMPT 128, February CMPT 128: Introduction to Computing Science for Engineering Students Recursion.
Introduction to Artificial Intelligence (G51IAI) Dr Rong Qu Blind Searches - Introduction.
Week 9 - Monday.  What did we talk about last time?  Practiced with red-black trees  AVL trees  Balanced add.
1 Recursive algorithms Recursive solution: solve a smaller version of the problem and combine the smaller solutions. Example: to find the largest element.
Hash Tables Ellen Walker CPSC 201 Data Structures Hiram College.
CSCS-200 Data Structure and Algorithms Lecture
In the last several lessons, you have described translations using coordinates. You have also developed strategies for determining where an object started.
Sprite sets. project of the week: bubble popper o objects appear from the bottom and slide up o player needs to avoid objects to earn points (objects.
Game Maker Tutorials Introduction Clickball IntroductionClickball Where is it? Shooting Where is it?Shooting.
Sound and more Animations
Flood fill algorithm Also called seed fill, is an algorithm that determines the area connected to a given node in a multi-dimensional array, When applied.
Lecture 5 of Computer Science II
Background Shapes & Collision Resolution (Top-down and Side-scrolling)
Kenneth Chen CIS 587 September 21, 2016.
Explain what touch develop is to your students:
Operating Systems.
Game Loop Update & Draw.
Translate, Rotate, Reflect!
Data Structures & Algorithms
Game Programming Algorithms and Techniques
CSC 221: Introduction to Programming Fall 2018
Translate, Rotate, Reflect!!!
Presentation transcript:

1 Group: IK0804 Supervisor: Prof. KING Kuo Chin, Irwin Member: Ng Hon Pan (s ) Wong Hung Ki(s )

2  Overview  Game review  Design  Implementation  Problem encountered  Demo  Further suggestion

3  Develop a mini game called Monster Manager on iPhone  The idea comes from another game called Zoo Keeper

4  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.

5  Zoo Keeper  Trism  Diamond Twister  Jewel Quest II

6  er.html

7  0

8  7hg

9  2U_XOcMiU

10  Shared among the reviewed games  Inside a frame  Many objects are packed tightly  Move them and get matches  Many levels  Timer  Scoring system

11  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?

12  Overview  Game review  Design  Implementation  Problem encountered  Demo  Further suggestion

13  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

14  There are many ways.  Swap  Pick and Push  Rotation  …

15  Adopted in Zoo Keeper, Diamond Twister, and Jewel Quest II oooo+ +12oo+ +oo3o+ +oo4o oooo+ +21oo+ +oo4o+ +oo3o

16  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

17  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

oooo+ +mxxo+ +oxxo+ +oooo s++++ +oooo+ +mxxos +oxxo+ +oooo+ +s oooo+ +oxxo+ +oxxo+ +oooo

19  Pros:  More variations compared to the Swap method  Direct vs. indirect  More thinking required  Cons:  ↑Computation time of checking matches & changing monsters’ positions ooooo+ +oeoee+ +ooooo+ +ooooo

ooooo+ +oeoee+ +ooooo+ +ooooo ooooo+ +oe$ee# +ooooo+ +ooooo

21  Pros:  Same as ver. 1  Solve the last problem in ver. 1  Cons:  Have loophole  See the next page.

22 +ooo#oo+ +oo$ooo+ +o$c$oo+ +ooaooo+ +oo#ooo+ +oobo#o oo##oo+ +oooooo+ +o$$$oo+ +oocooo+ +ooaooo+ +oobo#o oo##oo+ +oooooo+ +oooooo+ +oocooo+ +ooaooo+ +oobo#o

nnnnnn+ oxnnnyzi +nnnnnn

24  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 ooooo+ +oeoee+ +ooooo+ +ooooo

ossssnn+ +nnnxnn+ +nnnxnn+ ++++i+++

26  Pros:  lots of variations in real time.  Cons:  ↑ thinking time  becomes not exciting nxnnnn+ +nnxnnn+ +nxnnnn

o123oo+ +o456oo+ +o789oo+ +oooooo o412oo+ +o753oo+ +o896oo+ +oooooo

28  Pros:  lots of variations in real time.  Cons: oxoooo+ +xooooo+ +xooooo+ +oooooo

29  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 oooooo+ +ooxxoo+ +ooxo#o+ +ooo#oo oooooo+ +ooo#oo+ +oxxo#o+ +ooo#oo

30  Global time gauge  Each monster would have a local time gauge  A set of monster images to indicate the timer of each monster

31  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

32  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.

33  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.

34  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.

35  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

36  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.

37  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

38  Overview  Game review  Design  Implementation  Problem encountered  Demo  Further suggestion

39  Board  ImageLoader  Monster  Square  MonsterManagerAppDelegate  MonsterManagerViewController  TheGame

40  creates all object used in the game  handle the game logic and animations. TheGame - imageLoader : ImageLoader - board : Board - score : int - life : int - timeLeft: int - hits : int + gameInit () : id + rotationAtCenter ( monster : Monster, direction : int ) : void - rotationAnimationDidStop ( animationID : NSString, finished : NSNumber, context : void ) : void - shakeMonsters ( matchedMonsters : NSMutableArray, counter : int ) : void - shakeAnimationDidStop ( animationID : NSString, finished : NSNumber, context : void ) : void - diminishAnimationDidStop ( animationID : NSString, finished : NSNumber, context : void ) : void - magnifyAnimationDidStop: ( animationID : NSString, finished : NSNumber, context : void ) : void

41  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. Board - allSquares : NSMutableArray - map : Point2D[][] - gameTimer : UILabel - gameScore : UILabel - gameLife : UILabel + initTheBoard ( g : TheGame) : id - generateMap: ( numOfPotentialMatches : int, typeMap : int[][] ) : void + getSquareWithLocation (x : int, y : int ) : id + getSquareWithMapLocation: ( x : int, y : int ) : id + getPointInMapWithLocation: ( x : int, y : int ) : Point2D + setPointInMapAtLocation: ( x : int, y : int, point : Point2D ) : void + getMonsterTypeWithMapLocation: ( x : int, y : int ) : int + updateTimer: ( t : int ) : void + updateScore: ( s : int ) : void + updateLife: ( l : int ) : void

42  helps loading all the monsters’ images to memory  allows other objects to retrieve them. ImageLoader - backgroundImage : UIImage - monsterImages : NSArray + initWithAllImagesLoad () : id + getMonsterImagesWithNumber ( type : int ) : void

43  inherits the class Square.  represents a monster.  It has a type attribute, and methods to change the image of monster. Monster - type : int + initMonster ( game : TheGame, type : int, mapX : int, mapY : int ) : id + changeType ( type : int) : void - touchesBegan ( touches : NSSet, event : UIEvent ) : void - touchesEnded ( touches : NSSet, event : UIEvent ) : void - clockwiseRotation : void - antiClockwiseRotation : void

44  inherits the class UIImageView.  Represent a square object in game  stores its location in the game Square - locationInMap : Point2D - game : TheGame + setNewImage ( image : UIImage ) : void

45  must exist in any iPhone app..  creates all the necessary objects in order to run the application. MonsterManagerAppDelegate - window : IBOutlet UIWindow - viewController : IBOutlet MonsterManagerViewController

46  responsible to add the elements of the game, such as all monsters, background, labels to the game. MonsterManagerViewController - game : TheGame + setGame : void + viewDidLoad : void

47 Square UIImageView MonsterManagerAppDelegate Monster MonsterManagerViewController 1 TheGame 1 ImageLoader 1 Board

48 1.Waiting for player single tap or double taps, iteration=1 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 8.The matched monsters perform shaking animation 9.Determine new types of monster for replacement, and run the replacement animation 10. CPU randomly tap a monster for another rotation as bonus. (iteration++) 7.Update the score 6.Decrease life by one Single Tap Double Tap Yes No and iteration =1 1 / 2 No and iteration > 1

49  Overview  Game review  Design  Implementation  Problem encountered  Demo  Further suggestion

50  Design Problems  Implementation Problems

51  Monsters’ Images  Game Rules  Rotation Problem

52  The image is blurred and darkened in iPhone  the color of the image is not exactly the same as the original one shown on PC  the size of pixel on iPhone is smaller than that of pixel on the LCD monitor  Solution:  enlarge images to 40x40  ↑brightness, sharpness  size of each image is around 1K – 2K

53  Spent nearly half of time on designing game rules  We only focus on the uniqueness and attractiveness of the rules, and did not think about the effects of a particular set of game rule to the entire game.  the thing we imagine in mind is usually not the whole picture  E.g. using accelerometer to control direction of gravity

xxxxx+ +xooox+ +xooox+ +xooox+ +xxxxx ####### #xoooo# #ooooo# #ooooo# #ooooo# #ooooo# #######

55  Data Structure to Store All Monsters  Initialization of Type Map  Mutable Array problem  Checking Matches Algorithm  The Animation

56  Two approaches  2D array  2D linked list 5 north = 2 east = 6 south = 8 west = 4 2 north = null east = 3 south = 5 west = 1 4 north = 1 east = 5 south = 7 west = null 6 north = 3 east = null south = 9 west = 5 1 north = null east = 2 south = 4 west = null 3 north = null east = null south = 6 west = 2 7 north = 4 east = 8 south = null west = null 8 north = 5 east = 9 south = null west = 7 9 north = 6 east = null south = null west = 8

57  2D array storing the types  Ensure no matches happen at the beginning  Ensure matches happen within one rotation  Two steps  Add patterns  Fill in the rest of the blanks in the type Map ooo xxo oox oox xxo ooo

58 for each s in type map if s == NULL while (true) newType = random() % 8; // check north direction if match happens by considering north direction (1) continue; if match happens by considering south direction (2) continue; if match happens by considering west direction (3) continue; if match happens by considering east direction (4) continue; if match happens by considering north and south directions (5) continue; if match happens by considering east and west directions (6) continue; s = newType; break;

59  Mutable array changes it size for any addition or removal of elements (1, 0)(2, 0)(1, 2) (0, 0)(0, 2)(1, 1) (2, 2)(0, 1)(2, 1) Monster 1 Monster 2 Monster 3 Monster 4 Monster 5 Monster 6 Monster 7 Monster 8 Monster 9

60 matchedMonsters = {} for each moved monster m if match happens by considering north direction at m for each monster x along north direction at m if m.type == x.type && x is not in the set matchedMonsters add x to matchMonsters … Same for east, south and west directions … if match happens by considering north and south directions at m for each monster x along north direction at m if m.type == x.type && x is not in the set matchedMonsters add x to matchMonsters for each monster x along south direction at m if m.type == x.type && x is not in the set matchedMonsters add x to matchMonsters … Same for east and west direction …

61  Clockwise rotation animation  Anti-clockwise rotation animation  Shaking animation  Diminishing animation  Magnifying animation  Fortunately…  iPhone SDK allow programmers to create callback functions that are called once animation completes.

62  Overview  Game review  Design  Implementation  Problem encountered  Demo  Further suggestion

63

64  Overview  Game review  Design  Implementation  Problem encountered  Demo  Further suggestion

65  Adjust colors for better look  Timer & level settings  New game mode  Sound effects  Multi-touch

66  For two, three or even four players.  iPhones are connected via Wi-Fi.  Each player will own part of the types of monsters available in game.  The main target of each player is to find matches of his or her own types of monsters as much as possible.  Players will take turns to select a monster for rotation within 10 seconds.  After the time is over, the player with the highest scores is the winner.  This game mode is interesting as player not only needs to care about finding matches, but also think about how to prohibit the opposites to score.

67  Background music  Sound effects together with animations  Rotation sound  Match sound  Replacement sound

68