Sie sind auf Seite 1von 55

Unit-2

Introduction
The architectural design is not a detailed technical
design.
Tokens are referred to conceptual architectural
objects, and the word object will be used for
programming language objects.
Games are generally more intuitive and
comprehensible than business applications.
Business application has no real goal: It is merely a
tool to use to complete a task.
A good game is meant to provide a challenge which
makes it interesting whereas a good business
application is meant for reducing human effort for
performing various tasks.

The State of the Art


The game industry support cutting-edge technology.
Whenever a fast processor, new graphics card or any cool
peripheral device is introduced in the market, the game
developers immediately give their support to it.
It takes a lot of time(effort) and money to develop a good
3D engine & uses its features in the game
It is extremely difficult to predict tasks. Market for new
products is hard to define & access.
New versions of game can have changes in almost every
area right from graphics, the game engine,AI,audio,level
design etc.
Games deal with fun factor". Even though it is technically
very good, if it is not fun to play, it will not sell.
Game developers have to be intelligent and creative
individuals,& so they find difficult to stick to the initial
design throughout the game development.

The Perception of Technology


In games, as in most things in life, first impressions
count. Often the first impression we get of a new
game comes from magazine reviewers, many of
whom are hard-core gamers.
Games that are technically impressive but lacking in
gameplay get ridiculously high marks in reviews.
Inconsistent review phenomenon could be due to
any number of reasons ,Although the game looks
beautiful, it doesnt stand up well to repeated playing.
Design takes bigger priority than
technology.Gameplay gets highest priority followed by
appearance and accessibility.
Inverse kinematics.
Technology is essential for the success of the game.

Game research
Game designer first get the idea(vision) and visualize
the basic game concept in his/her mind, and then
needs to understand game subject matter and this
phase is called Research phase. Research is essential
to have expert understanding of the game vision.
Game professionals needs documents that contain
background information, object
specifications,images,textures,various character
attributes and numeric information.
Research documents educate the entire
development team and aid the game design process.

Research goals
Research goals are collecting facts about
building/outdoor
measurements,background,history,user interaction,
period specific objects such as transportation,
clothing style etc.
Another research goal is to collect information about
pictures of people,photos,infrastructure and other
objects associated with the concept. Also collect
sample voice(commentator),music, background
sound etc.
For sports game collect statistics of the players as
well as teams, rules of the game,reviews,preview of
the game, market &promote the game

For football game, collect the following facts:


Goal 1:Football field dimensions
Goal 2:picture of the stadium, photos of players,manager,coach
Goal 3:picture of the jersey(home & away) along with players jersey number
Goal 4:Team formation & team information of all the other team in the
league.
Goal 5:Videos &photos of players get their trademark shots, maneuvers &
goal saves
Goal 6:Teams playing schedule & method of determining the championship
team & relegation teams.
Goal 7:Mangers information, his style of selecting players for the game &
trading(transfers) players, new contract & renewals with salary fixation
Goal 8:Income through pre-sold tickets, selling jersey,sponors,ticket prices
Goal 9:Refree rulebook to understand penalties, warnings & offside goal
signals
Goal 10:Audio & video of stadium sounds, fans cheering, announcements,
commentary, ball kick, specific goal celebrations of each player.
Goal 11:Additional information about the clubs legendary players & their
statistics

Research sources
After setting the goals we need to find the sources of
information, artwork &sound. The sources can be as
follows:
Books &encyclopedias :Good reference as the content
& pictures are reliable but can be outdated
Magazines: Good reference for reviews and previews but
the content can be the opinion of the reviewer
Newspaper: content is current
DVD,CD,downloads,pod cast: Great source for audio,
video samples
Internet: Content from reliable websites can be good
source of current information. Accessible from anywhere,
anytime.
Games hint books: can be used as strategy guides
Fan websites and blogs: Gives information about the
source to find reliable data

Blue Sky Research


Research is essential to the survival of a company. Its blue-sky
research that you have to be careful about.
By definition, any technology present in games currently available
in the shops is about 18 months behind what is currently being
worked on by the best design houses.
Blue-sky research is one of the common dangers. Undirected
researchwhere developers are given a free hand to research
whatever interests them mostis little more than a gamble, and
usually at very long odds.
It is a great loss if the game project which is the outcome of
research, could not be completed.
Research can be encouraged if it has aim & it is directed towards it.
Fair amount of research can be done on optimizing & improving the
known techniques, instead of finding a completely new method as
in blue sky research.
Building something on already proven technology can yield good
results.
Research time to be fixed & strictly adhered to.

Blue Sky Research


