SlideShare uma empresa Scribd logo
1 de 28
Building Blocks
Chapter 4
16 March 2015 1Mr. R. B. Pawar
 Introduction
 Software factory refers to a methodology of producing
software that centralizes and simplifies the production
of specific common modules
 These common modules form a core set of tools and
libraries and are well maintained and supported over
a series of products
 Software factory method is well suited for project
with common functionality
 From management perceptive, this saves a lot of
money by using the already written code instead of
writing them once again by specialists.
 These codes are already tested, integrated and
debugged
16 March 2015 2Mr. R. B. Pawar
The tasks which can be made into reusable
modules generally are:
1. Screen code
2. Sound setup code
3. CD track playing code
4. Data file loaders
5. Compression and decompression libraries
6. Windowing and graphic features
7. Menu code
8. Environment setup
9. Hardware, software configuration
10. Encryption/decryption code
16 March 2015 Mr. R. B. Pawar 3
Advantages of software factory
o More code reuse can reduce the project development time
o Since the code is tried and tested, it is more reliable
o The efforts of skilled programmers are reduced and they
can be used for doing other tasks
o It also spreads knowledge about those modules to many
developers
o Project progress can be easily seen
16 March 2015 Mr. R. B. Pawar 4
Disadvantages of software factory
o The code has to be more generic to be used across
different products
o It takes more time and effort to develop
o The first project which makes reusable modules takes
longer time
o For each platform, separate reusable wrapper libraries
must be developed
o These libraries have to be maintained and new developers
have to spend time learning these new libraries
16 March 2015 Mr. R. B. Pawar 5
4.2 Game development issues
– Common issue in game development are platform
independence and the risk in losing key personal
4.2.1 Platform independence
o In the architecture design, we need to provide interface to all the
platform-specific codes
o Every platform of different h/w configuration with different graphics
card, sound card, etc
o These codes have to be written and linked through a common
interface
o Using middleware we can solve the problem of hardware
independence
o
4.2.2 Risk reduction
16 March 2015 6Mr. R. B. Pawar
4.3 Core group in software factor and their
interactions
1.Game design group
2.Architecture group
3.Tools group
4.Project group
5.Research group
6.Core component group
4.3.1 Game design group
o The game design group mainly interacts with the architect
group to know the project visibility (progress)
o They can provide input to tools and components group
o For example, they can directly contribute script to AI
scripting engine or if a database is developed to store tweak
able parameter, then game designers can provide more
parameter to it
o These parameters are part of soft architecture and can be
modified without affecting the hard(structure) architecture
o The game designer group also interacts with ancillary sound
and art group to specify the look and feel of the game
4.3.2 Software architect group
o The software architect group acts as hub between game
designer group and the other groups
o The members of the software architect group acts as a leader to
all the programming group
o The core function of this group is to translate the game design
document into technical design document understanding the
available tools and components
o If necessary tools are not found, they prepare specification for
modifications of components and tools or initiate development
of new components and tools after research
o Members of this group provides the feasibility report to game
design group and also provide advice regarding the technical
issues of the game
o This group is also responsible for keeping control over company
standards for coding and documentation
o These standards include file formats, source control standards,
interface definition standards, directory structures, etc
o Members of this group need high technical skills and should be
able to answer any technical query from all other groups
4.3.3 Tools group
o Primary responsibility of this group is production
and maintenance of tools that will be required by
all development groups
o Some tools are built in house, while there are some
off-the-self tools available in the market like 3D
studio MAX
o
4.3.4 components group
 Responsible for developing low-level modules,
interfaces to other third-party components,
platform-specific libraries and modules related to
some common tasks such as compression libraries
 As experience of the team grow more
functionality can be added
 Each component should have a an interface so
that implementation changes do not have an
impact on other modules and perform only one
task to allow reusability
4.3.5 Project group
 Prime goal of this group is to find the feasibility of
the project
 For this they have produce prototype of the
product with the available support from
component and tools
 If in the prototype no anomalies found, then
project gets a go ahead
 The game design group interacts with project
