Design & Development – 2h
Helpful Advice It is better to have a design, and then to change it in the light of experience, than not to have a design at all
Design Documentation A description of the game concept A sketch of the screen layout (not a screenshot of the completed game) A description of the game controls A description of the behaviour of the major objects The user sprite Any autonomous sprites
A Sprite A sprite is an image which represents one of the characters in a game A Sprite moves as a 2D block (usually oblong) as the game progresses. Sprites can also be animated and change their appearance.
Game Concept 1/3 Gameplay Theme Core Objective Core Idea Game Objects
Game Concept 2/3 Gameplay Theme Core Objective Core Idea What’s the game about ? Core Objective What is the overall goal ? Core Idea Defines overall gameplay Develop secondary ideas to enrich experience
Game Concept 3/3 Game Objects Primary function Secondary Functions Generated by gameplay features Initiates additional gameplay features
Proposed Screen Layout
Description of Game Controls 1 2 3 4 5 6 7 8 9
Description of Game Controls During normal game play, player one’s paddle is moved up using the “3” button and down using the “9” button. When thus activated, the paddle will move up or down at a speed of 5 pixels per second. If “3” and “9” are both pressed at the same time, the paddle will not move.
Sprite Behaviour The ball will bounce off the top or bottom of the screen. I.e. on contact with the top or bottom of the screen, it will continue its horizontal speed. Vertically it will maintain its speed but reverse direction. If the ball contacts the left paddle it will adopt the vertical speed of the paddle at the time of contact. It will change horizontal direction to move rightwards...
Feedback Visual Audio Action Accumulative Emotional Fulfillment rumble heath, armour, weapons etc Emotional Fulfillment
Software Development
“You should use an iterative development method only on projects that you want to succeed” Fowler, 2000
User-Centred UML Method Capture/Develop Scenarios Contextual Analysis Scenarios Contexts of Use Find Actors and use-cases Identify Objects & Relationships Use-case Model User Model Interface Design Interface Models Class Diagram (Conceptual) All activities are performed iteratively. Usability evaluation is conducted in parallel with design and implementation Interaction Diagrams from use-cases Identify Operations Interaction Diagrams Class Diagram (Specification) Examine Behaviours & Class Relationships Specify Implementation State Diagrams Class Diagram (Implementation) Usability Evaluation Implementation Functional Testing Code Test Results Usability Reports User-Centred UML Method , based on Hudson (2002)
“The diagram is not the design: the diagram is a representation of (part of) a model of the design, which captures an aspect of the design in a form which can be discussed” Stevens, 2001
Game: First Draft ? Game Play new game Continue old game Set game GamePlayer Play new game Continue old game Save game Set game parameters View Hall of Fame
Use-case Scenarios A scenario is an instance of a use-case - it is one path through the flow of events for the use-case. Sometimes referred to as the use-case instance.
Use-case Scenarios Scenarios speak the language of the end user and the domain expert, and therefore provide a means for them to state their expectations about the desired behaviour of a system to its developers.
Use-case Scenarios Each use-case is a web of scenarios - primary scenarios (the normal flow for the use-case) and secondary scenarios (the what if logic of the use-case).
Use-case Scenario Example “The ball approaches Player 1’s side (on RHS). P1 misses. It passes P1’s paddle without touching it. It disappears off RHS of screen and wraps round to appear on LHS of screen. It maintains its original speed and direction. It goes through P2’s bat to continue towards P1. P2’s score increments.”
Writing Use-Cases (Gymkhana Game) Use Case: Jump Obstacle Basic Flow 1. Horse moves towards obstacle 2. Effect sound of horse galloping 3. Horse attempts to jump obstacle 4. Horse clears obstacle 5. Sound of horse galloping away
Writing use-cases (Gymkhana Game) Alternatives: A: Horse refuses to jump 3.1 Effect sound of horse juddering to a halt 3.2 Horse disqualified 3.3 Time trial is terminated B: Horse hits obstacle 4.1 Effect sound of horse hitting obstacle 4.2 Time penalty awarded 4.3 Time penalty displayed
Activity diagram Jump Obstacle Move Horse Make SoundFX [refuse] jump [hit] Horse disqualified Penalty Awarded Clear Obstacle Penalty Displayed Make SoundFX Terminate Trial
CRC cards Class Responsibility Collaboration
Example CRC Card Class Superclass(es) Subclasses Responsibility GymkhanaWorld Responsibility Collaborators Determine boundaries of world and layout of course Start and Finish time trial Know current time taken by horse Award time penalties Disqualify horse on refusal to jump Horse
Example CRC Card Class Superclass(es) Subclasses Responsibility Horse Responsibility Collaborators Know own position within world Know layout of course (i.e. the next jump) Know how to move and jump Know direction and speed of movement Cause sound effects GymkhanaWorld GymkhanaWorld Sound
Example CRC Card Class Superclass(es) Subclasses Responsibility Obstacle Responsibility Collaborators Know own position within world Know when the horse has cleared, hit or refused to jump. Break apart if hit Cause sound effects GymkhanaWorld Horse Sound
Class Diagram GymnkhanaWorld Display Horse Obstacle Sound play() boundaries courselayout currentTime penalties horseStatus trialComplete startTrial() finishTrial() displayGameStatus() updatePenalty (0 disqualify() Display Horse display() position direction speed soundFX move() jump() makeSound() Obstacle position cleared hit refused soundFX jumpTest() breakApartl() makeSound() Sound play() Finish trialComplete()
Sequence Diagram Scenario: Basic Flow 1. Horse moves towards obstacle 2. Effect sound of horse galloping 3. Horse attempts to jump obstacle 4. Horse clears obstacle 5. Sound of horse galloping away
Sequence Diagram GamePlayer : Horse : Sound :Obstacle move ( ) makeSound ( ) play (soundFX) jump ( ) jumpTest ( ) play (soundFX)
A: Horse refuses to jump 3.1 Effect sound of horse juddering to a halt 3.2 Horse disqualified 3.3 Time trial is terminated
GamePlayer : Horse : Sound :Obstacle :GymnkhanaWorld :Display move ( ) makeSound ( ) play (soundFX) jump ( ) jumpTest ( ) play (soundFX) [refusal] disqualify ( ) displayGameStatus ( ) display ( ) finishTrial ( )
B: Horse hits obstacle 4.1 Effect sound of horse hitting obstacle 4.2 Time penalty awarded 4.3 Time penalty displayed
GamePlayer : Horse : Sound :Obstacle :GymnkhanaWorld :Display move ( ) makeSound ( ) play (soundFX) jump ( ) jumpTest ( ) breakApart( ) play (soundFX) [hit] updatePenalty ( ) displayGameStatus ( ) display ( )