Friday, March 18, 2011

Cubic Interpolation

I have been working on a new waypoint system. The old one which actually used "points" did not work out for smooth navigation. For tracks with a curvy street it was necessary to place a whole lot of points for every turn, which is bad for a racing game that intends to use many curves. So I read myself into calculating Bézier Curves to create a suitable navigation system and this is what it turned out to be:
The yellow lines ar the tangents for the bezier curve. Every waypoint has four tangents which are connected in this image, that means they work as if the point had two tangents, but it is also possible to disconnect them. The dashed line is the auto calculated middle line of the street.

Then I included this system into the editor:
At the moment I try to make the AI work with the new system.

greetings

Wednesday, January 26, 2011

SPARKLING (no pun intended)

Hey,

I tested the selfmade engine for performance und such things, and it is even slower than the Irrlicht built-in engine :-( Because I already have to be careful of what  to pack into Magnon to not decrease performance to much I decided to instead use SPARK: A free OpenGL based particle engine wich has already been wrapped for Irrlicht. SPARK is faster than the built-in and provides much more features. However, it does not permit dynamically attatching emitters to particles (at least not yet :-P) but that's ok. The implementation for Magnon is almost complete, then the cars can have fancy dust trails and water splashes. But also fire, lighting, rain, snow, you name it. Just a matter of how much particles can be calculated without draining too much of the FPS.

Anyway, here's a pic:
You can see sparks, a thunder cloud, a tornado and some aurora-like effect.

greetings