group through the architecture group to ensure
that project schedule is maintained
16 March 2015 Mr. R. B. Pawar 12
4.3.6 Research group
 Main function of this group is to investigate and
prototype new technologies and include it in the
libraries for use by all projects
 The results of their research are detailed in journal
and this journal is frequently reviewed and checked
 The purpose of this group is to remove all open ended
research from the critical path of development so that
the risk of schedule slips does not arise
 The size of this group varies depending on the
requirement of members in other group
16 March 2015 Mr. R. B. Pawar 13
4.3.7 Ancillary group
 Sound, art, testing, marketing and management
belong to this group
 Though directed by architect group this group can
directly interact with game design group
 Main function of testing group is to do integration
testing compatibility testing
16 March 2015 Mr. R. B. Pawar 14
Summary of core group interaction in software factory
 Assemble programming group for each project according to its
needs and make efficient use of resources
 Understanding the strength and weakness of each group. Do
not over burden them
 Allow knowledge transfer by moving the free members to
another group which has more work
 knowledge can be spread among team members by rotating
them frequently to different groups except when the project
is nearing completion
 The knowledge transfer also minimizes the risk if a member
leaves the company all of sudden
16 March 2015 Mr. R. B. Pawar 15
4.4.1 Design reuse
o Design pattern is a solution for a problem that
frequently come up in software development
o Design patterns arise out of experience of designers
and are easily understood and applied to various
projects by developer
o These are specific to domain and so that developer
are understanding the domain well before they start
coding
o Some common design patterns applicable to games
are given as follows:
Design reuse
1. Object factory
 Object factory creates a family of object
 All the object created by the factory are derived from the same
abstract class and are returned as reference to this class
 The object factory keeps track of all these objects in a list
 When an object is deleted, it is removed from the list
 Object factory receives request from a client to create an object
representing a token within a level
 Each token has a unique ID and loading is passing that ID to
object factory and getting a return pointer to the base class
 At the end of each level if object remains in the list, they are
automatically deleted
 This is done using a memory tracker class, which is an
instantiated member of the game object class
 The constructor of this class stores a reference to game object
and inserts itself to the list in the factory class
 When a game object is deleted, the destructor member of
memory tracker is invoked which removes the reference to itself
from the factory class list
Design reuse
2. Singleton pattern
o This pattern ensures that only one instance of a particular
object can exist in the application
o Ex. Only one instance of an object wrapping the sound
card or graphics card is required
o This singleton object is instantiate mostly on program
initialization or on first use of the object
o In the first case, the constructor of the singleton is first
called before the main function and in the second case , it
is called on demand
o Singleton not instantiate if not called
o The static modifier takes care that only one instance of
singleton class exists
o An example would be for a class that read and writes a
configuration file
Design reuse
3. Flyweight pattern
o This pattern is used along with singleton pattern’
o The flyweight allows multiple instance of the class to
be instantiated, but all of them refer to a common
component shared by them all
o Individual configuration data is stored within flyweight
object
o Advantage of this pattern is that it saves memory
o Disadvantage is it can be used only for read only
resources
o It is of no use if local modification to the global
resource has to be made
Design Reuse
4. Chain of responsibility pattern
 This pattern set up a chain of objects that receive
notification of an event thereby avoids direct
coupling of event, signaling the object with the
chain of object interested in handling that event
 Implementation can be through class diagram or
runtime object hierarchy
 Disadvantage of class hierarchy is that the chain is
fixed at compile time, meaning the class hierarchy
can not be changed
5. Iterator and reverse iterator pattern
 This pattern allows the game developer to simplify the
algorithm that needs to iterate on a list of items, so as to
increase the speed of game execution
 In game development, we could create an iterator that will
iterate through a list of game objects and return them in
the ascending order of their distance from the camera
 The code will contain the class declaration for the list with
Insert() and Get() members to insert and retreive
members
 An abstract class iterator is defined outside the list class
declaration
 This defines the interface for an iterator and allows iterator
for all collection classes

6. Templates and strategy methods
pattern
 This pattern allows dynamic selection
of algorithm
 Ex: a computer-controlled character
could use the strategy method for
choosing different styles of play
 Coder can implement a generic style
