9:28
C++, Game development
Electronic Arts has been writing their own set of C++ STL because the standard STL doesn’t fit gamedev constraints :
Gaming platforms and game designs place requirements on game software which differ from requirements of other platforms. Most significantly, game software requires large amounts of memory but has a limited amount to work with. Gaming software is also faced with other limitations such as weaker processor caches, weaker CPUs, and non-default memory alignment requirements. A result of this is that game software needs to be careful with its use of memory and the CPU. The C++ standard library’s containers, iterators, and algorithms are potentially useful for a variety of game programming needs. However, weaknesses and omissions of the standard library prevent it from being ideal for high performance game software. Foremost among these weaknesses is the allocator model. An extended and partially redesigned replacement (EASTL) for the C++ standard library was implemented at Electronic Arts in order to resolve these weaknesses in a portable and consistent way. This paper describes game software development issues, perceived weaknesses of the current C++ standard, and the design of EASTL as a partial solution for these weaknesses.
Tags: C++, electronicarts, Game development, stl
Related posts
15:09
C++
Just a small post to understand why GCC complains that there is “No newline at end of file” :
> What is the rationale for this warning ? What can break or is it a
> standards thing ?
Imagine foo.h:
blah blah blah
Now bar.c:
#include “foo.h”
#include “grill.h”
Now imagine a preprocessor that isn’t smart enough to put
the newline in for you…
blah blah blah#include “grill.h”
It may not include grill.h.
That’s obvious but I never thought about it =)
Tags: C++
Related posts
10:33
C++
This is the homepage of the profiling tool Callgrind (previously called Calltree) and the profile data visualization KCachegrind.
Profiling is important, do it!
Tags: C++
Related posts
18:13
C++
So, another lesson learned from Sam…
Linking with .so and .a isn’t the same (appart from the static/dynamic part).
The order of the .a inclusion is important :
g++ -o bla bla.cpp x.a y.a z.a
g++ will look at bla.cpp, look what symbols it needs and remember them. When loading x.a, it will only keep the symbols it has tagged before hands.
So if y.a needs an element in x.a which isn’t needed by bla.cpp, you won’t have it !!
So you should include y.a before x.a. If there are cyclic dependencies, it doesn’t matter if you include the same object twice.
Next headache please!!
Tags: C++
Related posts
17:13
C++
Clark Dorman wrote:
"Comming with g+ +, there`s a tool called "c++filt". Give it a mangled name and it will demangle it for you."
Example :
$> c++filt _ZN14daeSTLDatabaseC1Ev
daeSTLDatabase::daeSTLDatabase()
Tags: C++
Related posts
18:20
C++
http://osl.iu.edu/~tveldhui/papers/Template-Metaprograms/meta-art.html
The introduction of templates to C+ + added a facility whereby the compiler can act as an interpreter. This makes it possible to write programs in a subset of C+ + which are interpreted at compile time. Language features such as for loops and if statements can be replaced by template specialization and recursion. The first examples of these techniques were written by Erwin Unruh and circulated among members of the ANSI/ISO C++ standardization committee 1. These programs didn’t have to be executed — they generated their output at compile time as warning messages. For example, one program generated warning messages containing prime numbers when compiled.
Here’s a simple example which generates factorials at compile time:
template<int N> class Factorial { public: enum { value = N * Factorial<N-1>::value }; };
Tags: C++
Related posts
13:39
C++
An introduction to C++ Traits, By Thaddaeus Frogley
"Think of a trait as a small object whose main purpose is to carry information used by
another object or algorithm to determine “policy” or “implementation details”.
- Bjarne Stroustrup
Tags: C++
Related posts
20:23
C++
Things you need to know when you add/delete/swap elements from STL containers.. Read below for more.
Read more…
Tags: C++
Related posts
17:34
C++
Pointer aliasing can have a severe impact on program performance. Understanding its implications is critical to writing high-performance code. [This document] provides a brief introduction to the problem, and suggests several approaches to solving it through source-code restructuring, compiler options, and C or C++ language extensions.
see also [this page] and [this pdf].
Tags: C++
Related posts