Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A....

74
Design I Today: Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger

Transcript of Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A....

Page 1: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

Design IDesign I

Today:Today: Overview Practice

Design1.f12.ppt

CS 121“Ordering Chaos”

“Mike” Michael A. Erlinger

Page 2: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 2 – CS 121

AdministriviaAdministrivia

Team Blogs being used??Team Blogs being used??

Grading - ReviewGrading - Review

Page 3: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 3 – CS 121

Due: This WeekDue: This Week

Elicitation ReportElicitation Report

Game Use CasesGame Use Cases

Technology AssessmentTechnology Assessment

PyGamePyGame

Trac, SVNTrac, SVN

PiazzaPiazza

ManagementManagement Weekly meeting notes with link to goal stack This week’s goal stack (in general rework of last week’s), an

updated copy of last week’s

Page 4: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 4 – CS 121

DesignDesign

PracticesPractices

PrinciplesPrinciples

PatternsPatterns

What are the characteristics of good design?

What are good solutions to common design problems?

How do we go about design and what do we produce?

Page 5: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 5 – CS 121

cs121 designcs121 design

GameGame

User interfaceUser interface

Software Software

Test planTest plan

This is well underway.

Page 6: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 6 – CS 121

But what is design?

Page 7: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 7 – CS 121

Design: the verbDesign: the verb

“Design is the planning that lays the basis for the making.”

-wikipedia

Page 8: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 8 – CS 121

Design: the nounDesign: the noun

““Blueprint, something intended as a guide for making Blueprint, something intended as a guide for making something else.something else.””

- google define:design

“Features of shape, configuration, pattern, or ornamentation that can be judged by the eye in finished products. “

NASA

Page 9: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 9 – CS 121

Design: The ProcessDesign: The Process

“Plans are worthless. Planning is priceless.”

-eisenhower

Page 10: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 10 – CS 121

Design: a la cs121Design: a la cs121

noun: a model that captures the essential properties noun: a model that captures the essential properties of a thingof a thing

verb: the practice of verb: the practice of ““creatingcreating”” a design to solve some a design to solve some problemproblem

Page 11: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 11 – CS 121

verbs: Model ≠ Designverbs: Model ≠ Design

Requirements models Documentation

project start project end

Design models

what should it do how will it do it how it does it

Design is a creative, problem-solving process!Design models are predictive. NOT RESTRICTIVE

Page 12: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 12 – CS 121

designdesign

create the pieces to create the picture

Page 13: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 13 – CS 121

How Do We Go About Design?How Do We Go About Design?

model model

review (critique)review (critique)

repeatrepeat

until everyone is happy “enough”especially in Agile iterative never finished versus TLB

Page 14: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 14 – CS 121

Iterative DevelopmentIterative Development

In each iteration:In each iteration:• Identify the objectives/goals of the iteration• Design a solution to achieve the objectives• Implement the solution• Test the implementation

we talked about this last time

Page 15: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 15 – CS 121

Agile requirementsAgile requirementsAt the start of each iteration: At the start of each iteration:

Incorporate new goals (often produced by last iteration)Incorporate new goals (often produced by last iteration)

Remove goals no longer neededRemove goals no longer needed

ReprioritizeReprioritize

Clarify requirements for goals at top of stackClarify requirements for goals at top of stack

Plan iterationPlan iteration

highest priority goal

lowest priority goal

Page 16: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 16 – CS 121

Iterative DevelopmentIterative Development

In each iteration:In each iteration:

• Identify the objectives of the iteration• Design a solution to achieve the objectives

Model solutionReviewRepeat until good enough

• Implement the solution• Test the implementation

Page 17: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 17 – CS 121

Agile DesignAgile Design

Balance is a Balance is a Key Team DecisionKey Team Decision

design for now design for later

Page 18: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 18 – CS 121

Agile DesignAgile Design

design skeleton add meat

early iterations early iterations

Do NOT expect to get everything right the first time!!!