At the end of research period, review the outcome of
research is done.If the result is not satisfactory, a
backup plan has to be in place.
Organize collateral R&D so that two companies dont
waste time on the same tasks, all of which is best
achieved by appointing a resource investigation unit
to interface between all the projects in
development.
Another option is to have a tie-up with academia to
carry out research.

Research Types
Research can be of different types and each one
has a different approach.
For all types of research, recording the results is
mandatory.
Research should follow a methodology, which
shows the path taken by the researcher in finding
the results.
Depending on the findings the methodology can be
refined.
Researchers collect information, work on it and
publish their findings.
We can have the copyright of the information
before distribution.

Research Types

Research
Research
Research
Research

on
on
on
on

existing products
target markets
gameplay
technology

Research on existing products

The first thing to find out if any similar product is


available in the market?
Find the positives and negatives of the competitive
products.
The marketing department can provide some
useful statistics. We need to keep watch on new
releases in the genre. The product should be excel
in artwork(presentation),technology
(performance)and game design(innovative) to
stand in the market.

Research on target markets

This is for sales prediction.


Is the target market the mass or it is specific(niche)?
Marketing strategy will depend on the type of market.
For specific market, the fans should be targeted. It is
very difficult to get the acceptance unless the product
is too good.
The product should be excel in artwork(presentation),
technology (performance)and game
design(innovative) to stay in the market for quite
sometime before any other competitor brings out a
decently similar product for a low cost.
Sometimes we can have tie up with a hardware
company to promote sales

Research on gameplay

The gameplay could have an impact on the technology needed


for the game. For example, the games user interface may
require investigation of certain types of controller.
Other aspects of the gameplay may require active research. For
example, in the case of strategy games, plenty of information is
available if youre prepared to do a little digging the history.
A strong history background can make the game interesting as
well as educative.
For researching the gameplay of a puzzle game like Tetris or
Balls!, you could look at psychological work on types of
reasoning. A satisfying puzzle game like Tetris or Puzzle Bobble
will include spatial and temporal reasoning (the story part) as
well as logical reasoning.
The gameplay can also have an impact on the technology
required for the game development.

Research on technology

It involves researching the technology that is


required to actually implement the game.
The fact is that this sort of research takes a lot of
time and a lot of money.
Research is an unpredictable activity, and research
into new technologies is particularly difficult.
New versions and releases will have refinements
more on the gameplay than on technology.
Most of the single player game is multiplayer game
with the computer controlling all the other players.
This defines the conventional game theory.
There is no actual gameplay in the multiplayer game,
it is more of a simulation in a fantasy environment.
Accurate simulation brings it close to reality.

Research Journal
Every step of research have to be documented from the
thought to every procedure and results both incorrect
and correct ones.
Research is needed to keep up with the fast growing
technology, otherwise we will be left behind in the
competition.
Each member of the research group has to document all
the steps that they have done.
At the best this can provide improvements and suggest
modifications to the gameplay design or it can help in
deeper understanding of the gameplay.
Most important part in research is not results ,it is the
knowledge and experience one gains through research.
Help other researchers to find something new from the
research journal

Reinventing the Wheel


Outside of the games industry, developers arent so picky.
They seem to be capable of understanding that other thirdparty developers are capable of producing good code, and
they are consequently more disposed to using third-party
libraries.
Contrast this to game developers, who seem to feel that the
need to use a third-party library is an admission of failure.
Primary reasons for using game engine is to give the
content creator more time to work on the title, especially
during the prototyping and early concept stage.
The games source code, programming libraries,
development kits & other utilities can help in much easier
writing of their programs.
Free 3D content creation software, image editing and
drawing tools can be used to create 3D or 2D graphics
content or game background &objects.

Reinventing the Wheel


All game engine may not work well for all game
genres. The game engine manufacturers should
mention those genres that work well with their
engines.
The game engine has to be platform independent.
Any game developer would want an engine which is
easy to understand, whether it will work for his/her
game; demonstration that it works on desired
platforms; and easy integration with the third party
libraries that he/she chooses.
Also source code,documentation,support and facility
to modify the profile should be provided

Use of object Technology


Object-oriented techniques have been viewed with
suspicion by the games industry.
While the rest of the developing world had moved on
to C++ and even Java, the games industry generally
used C and Assembler for their development right up
to a couple of years ago.
General perception was that these object oriented
languages were very slow since they produced a lot
of additional code behind the scene to handle the
object-oriented nature of the language.
Virtual functions were slow, but an optimizing
compiler can optimize this out.
In olden days ,assembler-level optimization was done
by game developers.