and attach a new strategy at runtime
to customize the style
 Later, a different styles can be added if
required to the generic class
encapsulating a new algorithm in
concrete class for that style of play
 Adding many styles can create a
problem in managing and maintaining
code
Design Reuse
7. Observer pattern
 Also called as “publish-subscribe model”
 One to many relationship between observed and
observer object
 When observed object changes , all the objects are
notified about that change
 Disadvantage of this pattern is that the object being
observed has no way of finding out which are the objects
observing it
 This can be achieved by allowing each observing object to
subscribe to main object that is being observed
 This gives the possibility of applying the filtering
condition at source to prevent too many notification
messages being sent out
Design Reuse
8. Command pattern
 Allows commands to be encapsulated and passed around
as objects
 In games, AI is implemented by using scripts
 By scripting AI, compiler time is saved
 Command pattern encapsulates game functionality as
commands which can be typed into a console, stored and
replayed or even scripted to help test the game
 To implement this, the scripts are written in the text file
and used along with an object factory to create the
command objects specified in the text file and then link
them

Design Reuse
9. Facade pattern
– This pattern provides a simplified interface to
third party libraries or a subsystem of related
classes
– This reduces the complexity of using the
subsystem interface
– The façade pattern also enables portability of
code across different platform
– i.e. the same client source code can be used
across different system libraries if the façade
interface is implemented correctly on all target
systems
Design Reuse
10. Mediator pattern
 It is very close to the façade pattern
 The facade works as an interface between a client and a
set of subsystems, whereas a mediator manages the
interactions among the subsystems
 Communication in façade is one-way, but the
communication in mediator it is two-way
 Advantage of this pattern is that it promotes loose
coupling by removing the need for the mediator objects
to hold references to one another
 The mediated objects have been to conform to the
interface rules of mediator
 The mediator implements as an observer, because it
observes the mediated object and responds to events
raised by them
Design Reuse
11. State pattern
 allows an object to change its
behavior according to the
changes that happens in its
internal state
 Ex. In the fighting game the
fighter character can be in one of
the three states namely, “angry”,
“very angry”, “extremely angry”
 In each of these states, the
fighter uses different set of
moves
Design Reuse summary
• Design pattern offers general solution to
problems
• Not all the patterns are useful for games
• At the architectural level, all games of a genre
are inherently similar
• Using design pattern definitely reduces the
effort and thereby the cost of development

Mais conteúdo relacionado

Mais procurados

Software Engineering : Requirement Analysis & Specification
Software Engineering : Requirement Analysis & SpecificationSoftware Engineering : Requirement Analysis & Specification
Software Engineering : Requirement Analysis & SpecificationAjit Nayak
 
Final year project presentation
Final year project presentationFinal year project presentation
Final year project presentationSulemanAliMalik
 
C++ Restrictions for Game Programming.
C++ Restrictions for Game Programming.C++ Restrictions for Game Programming.
C++ Restrictions for Game Programming.Richard Taylor
 
Software Product Line
Software Product LineSoftware Product Line
Software Product LineHimanshu
 
Game Design Portfolio: 3 Case Studies
Game Design Portfolio: 3 Case StudiesGame Design Portfolio: 3 Case Studies
Game Design Portfolio: 3 Case StudiesCaroline Murphy
 
Unreal Engine (For Creating Games) Presentation
Unreal Engine (For Creating Games) PresentationUnreal Engine (For Creating Games) Presentation
Unreal Engine (For Creating Games) PresentationNitin Sharma
 
COMPUTER GRAPHICS PROJECT REPORT
COMPUTER GRAPHICS PROJECT REPORTCOMPUTER GRAPHICS PROJECT REPORT
COMPUTER GRAPHICS PROJECT REPORTvineet raj
 
Intro to Game Design
Intro to Game DesignIntro to Game Design
Intro to Game DesignGraeme Smith
 
Pressman ch-11-component-level-design
Pressman ch-11-component-level-designPressman ch-11-component-level-design
Pressman ch-11-component-level-designOliver Cheng
 