Page 19: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 19 – CS 121

CS121 Project LandmarksCS121 Project Landmarks

alpha beta v1

stable architecture,stable GUI

game for user testing release to customer

Page 20: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 20 – CS 121

DesignDesign

PracticesPractices

PrinciplesPrinciples

PatternsPatterns

What are the characteristics of good design?

What are good solutions to common design problems?

How do we go about design and what do we produce?

Page 21: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 21 – CS 121

Forms of ModelsForms of Models

Text (hyperlinked) – might have a document, e.g., Game Text (hyperlinked) – might have a document, e.g., Game Design DocumentDesign Document

Diagrams, charts, graphs – layout the structure, Diagrams, charts, graphs – layout the structure, interaction, etc.interaction, etc.

Prototypes – express design, allow risk evalPrototypes – express design, allow risk eval

Mathematical modelsMathematical models

Page 22: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 22 – CS 121

Agile ModelsAgile Models

Know your purposeKnow your purpose

Choose the simplest form that works for that purposeChoose the simplest form that works for that purpose

e.g., Math for a physics engine, Layout for UIe.g., Math for a physics engine, Layout for UI

Know when to throw it awayKnow when to throw it away

Page 23: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 23 – CS 121

Forms of ModelsForms of Models

Text (hyperlinked)Text (hyperlinked)

DiagramsDiagrams, charts, graphs, charts, graphs

Prototypes Prototypes

Mathematical modelsMathematical models

Page 24: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 24 – CS 121

Unified Modeling LanguageUnified Modeling Language

The UML is a standard language The UML is a standard language for visualizing, specifying, for visualizing, specifying, constructing, and constructing, and documenting the artifacts of documenting the artifacts of a software system.a software system.

Page 25: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 25 – CS 121

Domain ModelTop Level Design ModelDomain ModelTop Level Design ModelA domain modelA domain model

... in software engineering can be thought of as a ... in software engineering can be thought of as a conceptual model of a domain of interest (problem conceptual model of a domain of interest (problem domain) which describes the various entities, their domain) which describes the various entities, their attributes, roles and relationships plus the attributes, roles and relationships plus the constraints that govern the integrity of the model constraints that govern the integrity of the model elements comprising that problem domain.elements comprising that problem domain.

Page 26: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 26 – CS 121

Use Cases:Example: Course SchedulingUse Cases:Example: Course Scheduling

• Register for Classes

• Buy Text Books

• Choose Classes

Page 27: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 27 – CS 121

Domain model:Course SchedulingDomain model:Course Scheduling

CourseCourse Offering

Instructor

StudentTextbookTime Slot

Room

Meeting

Class List

Author

Department College

Major

Building

Semester

uses

written by

Page 28: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 28 – CS 121

Use Cases and Domain Model:Course SchedulingUse Cases and Domain Model:Course Scheduling

•Choose Classes -- can we realize •Who keeps a list of all courses•Where is the course schedule

•Should the “Registrar” be added

Page 29: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 29 – CS 121

Domain Model - PacmanDomain Model - Pacman

PlayerPacman

Screen grid

moves

Grid Cell

positioned on

has aType

Level

has a

lives score

Page 30: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 30 – CS 121

Next Level: Design ModelNext Level: Design ModelMove From Domain Model to Design ModelMove From Domain Model to Design Model

Major classesMajor classes

Responsibility of each classResponsibility of each class

Interactions of classes, i.e., Fan in, Fan outInteractions of classes, i.e., Fan in, Fan out

Page 31: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 31 – CS 121

Design Model (work in progress)Design Model (work in progress)

PlayerSpriteLivesScoreCurrent cellMove()

Sprite

LevelCells

GameLevel Cell

Blank cell Ghost cell Dot cell

Page 32: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 32 – CS 121

CRC Cards Technique(Responsibility-Driven Design)CRC Cards Technique(Responsibility-Driven Design)

Informal, non-detailedInformal, non-detailed

