Latest News
spacer View All spacer
 
December 27, 2009
 
Special: 2009's Game Developer Xmas Cards, Part 2
 
2009 Holiday Greetings From Gamasutra [2]
 
Interview: Kill Screen & The Evolution Of Game Magazines [8]
spacer
Latest Features
spacer View All spacer
 
December 27, 2009
 
arrow Gamasutra's Best Of 2009 [2]
 
arrow Persuasive Games: Puzzling the Sublime [4]
 
arrow The Art Of Game Polish: Developers Speak [14]
spacer
Latest Blogs
spacer View All     Post     RSS spacer
 
December 27, 2009
 
A look back
 
Detail Textures
 
[Korea] 5 Key Trends for 2009– ③ Non-targeting MMOs
spacer
Latest Jobs
spacer View All     Post a Job     RSS spacer
 
December 27, 2009
 
YAGER Development
Senior Associate Producer
 
Gameloft - Buenos Aires
2D Sprite / Pixel Artists at Buenos Aries
 
Gameloft - Buenos Aires
Lead iPhone Game Designer
 
Gameloft - Buenos Aires
Senior 3D Graphics Programmer- iPhone games!
 
Terminal Reality
Senior Tools Programmer
 
Terminal Reality
Sr. Designers
 
Terminal Reality
Sr. Network Programmers
 
Edge of Reality
Project Art Director/Art Lead
spacer
About
spacer News Director:
Leigh Alexander
Features Director:
Christian Nutt
Editor At Large:
Chris Remo
Advertising:
John 'Malik' Watson
Recruitment/Education:
Gina Gross
 
News

  Bonus Feature: Secrets of Multiplatform Data Baking
by Staff
0 comments
Share RSS
 
 
May 6, 2009
 
Bonus Feature:  Secrets of Multiplatform Data Baking
Advertisement
In a technical article originally printed in Game Developer magazine, veteran game programmer Noel Llopis continues his look at data baking by examining how different console and PC game platforms treat data in memory.

Llopis last covered the basics of data baking, from the time data is exported from the content-creation tool, to the time it makes it into the game.

Now, he writes about the different in-memory formats that different target platforms have -- since when a memory image created in the baking process is off even slightly, the result can be completely unusable data.

There are ways to skip the problem, Llopis says:

It is possible to bypass the problem completely by baking your data in the target platform. Then all you need to do is load up your data structure and save it to disk. End of story.

That approach might work well for PC games, even when you're doing cross-platform development. If you're developing in Windows, it's pretty easy to involve a Mac or a Linux machine in the baking process.

Although in the case of PC games, the amount of data baking you can do is limited because you hardly ever know the exact hardware your game will run on, so you might not need to involve target machines at all.

If you're developing for game consoles or other fixed platforms, where you definitely want to create the exact memory image of your data, you could consider involving the target platform in the data baking process.


After figuring out the size of data types, it's still essential to know exactly how they're stored in memory -- you might know that an integer is 32 bits, but what bit pattern describes a particular number?

Explains Llopis:

There are two parts to that answer. The first one relates to how data types are represented in different hardware. And here, there's good news: Most modern platforms use the same method to represent basic data types.

Signed integers are represented with two's complement, and floating point numbers use the IEEE 754 standard for both 32- and 64-bit numbers (sign, mantissa, and exponent). A few platforms might not support floating point numbers, in which case we'll need to translate the data to fixed point or some other format. But in most cases, this is not something we have to worry about.

That's not the end of the story, though. The second part of the answer relates to how that number is stored in memory. In all modern platforms, a byte (8 bits) is the smallest addressable memory unit. Data types that are just a byte long (like a char) are simply stored at a particular memory address in a single byte, with nothing more to it.


You can now read the full data baking feature at Gamasutra (no registration required, please feel free to link to this feature from other websites).
 
   
 
Comments

none
 
Comment:
 


Submit Comment