Introduction to Level Design
Introduction to Level DesignIntroduction to Level Design
Introduction to Level DesignRico Lemba
 
Pressman ch-21-project-management-concepts
Pressman ch-21-project-management-conceptsPressman ch-21-project-management-concepts
Pressman ch-21-project-management-conceptsseethaveera
 
Hci In The Software Process
Hci In The Software ProcessHci In The Software Process
Hci In The Software Processahmad bassiouny
 
Overview of UML Diagrams
Overview of UML DiagramsOverview of UML Diagrams
Overview of UML DiagramsManish Kumar
 
Design Pattern in Software Engineering
Design Pattern in Software EngineeringDesign Pattern in Software Engineering
Design Pattern in Software EngineeringManish Kumar
 

Mais procurados (20)

Software Engineering : Requirement Analysis & Specification
Software Engineering : Requirement Analysis & SpecificationSoftware Engineering : Requirement Analysis & Specification
Software Engineering : Requirement Analysis & Specification
 
Final year project presentation
Final year project presentationFinal year project presentation
Final year project presentation
 
C++ Restrictions for Game Programming.
C++ Restrictions for Game Programming.C++ Restrictions for Game Programming.
C++ Restrictions for Game Programming.
 
Software Product Line
Software Product LineSoftware Product Line
Software Product Line
 
Game Design Portfolio: 3 Case Studies
Game Design Portfolio: 3 Case StudiesGame Design Portfolio: 3 Case Studies
Game Design Portfolio: 3 Case Studies
 
Software architecture
Software architectureSoftware architecture
Software architecture
 
Unreal Engine (For Creating Games) Presentation
Unreal Engine (For Creating Games) PresentationUnreal Engine (For Creating Games) Presentation
Unreal Engine (For Creating Games) Presentation
 
COMPUTER GRAPHICS PROJECT REPORT
COMPUTER GRAPHICS PROJECT REPORTCOMPUTER GRAPHICS PROJECT REPORT
COMPUTER GRAPHICS PROJECT REPORT
 
Context diagram
Context diagramContext diagram
Context diagram
 
Zombi - Shoot for Survive
Zombi - Shoot for SurviveZombi - Shoot for Survive
Zombi - Shoot for Survive
 
Intro to Game Design
Intro to Game DesignIntro to Game Design
Intro to Game Design
 
Pressman ch-11-component-level-design
Pressman ch-11-component-level-designPressman ch-11-component-level-design
Pressman ch-11-component-level-design
 
Phases of game development
Phases of game developmentPhases of game development
Phases of game development
 
OOAD
OOADOOAD
OOAD
 
Introduction to Level Design
Introduction to Level DesignIntroduction to Level Design
Introduction to Level Design
 
Pressman ch-21-project-management-concepts
Pressman ch-21-project-management-conceptsPressman ch-21-project-management-concepts
Pressman ch-21-project-management-concepts
 
Hci In The Software Process
Hci In The Software ProcessHci In The Software Process
Hci In The Software Process
 
Overview of UML Diagrams
Overview of UML DiagramsOverview of UML Diagrams
Overview of UML Diagrams
 
Design Pattern in Software Engineering
Design Pattern in Software EngineeringDesign Pattern in Software Engineering
Design Pattern in Software Engineering
 
Software maintenance
Software maintenanceSoftware maintenance
Software maintenance
 

Semelhante a Building blocks (Game Architecture)

SOFTWARE DEVELOPMENT AND PROCESS MODELS.pptx
SOFTWARE DEVELOPMENT AND PROCESS MODELS.pptxSOFTWARE DEVELOPMENT AND PROCESS MODELS.pptx
SOFTWARE DEVELOPMENT AND PROCESS MODELS.pptxSanthanalakshmiSelva2
 
DOC-20210303-WA0017..pptx,coding stuff in c
DOC-20210303-WA0017..pptx,coding stuff in cDOC-20210303-WA0017..pptx,coding stuff in c
DOC-20210303-WA0017..pptx,coding stuff in cfloraaluoch3
 
