Systematic Gaming

January 31, 2009

Game-Tool Communication

Filed under: game programming, workflow — Tags: , , — systematicgaming @ 12:20 am

Modern games are extremely content heavy – most of the people on a game team are part of the art or design departments.  The larger a the team get the greater the portion of content producers becomes, and the trend will only continue.

So what does this have to do with game systems programming?

The more content you game has the better your tools have to be.  The best tools are robust, efficient and as seamless as possible.  The key to a seamless workflow is close integration with your tools and game engine.

There are basically two ways to accomplish this:

  • Direct integration of the game engine with the tool
  • Remote integration via a communication layer

(more…)

Advertisements

August 19, 2008

Memory Management: Design

Filed under: game programming, memory management — Tags: , , — systematicgaming @ 12:29 pm

We’ve reviewed the different types of memory in part one and looked at issues specific to consoles in part two. Now we’re ready to start designing our own memory manager. Lets review our requirements:

  • Our memory manager must be fast and efficient. We don’t want to waste CPU cycles or extra bytes of RAM managing memory.
  • We need to allow memory to be allocated with arbitrary alignment.
  • We need to support managing multiple physical memory heaps as well as the ability to support both internal and external heap managers.

These are the main requirements we have above and beyond the basic functionality of allocating and releasing memory.

(more…)

August 15, 2008

Memory Management: Consoles

Filed under: game programming, memory management — Tags: , , — systematicgaming @ 9:23 am

In part one we described the main types of memory. This time we’ll take a look at the memory management issues specific to consoles, or issues that are at least more prevalent in console game programming. The key differences between your regular PC and consoles are:

  • No virtual memory, which means once you’re out of memory, you’re out of memory. No swap file is going to save you on a console. Also, this makes memory fragmentation a serious concern.
  • Multiple physical memory types. On the PC you have RAM and video RAM, but you have a video driver that manages it for you, not so on consoles.
  • Memory alignment is also a problem on consoles. The x86 CPU is very forgiving. However console CPUs are generally stricter. Alignment is also very important for performance.

Now let’s take a look at these issues and others in more detail.

(more…)

August 7, 2008

Memory Management: Overview of Memory

Filed under: game programming, memory management — Tags: , , — systematicgaming @ 2:19 pm

Before we can really delve into the design of a memory management system we need to have a solid understanding of memory. In this post we’ll go over different types of memory and look at how they are used in your average program. We’ll also take a look at the main issues faced with each memory type, such as lifetime, scope and problems such as fragmentation.

Disclaimer: You’ll see some code samples in the following article, they’re in pseudo-C, not compilable or even compliant. They’re included for illustration and discussion purposes.

(more…)

August 5, 2008

Memory Management: Introduction

Filed under: game programming, memory management — Tags: , , — systematicgaming @ 2:16 pm

Memory management is a large part of systems programming for games. Especially on consoles where memory is a limited resource.

The main problem with memory is that there’s never enough. Modern consoles (like the Xbox 360 and PS3) have about 512MB of memory. This might seem like a lot compared to the 32MB of the PS2, but really isn’t that great compared to a PC, or the requirements of modern games. Additionally, consoles don’t generally support virtual memory, a feature of PCs which let the operating system use the hard disk as additional RAM when needed. The end result is that console games have many extra constraints and must take over the burden of managing their own memory more closely than normal PC applications.

Over the next few posts we will examine the basic memory management issues faced with console programming. In the process we will examine the goals and design of a modern game memory management system. The focus will be on how we manage memory within the complexities of a modern game development environment and how to make the best use of the limited resources of consoles.

Part One: Overview of Memory – A look at different memory types and how they are handled by compilers and applications.

Part Two: Consoles – What’s so special about consoles? We’ll look at special considerations needed for console games.

Part Three: Design – We’ll create a high level design of a memory allocation system.

Part Four: Budgets, Tracking and Profiling – So we can allocate memory, what else do we need?

Part Five: Summary – Wrapping up the series, we’ll also go over some more advanced topics for future consideration.

Blog at WordPress.com.