Optimization
Two types : algorithm optimization and code
optimization.
Algorithm optimization is preferred to code
optimization.
Using quick sort instead of bubble sort ,we need to
test both the algorithm to find whether performance
is close to our expectations.
Algorithmic optimization is something that computers
just cannot do. It requires lateral thinking and a spark
of ingenuity to redesign an algorithm.

Building Blocks

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 tool and
libraries and are well maintained and supported over
a series of product.
Software factory method is well suited for projects
with common functionality.
It saves a lot of money by using the already written
code instead of writing them once again by
specialists. Also these codes are already tested,
integrated and debugged.

The tasks which can be made into reusable modules


generally are:
Screen code, sound setup code,CD track playing code,
data file loaders, compression and decompression
libraries, windowing and graphic features, menu code,
environment setup, hardware , software configuration,
encryption/decryption code and AI components.
Advantages and Disadvantages of software factory
More code reuse can reduce the project development
time.
Since code is tried &tested, it is more reliable. The
efforts of skilled programmers are reduced and they
can be used for doing other tasks.
It also spreads knowledge about those modules to
many developers.
Project progress can be easily seen.

Disadvantages:
The code has to be more generic to be used
across different products ,and so it takes more
time and effort to develop.
The first project which makes reusable modules
takes longer time.

Core groups in software factory


and their interactions
Software factory consists of the following groups:
Game design group: Game designers are responsible for
creating ideas and developing design documents. The initial
gameplay is refined during development and testing by
resolving issues.
Architecture group: Software architects build the overall
architecture and the interaction between teams.
Tools group: Tools group lists the tools required for each level.
Project group: This group produces the actual game code
using the components and tools.
Research group: This group acquires the knowledge of new
technological developments and research new ideas for
integration into low level components.
Core component group: This group produces components
which have platform-specific code.

Game design group

Research group

Architecture group

Project group

Component group

Tools group

Core group and their interactions

Each of these core groups in the software factory


has clearly defined roles and tasks.
In the game industry it is very difficult to provide a
defined team structure or hierarchy because a lot of
developers are involved and their work is more
creative and overly restrictive.
The developers concern is that the working code has
to be executed at high speed to bring the objects
quickly on the screen.

Game Design Group


It mainly interacts with the architect group to know
the project visibility(progress).
They provide input to tools and component groups
.it also interacts with sound & art group to specify
the look and feel of the game.

Software Architect Group


It act as a hub between game designer &the other groups.
It act as a leader to all the programming groups.
Its function is to translate the game design document into
technical design document understanding the available
tools and components.
If tools not found, provide new components & tools.
It provides feasibility report to game design group & also
provide advice regarding technical issues of the game.
The architecture is refined as the project progress, and so
it is difficult to present a complete design in the beginning
itself.
Members of this group needs high technical skills & able
to answer any technical query from all other groups.

Tools Group
The primary responsibility of this group is production
and maintenance of tools that will be required by all
development groups.
Some tools are built-in-house ,while there are some
off-the-shelf tools available in the market like 3D
studio MAX.

Components Group
This group is 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 the experience of the team grows, more functionality
can be provided and added to the library.

Project Group
The prime goal is to find feasibility of the project.
They organizes the components and writes the
code.
Has to coordinate with testing group to ensure
release of the product.
The game design group interact with project group
through architecture group to ensure that project
schedule is maintained.

Research Group
Is to investigate and prototype new technologies
and include it in the library for use by all projects.
The result of their research are detailed in a journal
and this journal is frequently reviewed and checked.

Ancillary group
Sound,art,testing,marketing and management belong
to this group.
Though directed by architecture group, this group can
directly interact with game design group.
Testing group do integration testing & compatibility
testing.
Management has to be continually updated with the
progress of the project & its intermittent releases.

For effective use of software factory method


,follow the principles given as follows:
Assemble programming group for each project
according to its needs & make efficient use of
resources.
Understand the strength &weakness of each
group. Do not over burden them.
Allow knowledge transfer by moving the free
members to other groups 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 a sudden.

Reusability Software
The two main types of reusability in development are
code reuse and design reuse.
Code Reuse:
Code reuse is taken care in the industry .
Microsoft has provided us with nine major releases of
DirectX, a multimedia SDK, and each version has
been (more or less) compatible with the previous
version.
Code reuse is to provide core components for
common functionality across projects.
An experienced developer will try to reuse the
solutions that have worked well in the past. If the
solution repeatedly works for a problem then the
solution is called pattern.

Design Reuse
The design patterns is a recently developed method
for describing
solutions to problems
that
frequently come up in software development.
Design patterns arise
out of experience of
designers & are easily understood & applied to
various project by developers.
They are specific to domain & so help the
developers to understand the domain very well
before they start coding.