Used for group brain-stormingUsed for group brain-storming

End result is a first cut at design modelEnd result is a first cut at design model

Not intended to provide a complete designNot intended to provide a complete design

To start from Domain Model: consider if each To start from Domain Model: consider if each noun should be a class and if each verb noun should be a class and if each verb should be a responsibility of the noun or should be a responsibility of the noun or class to which it belongs.class to which it belongs.

CRC – Class, Responsibility, Collaboration

Page 33: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 33 – CS 121

Domain DesignDomain Design

CRC cards: design method for OOCRC cards: design method for OO Class Super and Sub classes, if appropriate Responsibilities Collaboration – other classes Author

“Act out use cases”

CRC - Class, Responsibility, Collaboration

Page 34: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 34 – CS 121

CRC: The Basic IdeaCRC: The Basic Idea

Develop set of index cards. Develop set of index cards.

Each card represents one design class.Each card represents one design class.

A card contains:A card contains: The name of the class.

The responsibilities of the class.

Collaborations: other classes with which this class interacts and its responsibilities in the interaction

Page 35: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 35 – CS 121

Format of CRC cardsFormat of CRC cards

Responsibilities

___________

___________

____________

Class Namesuper class

sub-classes

Collaborations

____________

____________

____________

Limiting the size of a card is an attempt at preventingthe class from becoming too complex.

Page 36: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 36 – CS 121

Pacman Move Use CasePacman Move Use Case

Move:Move:

1.1. Player moves Pac Man left, right, up, downPlayer moves Pac Man left, right, up, down

2.2. Pac Man moves to new space Pac Man moves to new space

2a2a Attempted move prohibited by wall, no movementAttempted move prohibited by wall, no movement

3.3. New space is blankNew space is blank

3a.3a. New space has dot but not last dot, 50 points New space has dot but not last dot, 50 points awardedawarded

3b. New space has last dot, 50 points awarded, new 3b. New space has last dot, 50 points awarded, new level startslevel starts

3c. New space has ghost, life decreases by 1, if last 3c. New space has ghost, life decreases by 1, if last life game endslife game ends

Page 37: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 37 – CS 121

Domain Model: PacmanDomain Model: Pacman

PlayerPacman

Screen grid

moves

Grid Cell

positioned on

has aType

Level

has a

lives score

Page 38: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 38 – CS 121

Classes from Domain ModelClasses from Domain Model

PlayerPlayer

PacmanPacman

ScoreScore

LivesLives

LevelLevel

Screen gridScreen grid

Grid CellGrid Cell

Cell typeCell type

Page 39: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 39 – CS 121

Player CRC cardPlayer CRC card

PlayerClass

Page 40: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 40 – CS 121

Player CRC cardPlayer CRC card

Player super class:

sub-classes:

Super- and Sub-classesif any

Page 41: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 41 – CS 121

Player CRC cardPlayer CRC card

Move

Remember score

Remember number of lives

Player

Responsibilities

Page 42: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 42 – CS 121

Player CRC cardPlayer CRC card

Move

Remember score

Remember number of lives

Player

Collaborationscollaborate with ?

Page 43: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 43 – CS 121

ResponsibilitiesResponsibilities

PlayerPlayer

PacmanPacman

ScoreScore

LivesLives

LevelLevel

Screen gridScreen grid

Grid CellGrid Cell

Cell typeCell type

Maybe Lives and Score should be part of Player Maybe Lives and Score should be part of Player ClassClass

Use Design principles/patterns to decideUse Design principles/patterns to decide

remember current cell, draw self

Page 44: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 44 – CS 121

ResponsibilitiesResponsibilities

PlayerPlayer

PacmanPacman

ScoreScore

LivesLives

LevelLevel

Screen gridScreen grid

Grid CellGrid Cell

Cell typeCell type

maybe these should be “attributes” of the player class rather than proper

classes…so what DO YOU DO?

Page 45: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 45 – CS 121

Attribute vs. CollaborationAttribute vs. Collaboration

