Our Properties: Gamasutra GameCareerGuide IndieGames Indie Royale GDC IGF Game Developer Magazine GAO
My Message close
Latest News
spacer View All spacer
 
February 10, 2012
 
What drives the developers of Unity?
 
Analyst questions validity of unusual January NPD results [14]
 
Skyrim wins big at 15th Annual Interactive Achievement Awards
spacer
Latest Features
spacer View All spacer
 
February 10, 2012
 
arrow Virtual Goods - An Excerpt from Social Game Design: Monetization Methods and Mechanics
 
arrow Principles of an Indie Game Bottom Feeder [21]
 
arrow Postmortem: CyberConnect 2's Solatorobo: Red the Hunter [1]
spacer
Latest Blogs
spacer View All     Post     RSS spacer
 
February 10, 2012
 
Audio Passes: Success Through Layering
 
What the current RPG can learn from Diablo 1
 
Double Fine's Kickstarter Windfall: Will Patronage Supplant Traditional Game Publishing? [9]
 
The Principles of Game Monetization
 
Did DoubleFine Just break the publishing model for good? [15]
spacer
Latest Jobs
spacer View All     Post a Job     RSS spacer
 
February 10, 2012
 
Irrational Games
Systems Designer
 
CCP - North America
Lead Character Artist
 
CCP - North America
Sr VFX Artist
 
CCP - North America
Sr. Tech Artist
 
CCP - North America
Animation Director
 
Toys for Bob / Activision
Senior Programmer
spacer
Latest Press Releases
spacer View All     RSS spacer
 
February 10, 2012
 
Eufloria HD App for iPad
Arrives on the App Store
 
PARAMOUNT PICTURES AND
NAMCO BANDAI TEAM UP
FOR...
 
EA AND 38 STUDIOS SHIP
ONE OF THE MOST HIGHLY...
 
Indie Royale's
Valentine's Bundle is
live
 
SUPPORT YOUR FAVORITE
NARUTO NINJA TEAM IN
NARUTO...
spacer
About
spacer Editor-In-Chief/News Director:
Kris Graft
Features Director:
Christian Nutt
Senior Contributing Editor:
Brandon Sheffield
News Editors:
Frank Cifaldi, Tom Curtis, Mike Rose, Eric Caoili, Kris Graft
Editors-At-Large:
Leigh Alexander, Chris Morris
Advertising:
Jennifer Sulik
Recruitment:
Gina Gross
 
Feature Submissions
 
Comment Guidelines
Sponsor
News

  Feature: 'Book Excerpt: Game Engine Architecture' Exclusive
by Staff [PC, Console/PC, Exclusive]
Post A Comment
Share on Twitter
Share on Facebook RSS
 
 
November 25, 2009
 
Feature: 'Book Excerpt: Game Engine Architecture'

In a new feature article, Gamasutra presents an excerpt from Naughty Dog programmer Jason Gregory's recently released book, Game Engine Architecture. The book contains a massive amount of data on the specifics to consider when developing a game engine.

This excerpt from Chapter 14 covers a typical approach to updating game objects -- but the full feature goes on to explain the flaws in this method:

"The simplest way to update the states of a collection of game objects is to iterate over the collection and call a virtual function, named something like Update(), on each object in turn. This is typically done once during each iteration of the main game loop (i.e., once per frame). Game object classes can provide custom implementations of the Update() function in order to perform whatever tasks are required to advance the state of that type of object to the next discrete time index. The time delta from the previous frame can be passed to the update function so that objects can take proper account of the passage of time. At its simplest, then, our Update() function's signature might look something like this:

"virtual void Update(float dt);

"For the purposes of the following discussions, we'll assume that our engine employs a monolithic object hierarchy, in which each game object is represented by a single instance of a single class. However, we can easily extend the ideas here to virtually any object-centric design. For example, to update a component-based object model, we could call Update() on every component that makes up each game object, or we could call Update() on the "hub" object and let it update its associated components as it sees fit. We can also extend these ideas to property-centric designs, by calling some sort of Update() function on each property instance every frame.

"They say that the devil is in the details, so let's investigate two important details here. First, how should we maintain the collection of all game objects? And second, what kinds of things should the Update() function be responsible for doing?"


The full feature goes on to detail the method of maintaining a collection of active objects, as well as the responsibilities of the update() function, but goes onto explain why these methods are not necessarily viable in a full-scale game engine.

Those details, as well as coverage of object and subsystem interdependencies, bucketed updates, object state inconsistencies, and more, are included in the full feature article, now available on Gamasutra.
 
   
 
Comments


none
 
Comment:
 




 
UBM Techweb
Game Network
Game Developers Conference | GDC Europe | GDC Online | GDC China | Gamasutra | Game Developer Magazine | Game Advertising Online
Game Career Guide | Independent Games Festival | Indie Royale | IndieGames

Other UBM TechWeb Networks
Business Technology | Business Technology Events | Telecommunications & Communications Providers

Privacy Policy | Terms of Service | Contact Us | Copyright © UBM TechWeb, All Rights Reserved.