Software Engineering with Objects (M363) Final Revision By Kuwait10
Software Engineering with Objects (M363) Final Revision By Kuwait10Software Engineering with Objects (M363) Final Revision By Kuwait10
Software Engineering with Objects (M363) Final Revision By Kuwait10Kuwait10
 
Design pattern application
Design pattern applicationDesign pattern application
Design pattern applicationgayatri thakur
 
Keep calm and write reusable code in Android
Keep calm and write reusable code in AndroidKeep calm and write reusable code in Android
Keep calm and write reusable code in AndroidJuan Camilo Sacanamboy
 
SDLC and Software Process Models
SDLC and Software Process ModelsSDLC and Software Process Models
SDLC and Software Process ModelsNana Sarpong
 
Sana_Final_Project_Documentation
Sana_Final_Project_DocumentationSana_Final_Project_Documentation
Sana_Final_Project_DocumentationSameer Srinivas
 
MK_MSc_Degree_Project_Report ver 5_updated
MK_MSc_Degree_Project_Report ver 5_updatedMK_MSc_Degree_Project_Report ver 5_updated
MK_MSc_Degree_Project_Report ver 5_updatedMohammed Ali Khan
 
report_barc
report_barcreport_barc
report_barcsiontani
 
CSCI-UA 102 sec 3,5, Fall 2015Programming Project 6Joann.docx
CSCI-UA 102 sec 3,5, Fall 2015Programming Project 6Joann.docxCSCI-UA 102 sec 3,5, Fall 2015Programming Project 6Joann.docx
CSCI-UA 102 sec 3,5, Fall 2015Programming Project 6Joann.docxfaithxdunce63732
 
An Introduction to Feature Flags
An Introduction to Feature FlagsAn Introduction to Feature Flags
An Introduction to Feature FlagsCloudZenix LLC
 
A FRAMEWORK STUDIO FOR COMPONENT REUSABILITY
A FRAMEWORK STUDIO FOR COMPONENT REUSABILITYA FRAMEWORK STUDIO FOR COMPONENT REUSABILITY
A FRAMEWORK STUDIO FOR COMPONENT REUSABILITYcscpconf
 
MC0078 SMU 2013 Fall session
MC0078 SMU 2013 Fall sessionMC0078 SMU 2013 Fall session
MC0078 SMU 2013 Fall sessionNarinder Kumar
 
Android Architecture, Environment, and Components.pptx
Android Architecture, Environment, and Components.pptxAndroid Architecture, Environment, and Components.pptx
Android Architecture, Environment, and Components.pptxHasanulFahmi2
 
Software design.edited (1)
Software design.edited (1)Software design.edited (1)
Software design.edited (1)FarjanaAhmed3
 

Semelhante a Building blocks (Game Architecture) (20)

Sample SRS format
Sample SRS formatSample SRS format
Sample SRS format
 
SOFTWARE DEVELOPMENT AND PROCESS MODELS.pptx
SOFTWARE DEVELOPMENT AND PROCESS MODELS.pptxSOFTWARE DEVELOPMENT AND PROCESS MODELS.pptx
SOFTWARE DEVELOPMENT AND PROCESS MODELS.pptx
 
DOC-20210303-WA0017..pptx,coding stuff in c
DOC-20210303-WA0017..pptx,coding stuff in cDOC-20210303-WA0017..pptx,coding stuff in c
DOC-20210303-WA0017..pptx,coding stuff in c
 
Software Engineering with Objects (M363) Final Revision By Kuwait10
Software Engineering with Objects (M363) Final Revision By Kuwait10Software Engineering with Objects (M363) Final Revision By Kuwait10
Software Engineering with Objects (M363) Final Revision By Kuwait10
 
Design pattern application
Design pattern applicationDesign pattern application
Design pattern application
 
Keep calm and write reusable code in Android
Keep calm and write reusable code in AndroidKeep calm and write reusable code in Android
Keep calm and write reusable code in Android
 
SDLC and Software Process Models
SDLC and Software Process ModelsSDLC and Software Process Models
SDLC and Software Process Models
 
Sana_Final_Project_Documentation
Sana_Final_Project_DocumentationSana_Final_Project_Documentation
Sana_Final_Project_Documentation
 
