(Thanks Tony Albrecht)
Epic failures in the game development field.
This blog covers funny/weird issues and bugs from games that happened during development.
Send your own contributions to igetyourfail at repi.se (can be anonymous if specified)
Friday, January 8, 2010
Wednesday, January 6, 2010
Tuesday, January 5, 2010
Efficient spawn table creation using STL
std::vector<vector3> spawn_table;
for( int i=0; i<level.getSpawnCount(); ++i )
{
spawn_table.push_back( *( new vector3() ) );
spawn_table.back() = level.getSpawn( i );
}
(Thanks Julien)
Monday, January 4, 2010
Angles greater than 114.59 degrees can't possibly be of any practical use
__forceinline float tan(float a)
{
return ::tanf(clamp(a, (-1.0f + FUZZY_EPSILON), (1.0f - FUZZY_EPSILON)));
}
__forceinline double tan(double a)
{
return ::tan(clamp(a, (-1.0 + FUZZY_EPSILON), (1.0 - FUZZY_EPSILON)));
}
We've had this in our code base since 2005 and have shipped 3 games on it, solid!
Friday, December 18, 2009
HLSL optimizer is beyond earthly logic
if b2
if b1
mul r0.xy, r0, c0.x
texld r4, r0, s6
if !b2
mad r0.xyw, r4.xyzz, c121.x, c121.y
mad r4.xyz, r3, r3.w, r0.xyww
endif
endif
else
// ...
endif
(Thanks Benoit)
Thursday, December 17, 2009
Tuesday, December 15, 2009
Monday, November 9, 2009
Why name variables when you can use padding?
if (data.lights[id]._padding[1] == NOSPECULAR)
{
...
}
(Thanks Tomasz)
Wednesday, October 28, 2009
Friday, October 23, 2009
Thursday, October 22, 2009
Wednesday, October 21, 2009
Saturday, October 3, 2009
functionality where being correctly
// emit a particle
// This should NOT be done here, it there should
(Thanks Pat)
// This should NOT be done here, it there should
(Thanks Pat)
Friday, August 28, 2009
Giving New Meaning to Destructors
LRUCacheModel::~LRUCacheModel()
{
for( LRUCacheEntry* entry; entry != NULL; )
{
LRUCacheEntry* next = entry->next;
delete entry;
entry = next;
}
}
(Thanks to Pat)
Monday, August 10, 2009
Forget normals, we have lovely hearts!
As in, who needs proper packing of normals into the g-buffer... when you can have those lovely heart shapes instead?

(Thanks Aras)
(Thanks Aras)
Subscribe to:
Posts (Atom)