PHICS AND OTHER
INTRODUCTION TO GAME CREATION
OVERVIEW
• Define simulation• Give examples of complex systems• Distinguish between continuous and discrete
event simulation• Explain how object-oriented design principles can
be used in building models• Explain the additional concerns for animation
versus single images• Describe the important issues in computer
gaming
2
WHAT IS SIMULATION?
•Simulation •A model of a complex system and the experimental manipulation of the model to observe the results
Systems that are best suited to being simulated are dynamic, interactive, and complicated
•Model •An abstraction of a real system
It is a representation of the objects within the system and the rules that govern the interactions of the objects
3
CONSTRUCTING MODELS
•Discrete event simulation•Made up of entities, attributes, and events
• Entity The representation of some object in the real system that must be explicitly defined
• Attribute Some characteristic of a particular entity
• Event An interaction between entities
4
GRAPHICS
•Graphics •Originally the language of communications for engineers, designers, and architects• Computer-aided design (CAD) •A system that uses computers with advanced graphics hardware and software to create precision drawings or technical illustrations
5
GRAPHICS
6
Figure 14.3 Geometric modeling techniques
A. © ArtyFree/ShutterStock, Inc.; B. © Stephen Sweet/ShutterStock, Inc.;
GRAPHICS
7
Shape and surface influence an object’sappearance
Equations used to describe planes, spheres,and cylinders
Real world surfaces are rough, which scatter light differently, requiring texture mappingtechniques
GRAPHICS
8
Illumination modelSimulation of light interaction at one pointon an object
Shading model (shading)Process of using an illumination model to determine the appearance of an entire object
RenderingThe process of creating an entire image
COMPUTER GAMING
•Computer gaming is a simulation of a virtual world•Game designers must have knowledge of the following to make people, objects, and environments behave realistically in a virtual world:• Computer graphics• Artificial intelligence• Human-computer interactions and simulation• Software engineering• Computer security• Fundamentals of mathematics• Laws of physics relating to gravity, elasticity, light, and
sound 9
GAMEPLAY
•Gameplay: The type of interactions and experiences a player has during the game
•Game genres, based on gameplay, include:• Action games• Shooter games• Action-adventure games• Life-simulation games• Role-playing games• Strategy games
10
CREATING THE VIRTUAL WORLD
•Game engine--a software system within which games can be created •Following functionality provided by tools of a game engine:• A rendering engine for graphics• A physics engine to provide a collision detection system and dynamics simulation• A sound-generating component
11
CREATING THE VIRTUAL WORLD
• Additional functionality resulting from tools of a game engine:
•A scripting language apart from the code driving the game
•Animation – movement given to objects•Artificial intelligence algorithms (e.g., path-
finding algorithms)•A scene graph that holds the spatial
representation in a graphical sense
12
SOFT SKILLS
•High Quality Game Design and Development Requires Effective Use of “Soft Skills”:
• Effective collaboration with designers, programmers, and artists on various technical ideas throughout the entire game design and development process
• Flexibility and adaptability as the game design constantly evolves and changes throughout the development and production process
13
SOFT SKILLS
• Willingness to abandon much of the completed design work when the game’s story line, mechanics, art, programming, audio, video, and/or scripting requires significant changes
14
GAME CODE INTRODUCTION
• Used to be programmers created games• But many great programmers not great game makers
• With budget shift, emphasis has shifted• Game content creators are artist and designers
• Programmers can be thought of as providing services for content• But fate of entire game rests in their hands
PROGRAMMING AREAS – GAME CODE
• Everything directly related to game itself• How camera behaves, score is kept, AI for bots, etc.
• Often in scripting language (rest is in C++, more on languages next)• Produce faster iterations• Allow technical designers/artists to change behaviors• More appropriate language for domain (ex: AI
probably not easiest in C++)
GAME PROGRAMMING
•After all the design decisions have been finalized, programmers produce the code to create the virtual world of the game•Popular languages include: C++, Java, and C •Some well-established game engineers have created custom languages based on their games, e.g., Epic Game’s UnrealScript for the Unreal Game
17
GAME PROGRAMMING
•A variety of application programming interfaces (APIs) and libraries are available to help developers with key programming tasks•The choice of API determines which vocabulary and calling conventions the programmer should employ to use the services•The target game platform determines which service the programmer will use; some libraries permit efficient cross-platform development
18
PROGRAMMING AREAS – GAME ENGINE
• Support code that is not game specific• More than just drawing pretty 3d graphics (that is
actually the graphics engine, part of the game engine)• Isolate game code from hardware
• ex: controller, graphics, sound• Allows designers to concentrate on game
• Common functionality needed across game• Serialization, network communication, path-finding, collision
detection
PROGRAMMING AREAS – TOOLS
• Most involve content creation• Level editors, particle effect editors, sound editors
• Some to automate repetitive tasks (ex: convert content to game format)• These usually have no GUI
• Sometimes written as plug-ins for off-the-shelf tools• Ex: extensions to Maya or 3dStudio or Photoshop
• If no such extension available, build from scratch
PROGRAMMING TEAM ORGANIZATION
• Programmers often specialize• Graphics, networking, AI
• May be generalists, know something about everything• Often critical for “glue” to hold specialists together• Make great lead programmers
• More than 3 or 4, need some organization• Often lead programmer, much time devoted to
management• More than 10 programmers, several leads
(graphics lead, AI lead, etc.)
THE GAME DESIGN
• The Game Design Bible• Story• Gameplay• Interface
• The Art Bible• The Software Bible
EVALUATION
Game Design
Evaluation
Development
DEVELOPMENT
Coding andDebugging
Testing
Release
TYPICAL DEVELOPMENT CYCLE
Idea
Proposal
Design
Evaluation
Coding
Testing
Release
SOFTWARE METHODOLOGIES
• Code and Fix• Waterfall• Iterative• Agile
SPIRAL DEVELOPMENT CYCLE
Start
Design Coding and Art
TestingEvaluation
Release
METHODOLOGIES – CODE AND FIX
• Really, lack of a methodology• And all too common
• Little or no planning, diving straight into implementation
• Reactive, no proactive• End with bugs. If bugs faster
than can fix, “death spiral” and may be cancelled
• Even those that make it, must have “crunch time” • viewed after as badge of
honor, but results in burnout
METHODOLOGIES - WATERFALL
• Plan ahead• Proceed through various planning steps before
implementation• requirements analysis, design, implementation, testing
(validation), integration, and maintenance
• The waterfall loops back as fixes required• Can be brittle to changing functionality,
unexpected problems in implementation • Going back to beginning
WATERFALL DEVELOPMENT CYCLE
Idea
Proposal
Design
Evaluation
Coding
Testing
Release
METHODOLOGIES - ITERATIVE
• Develop for a period of time (1-2 months), get working game, add features• Periods can coincide with publisher milestones
• Allows for some planning • Time period can have design before implementation
• Allows for some flexibility• Can adjust (to new technical challenges or producer
demands)
METHODOLOGIES - AGILE
• Admit things will change, avoid looking too far in the future
• Value simplicity and the ability to change• Can scale, add new features, adjust• Relatively new for game development• Big challenge is hard to convince publishers
ITERATIVE AND AGILE METHODS
Proposal
Design and initial prototype
Refine PrototypeUntil Acceptable
Release
COMMON PRACTICES – VERSION CONTROL
• Database containing files and past history of them
• Central location for all code• Allows team to work on related files without
overwriting each other’s work• History preserved to track down errors• Branching and merging for platform specific parts
COMMON PRACTICES – QUALITY (1 OF 2)
• Code reviews – walk through code by other programmer(s)• Formal or informal• “Two eyes are better than one”• Value is programmer aware others read
• Asserts• Force program to crash to help debugging
• Ex: Check condition is true at top of code, say pointer not NULL before following
• Removed during release
COMMON PRACTICES – QUALITY (2 OF 2)
• Unit tests• Low level test of part of game (Ex: see if physics
computations correct)• Tough to wait until very end and see if bug• Often automated, computer runs through combinations• Verify before assembling
• Acceptance tests• Verify high-level functionality working correctly (Ex: see if
levels load correctly)• Note, above are programming tests (ie- code, technical). Still
turned over to testers that track bugs, do gameplay testing.• Bug database
• Document and track bugs• Can be from programmers, publishers, customers• Classify by severity• Keeps bugs from falling through cracks• Helps see how game is progressing
DESIGN TO SCHEDULE
Idea
Proposal
Design
Evaluation
High Priority Code
Med High Priority Code
Med Priority Code
Low Priority Code
Med Low Priority Code
Run out of time and money
Release
GAME PROGRAMMING
•Coding process begins with the creation of “the game loop”•Game loop is responsible for managing the game world, regardless of any input from the user•For example, the game loop might update enemy movement in the game or check for victory/loss conditions•Basically, the game loop manages the simulation
38
GAME PROGRAMMING
•Collaborating effectively is essential to creating a streamlined, “killer” computer game •Collaboration and cooperation will be necessary because, despite beta testing and demoing, invariably bugs may begin to adversely effect the operation of the game•If it is an online game you helped develop, you will be able to perform any fixes without having to interrupt the ongoing action or force the company to order a costly recall of the game
39
Top Related