An object of a class typically has one or more An object of a class typically has one or more attributesattributes..

Attributes have Attributes have valuesvalues that specify or that specify or describe the object.describe the object.

A value might or might not deserve the A value might or might not deserve the distinction of being an object itself.distinction of being an object itself.

A would-be attribute that is object-valued is A would-be attribute that is object-valued is actually a actually a collaborationcollaboration..

Page 46: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 46 – CS 121

Design Model:How Does move Work?Design Model:How Does move Work?

PlayerSpriteLivesScoreCurrent cellMove()

Sprite

LevelCells

GameLevel

Cellposition

Blank cell Ghost cell Dot cell

Page 47: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 47 – CS 121

Design Model: How Does move Work?Design Model: How Does move Work?

PlayerSpriteLivesScoreMove()

Sprite

LevelCellsCurrent cell

GameLevel

Cellposition

Blank cell Ghost cell Dot cell

Page 48: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 48 – CS 121

Design Model: Sometime laterDesign Model: Sometime later

PlayerSpriteLivesScorePositionMove()

Sprite

LevelCells

GameLevel

Cellposition

Blank cell Ghost cell Dot cell

Has a

Is a

Page 49: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 49 – CS 121

How to decideHow to decide

Design principlesDesign principles

Software design principles represent a set of guidelines Software design principles represent a set of guidelines that helps us to avoid having a bad design. Avoid that helps us to avoid having a bad design. Avoid Rigidity and Fragility; keep it simple, optimize for the Rigidity and Fragility; keep it simple, optimize for the most important tasks, use default values, ..most important tasks, use default values, ..

Design patternsDesign patterns

A design pattern is a general reusable design solution A design pattern is a general reusable design solution to a commonly occurring problem within a given to a commonly occurring problem within a given context in software design – not a finished design, context in software design – not a finished design, but a template for how to solve a problem, e.g., but a template for how to solve a problem, e.g., algorithmsalgorithms

Page 50: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 50 – CS 121

Design class modelsDesign class models

attributes

responsibilities

Student

ID

registers

name

Page 51: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 51 – CS 121

Class ModelsClass Models

Our models evolve ...Our models evolve ...

FFrom Abstract to Specificrom Abstract to Specific

data

methods

Student

int ID

void registers()

name

Page 52: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 52 – CS 121

Class Models: Aggregation/CompositionClass Models: Aggregation/Composition

Student

int IDcourse courseList

void registers()

Course

course ID

“has a”

1,…

Page 53: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 53 – CS 121

Class Model: InheritanceClass Model: Inheritance

Student

int ID

void registers()

Part Time Student

int ID

void registers()

Full Time Student

int ID

void registers()

Page 54: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 54 – CS 121

Use Case Realization:Sequence DiagramUse Case Realization:Sequence DiagramFormalize the ‘acting out” of CRC cardsFormalize the ‘acting out” of CRC cards

Student Registrar Course list

register( int classID) course.stillOpen(classID)

true…

Page 55: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 55 – CS 121

Design ProcessDesign Process

Design classes

implement

Design documents,UML, CRC, etc.

USE CASES

Page 56: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 56 – CS 121

UMLUML

Capture important classes, responsibilities, Capture important classes, responsibilities, collaborationscollaborations

Often omit unnecessary detail:Often omit unnecessary detail: e.g. helper classes like lists

Page 57: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 57 – CS 121

Classification of UML Classification of UML

• User model view– use case diagrams

• Structural model view– class diagrams– object diagrams

• Behavioral model view– sequence diagrams– collaboration diagrams– state machine diagrams– activity diagrams

• Implementation model view– component diagrams

• Environment model view– deployment diagrams

Page 58: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 58 – CS 121

Forms of Design ModelsForms of Design Models

Text (hyperlinked)Text (hyperlinked)

Diagrams, charts, graphsDiagrams, charts, graphs

Prototypes Prototypes