Some common design patterns applicable to games are


given as follows:

Pattern 1: Object Factory:


creates family of objects.
Usually, all the objects created by the factory derive from the
same abstract base class, and are returned to the requesting
client as a reference to this class.
For example, in Balls!, all of the tokens are created by
an object factory. Among other things, this makes the loading
of levels very simple. Each token type has a unique ID, and
loading a level is a simple matter of passing that ID to the
object factory, and making use of the pointer returned.
One of the other advantages of this is low-cost garbage
collection and memory tracking.
The object factory can keep track of all the objects that it
allocates, inserting them into a list. When these objects are
deleted, they remove themselves from this list. If any of these
objects have not been freed at the end of the level, then they
can either be cleaned up automatically or reported as errors.

Pattern 2: The Singleton


The singleton pattern ensures that only one instance
of a particular object can exist in your application.
Another example would be an object wrapping the
sound card or the graphics card functionality.
This singleton object is instantiated mostly on
program initialization or on first use of object.
The constructor of the singleton is called before the
main() function is called. In the second case ,it is
called on demand.
The static modifier takes care that only one instance
of singleton class exists. An example would be for a
class that reads or writes a configuration file.

Pattern 3: The Flyweight


The flyweight pattern is often used in conjunction
with a singleton.
The flyweight allows the user to instantiate multiple
instances of a class, which all refer to a common
component, shared between them all.
Only individual configuration data is stored within the
flyweight object.
In Balls!, the flyweight pattern is used to
manage the graphics.
Each graphic object is a singleton that contains the
frames of animation, and the individual token classes
contain references to the graphic objects, as well as
independent state information to allow them to be
rendered correctly to the screen.

Pattern 4: The Chain of


Responsibility

This pattern sets up a chain of objects that receive


notification of an event in order to avoid direct
coupling of event ,signaling the objects interested in
handling that event.
Several ways can be used to implement the chain of
responsibility. Two of these are linked to the class
hierarchy and the object (runtime) hierarchy
respectively.
The main disadvantage of linking the chain directly
with the class hierarchy is the inflexibility. The chain
is fixed at compile time rather than at runtime.

Pattern 5: The Iterator and


Reverse Iterator

Iterators and reverse iterators allow the developer to


dramatically simplify and generalize algorithms that
rely on iterating through a list of items without any
great loss of speed.
For example, we could create an iterator that will
iterate through a list of game objects, and returns
them in order of distance from the camera.
This means that a standard set of generic
algorithms could be used to process a collection of
objects in a number of different ways.

Pattern 6: The Template and


Strategy Methods

The strategy method allows the dynamic selection of


entire algorithms while the template method allows
a finer grain of replacement: individual parts of a
generic algorithm can be replaced.
For example, a computer-controlled character in a
fighting game could use the strategy method to
allow for differing fighting styles.
The different fighting styles can be selected using
the strategy method, and individual variations within
the style can be applied by using the template
method.

Pattern 7: The Observer


The observer pattern allows a one-to-many
dependency between objects so that when the
observed object changes in some way, all the
observers can be notified as and when this happens.
The object representing the mini-map is the observer.
It observes all the units in the game. Each unit
registers with the mini-map, allowing itself to be
observed.
The minimap is notified when there is a change in unit
state, for example, if the position changes.
The mini-map then uses this information to display
the state of the game world. In the case of our
realtime strategy game, the mini-map will be the
graphical representation of the game world token

Pattern 8: The Command


The command pattern allows the encapsulation of
commands. Commands can be passed around as
objects.
By using scripting engines in this manner, the AI can
be updated and maintained much more flexibly.
To implement this, the scripts can be supplied in a
text file and used in conjunction with an object
factory to create the command objects specified in
the text file and the linkages between them.

Pattern 9: The Facade


The facade provides a simplified interface to third
party libraries or a set of related classes in a
subsystem.
This reduces the complexity of using subsystem
interface.

Pattern 10: The Mediator


The facade acts as an interface between a client
and a set of subsystems, whereas a mediator
concentrates on managing the interactions
among the subsystems.
The main purpose of this pattern is to
encapsulate the interactions between a set of
objects.
The mediator is usually implemented as an
observer. It observes the mediated objects and
responds to events raised by them.

Pattern 11: The State


This pattern allows an object to alter its behavior
when its internal state changes.
For example in fighting game the fighter can be
in one of the three states namely:angry, very
angry, and extremely angry.
In each of these distinct modes, the fighter uses a
slightly different set of moves.

Das könnte Ihnen auch gefallen