More C0D4G3

Saturday, June 17, 2006


It's been a long time since I updated this, so I'll probably have a lot to write... I just can't think of any of it yet.

Oh well, I'll start with this:

What you see here is version 0.3 of the FishMotor engine I've been working on lately.
Support for smooth face normals on the terrain, animated and textured MD2 models (say hello to Homer and his shotgun), static PLG models (the cat), and Anim8or exported C files. The engine had some design flaws that were bugging me:
1) Statically linked with OpenGL
2) GLUT. Urg, glut....
3) Things were getting messy.
I felt the need to write a plugin system for it, and just when I'd finished, I scrapped the whole project all together.
And it is being re-written. Large chunks of code will be copied over so it's not being re-done from scratch really, but a major overhaul is in progress. It's a completly plugin-based engine where the renderer is in an external plugin. This means DirectX or OpenGL support without having to recompile. Currently I'm making the OpenGL plugin, and it's in very early stages. All it does is render static meshes with no lighting.
On the other hand, I now have Linux support for it.
Take a look at the code sample below:

cPlugMan PM;
cEngine *(*NewEngine)(), *Engine;
void *H;
H = PM.Load("OpenGL_Plugin/oglRenderer");
if( !H ) return 1337;
NewEngine = (cEngine *(*)()) PM.GetFunc( H, "New" );
if( !NewEngine ) return 1336;
Engine = NewEngine();

if( !Engine->OpenWindow( width, height, 0 ) ) return 1335;
Engine->SetTitle( "Hello World" );

As you might have noticed, there is no OS-dependent code in there. Even the plugin's name doesn't have .so/.dll at the end (it's added automatically by the loader). With two calls to the engine, a window is set up and ready for rendering.

To Do:
  1. Triangle Strip generation from triangulated meshes
  2. Texture support.
  3. Eat some pizza
  4. Lights
  5. Transparency and other effects
  6. Collision detection
  7. Make that unnamed space game and enter it as a competition entry
After that I'll be adding features as I need them in whatever other projects I work on.

In other news, I bought the case for my new PC a few weeks ago, and I'll be buying a mother board + AMD64 3500+ before the end of this year. A few more parts and Minerva will be back on track.

The Tamagochi thing is probably dead. Not much interest in it from anybody (including myself) :P
Now to get back to work....


Post a Comment

<< Home