Software (e.g. proofs of concepts)Software (e.g. proofs of concepts)

Mathematical modelsMathematical models

good form for “testing” design

Page 59: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 59 – CS 121

PrototypesPrototypes

CommunicateCommunicate

“These are the basics of the game…”

Page 60: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 60 – CS 121

PrototypesPrototypes

CommunicateCommunicate

Resolve technical risksResolve technical risks

“We know how to detect collisions.”

Page 61: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 61 – CS 121

PrototypesPrototypes

CommunicateCommunicate

Resolve technical risksResolve technical risks

Evaluate/testEvaluate/test

“This is how the screens will look. What do you think?”

Page 62: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 62 – CS 121

PrototypesPrototypes

CommunicateCommunicate

Resolve technical risksResolve technical risks

Evaluate/testEvaluate/test

Iterative design/development strategyIterative design/development strategy

Never convert to “real” codeNever convert to “real” code

Prototype 1Prototype 0 Prototype n= v.1

Page 63: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 63 – CS 121

Agile Modeling PrinciplesAgile Modeling Principles

Know your purposeKnow your purpose

Choose the simplest form that worksChoose the simplest form that works

Know when to throw it awayKnow when to throw it away

These apply to prototypes

Page 64: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 64 – CS 121

Prototyping PrinciplesPrototyping Principles

Know your purpose and expected outcomesKnow your purpose and expected outcomes

Make concrete your vision for the customer: Verbal feedback.

Is our core gameplay fun? User questionnaire.

Is pygame collision detection fast enough? Calculate FPS vs. # sprites (50x50) in full screen mode.

Page 65: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 65 – CS 121

Prototyping PrinciplesPrototyping Principles

Know your purpose and expected outcomesKnow your purpose and expected outcomes

Choose the simplest form that worksChoose the simplest form that works important to trade time for details

UI mockupsstoryboards

Page 66: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 66 – CS 121

Prototyping PrinciplesPrototyping Principles

Ask a questionAsk a question

Devise a test protocol or metricDevise a test protocol or metric

Choose the simplest form that worksChoose the simplest form that works

software executables(try prototyping tools like Gamemaker and pygame)

Page 67: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 67 – CS 121

Prototyping PrinciplesPrototyping Principles

Ask a questionAsk a question

Devise a test protocol or metricDevise a test protocol or metric

Choose the simplest form that worksChoose the simplest form that works

Know when to throw it awayKnow when to throw it away more time developing prototype harder to throw out

Page 68: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 68 – CS 121

Prototyping PrinciplesPrototyping Principles

Ask a questionAsk a question

Devise a test protocol or metricDevise a test protocol or metric

Choose the simplest form that worksChoose the simplest form that works

Know when to Know when to throw it awaythrow it away or or refactorrefactor

change the internal structure without affecting the external behavior

Page 69: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 69 – CS 121

Mathematical ModelsMathematical Models

Algebraic models: i.e. FPS(# sprites)Algebraic models: i.e. FPS(# sprites)

Combinatoric models: i.e. #winning strategiesCombinatoric models: i.e. #winning strategies

Probabilistic models: Probabilistic models:

i.e. Prob(A wins | weapons of A and B)i.e. Prob(A wins | weapons of A and B)

SimulationSimulation

Page 70: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 70 – CS 121

How do we go about design?How do we go about design?

model model

review (critique)review (critique)

repeatrepeat

Next time: Formal design reviews

Page 71: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 71 – CS 121

Next timeNext time

Design reviewsDesign reviews

More Design principlesMore Design principles

Page 72: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 72 – CS 121

The EndThe End

Page 73: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 73 – CS 121

The EndThe End

Page 74: Design I Today: Overview Practice Design1.f12.ppt CS 121 “Ordering Chaos” “Mike” Michael A. Erlinger.

– 74 – CS 121

Domain ModelDomain Model

PlayerPacman

Screen grid

moves

Grid Cell

positioned on

has aType

Level

has a

lives score