[back to main page]
Kambi VRML game engine (overview for developers) (version 1.3.1)
Contents:
- Features
- Download sources
- Documentation
- Automatic tests
This is an open-source game engine written in ObjectPascal.
Features include:
- Optimized OpenGL rendering of models in
VRML 1.0 and 2.0 (aka VRML 97) formats.
- 3DS, MD3, Wavefront OBJ, Collada file formats are also supported.
They can be loaded, and converted to VRML.
- Animations are supported, by interpolation.
- Octrees are used for various collision detection tasks.
- Shadows by shadow volumes (full implementation, with z-fail / z-pass
switching, silhouette detection etc.).
- Bump mapping (using various
implementations: basic multitexturing with dot3 (normalized by cube map or not),
GLSL normal, GLSL with classic parallax mapping, GLSL with steep parallax
mapping and self-shadowing).
- Shaders. There are classes to easily use ARB fragment / vertex programs
and GLSL shaders. Most important, you can
add and control GLSL shaders from VRML.
So GLSL shaders are fully available
for model designers, programmer doesn't have to do anything.
- GLWindow unit is available to easily create windows with OpenGL
context. The intention of this unit is to be something like glut,
but magnitudes better — using clean ObjectPascal, for start.
Also it allows you to easily create menu bars, open/save file and similar
dialogs that are implemented using native controls (GTK (1.0 or 2.0, and yes,
GTK 2.0 version is perfectly stable and adviced) or WinAPI).
- Reading and writing of images in various formats, processing them
and using as OpenGL textures. Besides many common image formats
(png, jpg, ppm, bmp, just for starters), included is also support for
RGBE format (Radiance HDR format).
- Handling of fonts, including rendering them with OpenGL,
as bitmap or outline (3D) fonts.
- 3D sound by OpenAL helpers, including intelligent OpenAL sound manager
and OggVorbis format handling.
- Ant-aliasing (initializing OpenGL multi-sampling) is covered.
- Ray-tracer based on VRML models is implemented.
- The engine is portable. Currently tested and used on Linux,
FreeBSD, Mac OS X and Windows (all i386), and Linux on x86_64.
Porters/testers for other OS/processors are welcome,
the engine should be able to run on all modern OSes supported by FPC.
- Engine components are independent when possible.
For example, you can only take model loading and processing
code, and write the rendering yourself. Or you can use our OpenGL rendering,
but still initialize OpenGL context yourself (no requirement to do it
by our GLWindow unit). And so on.
Of course, ultimately you can just use everything from our engine,
nicely integrated — but the point is that you don't have to.
The engine was used to develop all programs on these pages.
It should be compiled by FreePascal.
Download sources of the engine and many related
programs/demos.
I'm managing a suite of automatic tests,
in the spirit of Extreme Programming.
On 2005-04-25 I converted my tests to use
fpcunit
(this is a close FPC analogy to JUnit for Java)
and it's Lazarus GUI runner.
The tests are included with the rest of engine sources,
see subdirectory tests/. This is a GUI program, so you can
compile it from Lazarus. You can also compile a console version
(that doesn't require any part of Lazarus LCL) by compile_console.sh
script inside.
I will not give you a compiled executable of the testing program
(after all, it would have little sense, because all tests would succeed,
unless there's some problem specific to your OS configuration),
but I am generous enough to show you a snapshot of a happy test_kambi_units
program after successfully running all 33 tests: