четверг, 24 декабря 2009 г.

First horde tests

Spent day for implementing steering behaviors for horde.


Recast navigation + avoid nearest neighbor (with prediction, OpenSteer style) + avoid near walls



Recast navigation + avoid nearest neighbor (with prediction, OpenSteer style) + avoid walls only after collision + avoid dynamic obstacles


It needs time to update nav mesh (usually nav mesh updated with 0.5 sec intervals), so sometimes bots can go throw obstacle. Maybe for moving obstacles I need to use same steering behavior as for another bots.

Does it look natural? Or need some enhancements?

пятница, 18 декабря 2009 г.

среда, 16 декабря 2009 г.

вторник, 15 декабря 2009 г.

Simple steering behavior

I added yesterday simple steering behavior
for bots. Movement became more realistic than
previous direct path following. Now bot has
velocity and acceleration, and it tries to move
along current path line.



Remaining task - dealing with walls (current bot position now
not exactly on the safe path), moving obstacles.

воскресенье, 13 декабря 2009 г.

simple optimization

If you have vector assignment in your code,
use Swap member function of std::vector, if
you will not need source vector anymore

it will save you one memory allocation

void SetPath_Dirty(vec3& path)
{
m_path.swap(path);
}

среда, 9 декабря 2009 г.

Lighting abilities of my engine


Deferred shading (plus Doom3-like lighting for slow hardware),
more than 1000 lights (without shadows) possible simultaneously,
soft shadow maps for omni lights, attenuation maps, fog,
bump maps, specular maps, ambient etc.

вторник, 1 декабря 2009 г.

Memory management


Usually C++ uses linked list to holding free memory chunks, so searching for free chunk is not fast. Especially for small objects. So I decided to optimize allocating of memory using special pool allocator. All small objects in engine have base class, which get and release memory from pool allocator. 3x times optimization for memory allocation (small objects)
Look Andrei Alexandrescu Modern C++ Design and in details here