MK_MSc_Degree_Project_Report ver 5_updated
MK_MSc_Degree_Project_Report ver 5_updatedMK_MSc_Degree_Project_Report ver 5_updated
MK_MSc_Degree_Project_Report ver 5_updated
 
gopal hp
gopal hpgopal hp
gopal hp
 
report_barc
report_barcreport_barc
report_barc
 
Introduction to problem solving in C
Introduction to problem solving in CIntroduction to problem solving in C
Introduction to problem solving in C
 
CSCI-UA 102 sec 3,5, Fall 2015Programming Project 6Joann.docx
CSCI-UA 102 sec 3,5, Fall 2015Programming Project 6Joann.docxCSCI-UA 102 sec 3,5, Fall 2015Programming Project 6Joann.docx
CSCI-UA 102 sec 3,5, Fall 2015Programming Project 6Joann.docx
 
An Introduction to Feature Flags
An Introduction to Feature FlagsAn Introduction to Feature Flags
An Introduction to Feature Flags
 
A FRAMEWORK STUDIO FOR COMPONENT REUSABILITY
A FRAMEWORK STUDIO FOR COMPONENT REUSABILITYA FRAMEWORK STUDIO FOR COMPONENT REUSABILITY
A FRAMEWORK STUDIO FOR COMPONENT REUSABILITY
 
MC0078 SMU 2013 Fall session
MC0078 SMU 2013 Fall sessionMC0078 SMU 2013 Fall session
MC0078 SMU 2013 Fall session
 
Ch7.pdf
Ch7.pdfCh7.pdf
Ch7.pdf
 
Android Architecture, Environment, and Components.pptx
Android Architecture, Environment, and Components.pptxAndroid Architecture, Environment, and Components.pptx
Android Architecture, Environment, and Components.pptx
 
Software design.edited (1)
Software design.edited (1)Software design.edited (1)
Software design.edited (1)
 
OOPS_Unit_1
OOPS_Unit_1OOPS_Unit_1
OOPS_Unit_1
 

Último

Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 

Último (20)

Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 

Building blocks (Game Architecture)

  • 1. Building Blocks Chapter 4 16 March 2015 1Mr. R. B. Pawar
  • 2.  Introduction  Software factory refers to a methodology of producing software that centralizes and simplifies the production of specific common modules  These common modules form a core set of tools and libraries and are well maintained and supported over a series of products  Software factory method is well suited for project with common functionality  From management perceptive, this saves a lot of money by using the already written code instead of writing them once again by specialists.  These codes are already tested, integrated and debugged 16 March 2015 2Mr. R. B. Pawar
  • 3. The tasks which can be made into reusable modules generally are: 1. Screen code 2. Sound setup code 3. CD track playing code 4. Data file loaders 5. Compression and decompression libraries 6. Windowing and graphic features 7. Menu code 8. Environment setup 9. Hardware, software configuration 10. Encryption/decryption code 16 March 2015 Mr. R. B. Pawar 3
  • 4. Advantages of software factory o More code reuse can reduce the project development time o Since the code is tried and tested, it is more reliable o The efforts of skilled programmers are reduced and they can be used for doing other tasks o It also spreads knowledge about those modules to many developers o Project progress can be easily seen 16 March 2015 Mr. R. B. Pawar 4
  • 5. Disadvantages of software factory o The code has to be more generic to be used across different products o It takes more time and effort to develop o The first project which makes reusable modules takes longer time o For each platform, separate reusable wrapper libraries must be developed o These libraries have to be maintained and new developers have to spend time learning these new libraries 16 March 2015 Mr. R. B. Pawar 5
  • 6. 4.2 Game development issues – Common issue in game development are platform independence and the risk in losing key personal 4.2.1 Platform independence o In the architecture design, we need to provide interface to all the platform-specific codes o Every platform of different h/w configuration with different graphics card, sound card, etc o These codes have to be written and linked through a common interface o Using middleware we can solve the problem of hardware independence o 4.2.2 Risk reduction 16 March 2015 6Mr. R. B. Pawar
  • 7. 4.3 Core group in software factor and their interactions 1.Game design group 2.Architecture group 3.Tools group 4.Project group 5.Research group 6.Core component group
  • 8. 4.3.1 Game design group o The game design group mainly interacts with the architect group to know the project visibility (progress) o They can provide input to tools and components group o For example, they can directly contribute script to AI scripting engine or if a database is developed to store tweak able parameter, then game designers can provide more parameter to it o These parameters are part of soft architecture and can be modified without affecting the hard(structure) architecture o The game designer group also interacts with ancillary sound and art group to specify the look and feel of the game
  • 9. 4.3.2 Software architect group o The software architect group acts as hub between game designer group and the other groups o The members of the software architect group acts as a leader to all the programming group o The core function of this group is to translate the game design document into technical design document understanding the available tools and components o If necessary tools are not found, they prepare specification for modifications of components and tools or initiate development of new components and tools after research o Members of this group provides the feasibility report to game design group and also provide advice regarding the technical issues of the game o This group is also responsible for keeping control over company standards for coding and documentation o These standards include file formats, source control standards, interface definition standards, directory structures, etc o Members of this group need high technical skills and should be able to answer any technical query from all other groups
  • 10. 4.3.3 Tools group o Primary responsibility of this group is production and maintenance of tools that will be required by all development groups o Some tools are built in house, while there are some off-the-self tools available in the market like 3D studio MAX o
  • 11. 4.3.4 components group  Responsible for developing low-level modules, interfaces to other third-party components, platform-specific libraries and modules related to some common tasks such as compression libraries  As experience of the team grow more functionality can be added  Each component should have a an interface so that implementation changes do not have an impact on other modules and perform only one task to allow reusability
  • 12. 4.3.5 Project group  Prime goal of this group is to find the feasibility of the project  For this they have produce prototype of the product with the available support from component and tools  If in the prototype no anomalies found, then project gets a go ahead  The game design group interacts with project group through the architecture group to ensure that project schedule is maintained 16 March 2015 Mr. R. B. Pawar 12
  • 13. 4.3.6 Research group  Main function of this group is to investigate and prototype new technologies and include it in the libraries for use by all projects  The results of their research are detailed in journal and this journal is frequently reviewed and checked  The purpose of this group is to remove all open ended research from the critical path of development so that the risk of schedule slips does not arise  The size of this group varies depending on the requirement of members in other group 16 March 2015 Mr. R. B. Pawar 13
  • 14. 4.3.7 Ancillary group  Sound, art, testing, marketing and management belong to this group  Though directed by architect group this group can directly interact with game design group  Main function of testing group is to do integration testing compatibility testing 16 March 2015 Mr. R. B. Pawar 14
  • 15. Summary of core group interaction in software factory  Assemble programming group for each project according to its needs and make efficient use of resources  Understanding the strength and weakness of each group. Do not over burden them  Allow knowledge transfer by moving the free members to another group which has more work  knowledge can be spread among team members by rotating them frequently to different groups except when the project is nearing completion  The knowledge transfer also minimizes the risk if a member leaves the company all of sudden 16 March 2015 Mr. R. B. Pawar 15
  • 16. 4.4.1 Design reuse o Design pattern is a solution for a problem that frequently come up in software development o Design patterns arise out of experience of designers and are easily understood and applied to various projects by developer o These are specific to domain and so that developer are understanding the domain well before they start coding o Some common design patterns applicable to games are given as follows:
  • 17. Design reuse 1. Object factory  Object factory creates a family of object  All the object created by the factory are derived from the same abstract class and are returned as reference to this class  The object factory keeps track of all these objects in a list  When an object is deleted, it is removed from the list  Object factory receives request from a client to create an object representing a token within a level  Each token has a unique ID and loading is passing that ID to object factory and getting a return pointer to the base class  At the end of each level if object remains in the list, they are automatically deleted  This is done using a memory tracker class, which is an instantiated member of the game object class  The constructor of this class stores a reference to game object and inserts itself to the list in the factory class  When a game object is deleted, the destructor member of memory tracker is invoked which removes the reference to itself from the factory class list
  • 18. Design reuse 2. Singleton pattern o This pattern ensures that only one instance of a particular object can exist in the application o Ex. Only one instance of an object wrapping the sound card or graphics card is required o This singleton object is instantiate mostly on program initialization or on first use of the object o In the first case, the constructor of the singleton is first called before the main function and in the second case , it is called on demand o Singleton not instantiate if not called o The static modifier takes care that only one instance of singleton class exists o An example would be for a class that read and writes a configuration file
  • 19. Design reuse 3. Flyweight pattern o This pattern is used along with singleton pattern’ o The flyweight allows multiple instance of the class to be instantiated, but all of them refer to a common component shared by them all o Individual configuration data is stored within flyweight object o Advantage of this pattern is that it saves memory o Disadvantage is it can be used only for read only resources o It is of no use if local modification to the global resource has to be made
  • 20. Design Reuse 4. Chain of responsibility pattern  This pattern set up a chain of objects that receive notification of an event thereby avoids direct coupling of event, signaling the object with the chain of object interested in handling that event  Implementation can be through class diagram or runtime object hierarchy  Disadvantage of class hierarchy is that the chain is fixed at compile time, meaning the class hierarchy can not be changed
  • 21. 5. Iterator and reverse iterator pattern  This pattern allows the game developer to simplify the algorithm that needs to iterate on a list of items, so as to increase the speed of game execution  In game development, we could create an iterator that will iterate through a list of game objects and return them in the ascending order of their distance from the camera  The code will contain the class declaration for the list with Insert() and Get() members to insert and retreive members  An abstract class iterator is defined outside the list class declaration  This defines the interface for an iterator and allows iterator for all collection classes 
  • 22. 6. Templates and strategy methods pattern  This pattern allows dynamic selection of algorithm  Ex: a computer-controlled character could use the strategy method for choosing different styles of play  Coder can implement a generic style and attach a new strategy at runtime to customize the style  Later, a different styles can be added if required to the generic class encapsulating a new algorithm in concrete class for that style of play  Adding many styles can create a problem in managing and maintaining code
  • 23. Design Reuse 7. Observer pattern  Also called as “publish-subscribe model”  One to many relationship between observed and observer object  When observed object changes , all the objects are notified about that change  Disadvantage of this pattern is that the object being observed has no way of finding out which are the objects observing it  This can be achieved by allowing each observing object to subscribe to main object that is being observed  This gives the possibility of applying the filtering condition at source to prevent too many notification messages being sent out
  • 24. Design Reuse 8. Command pattern  Allows commands to be encapsulated and passed around as objects  In games, AI is implemented by using scripts  By scripting AI, compiler time is saved  Command pattern encapsulates game functionality as commands which can be typed into a console, stored and replayed or even scripted to help test the game  To implement this, the scripts are written in the text file and used along with an object factory to create the command objects specified in the text file and then link them 
  • 25. Design Reuse 9. Facade pattern – This pattern provides a simplified interface to third party libraries or a subsystem of related classes – This reduces the complexity of using the subsystem interface – The façade pattern also enables portability of code across different platform – i.e. the same client source code can be used across different system libraries if the façade interface is implemented correctly on all target systems
  • 26. Design Reuse 10. Mediator pattern  It is very close to the façade pattern  The facade works as an interface between a client and a set of subsystems, whereas a mediator manages the interactions among the subsystems  Communication in façade is one-way, but the communication in mediator it is two-way  Advantage of this pattern is that it promotes loose coupling by removing the need for the mediator objects to hold references to one another  The mediated objects have been to conform to the interface rules of mediator  The mediator implements as an observer, because it observes the mediated object and responds to events raised by them
  • 27. Design Reuse 11. State pattern  allows an object to change its behavior according to the changes that happens in its internal state  Ex. In the fighting game the fighter character can be in one of the three states namely, “angry”, “very angry”, “extremely angry”  In each of these states, the fighter uses different set of moves
  • 28. Design Reuse summary • Design pattern offers general solution to problems • Not all the patterns are useful for games • At the architectural level, all games of a genre are inherently similar • Using design pattern definitely reduces the effort and thereby the cost of development