I have posted this to an other forum as well, but I would like to share the information also with the DevMaster community.
I whould like to introduce my OpenGL game (engine): Flower King.
I am writing this engine since 2002 in my (very) spare time, as a hobby.
It was originally started as a computer-graphics lab exercise at the University.
It is a first-person, collection game. Not a shooter.
It has a simple story: You are Hugo and you have to collect flowers.
Some of them are protected by dogs,
they can attack you when you are in the dog's garden area. You can use your rocket (that is on your back) for a short fly, for example for escaping from attacking dogs.
However, the gaming experience is not my goal.
It is more an experiment, for writing an engine. I am trying out different effects and techniques that might help to complete my dream:
to have an environment (with nice terrain, houses, trees and other vegetation) where you can freely walk through and also fly a bit.
Important is the total freedom in the movement.
It was inspired on an old OpenGL (or maybe IRIS GL?) demo I have seen on a computer fair at the early 1990's, running on a SiliconGraphics Indigo workstation. In this demo, a small city was rendered and the user could freely move around, without restrictions. Flying over the area was also possible.
Also the old DOS game "Stunt Island" (from Disney Interactive) was an inspiring factor.
It is not a finished project.
Features implemented so far:
- terrain engine, based on terrain blocks (chunks). Heighmap has dimension 1024x1024.
- discrete level-of-detail for terrain blocks. This is not the Chunked-LOD algorithm by T.Ulrich but there are a few similarities to it (f.e. the crack-filling technique to avoid gaps due to T-junctions at block boundaries).
My algorithm is an easy view-dependent but static-LOD technique for terrain chunks (currently, two LOD levels are pre-computed for each chunk),
with a workaround against cracks (gaps) that arise at block boundaries with T-junctions.
- terrain blocks are rendered as VBO index-arrays (or VertexArrays if VBOs are not supported)
- terrain texturing is based on 3 textures which are combined together (in GLSL fragment program) based on terrain slope.
Based on the terrain-texturing tutorial from www.delphi3d.net (Tom Nuydens).
- frustum and occlusion culling for terrain blocks (using HW occlusion queries in an asynchronous process).
Some hint in the book "More OpenGL Game Programming" helped me.
- water rendering with DuDv maps, caustics and full world reflection. Implemented using GLSL.
(Thanks for GameTutorials.com for the idea (HeightMap Tutorial 6)).
- world-renderer part can render 3DS (using Lib3DS) and Milkshape-models (see the description for scene rendering below)
- skeletal-animated milkshape objects also supported (so far, the dogs are animated models)
- static level-of-detail for world objects (at the time, some houses have 3 different LOD variants)
- collision detection for some world-objects (mostly houses), using the ColDet library (not 100% perfect)
- particle system (smokes at the chimneys)
- level editor which allows populating the objects onto the scene
- skybox (static)
- sound effects and background music (using the FMOD library)
- menu system using textured font
- in-game text rendering using FreeType
- user movement is based on forces and gravity
- written in C++
I have experimented with the following techniques for scene (world-object) rendering:
- Simple frustum culling (this mode is used in the level-editor-mode)
- VBOs (and as fallback: VertexArrays if vbo is not supported) with index-buffers, for rendering the whole scene in a few calls, iterating through all materials (-> each material has its own VBO (vertex + index-buffers), for minimizing state changes).
- Octree (each octree-node can have maximum 20 objects) which is probably the best technique for this engine (-> model-LOD (and fade-out) can be applied while rendering the objects of the visible nodes).
I'm currently working on:
- More intelligent terrain LOD technique.
I'm investigating the chunked-lod algorithm by Tatcher Ulrich and other algorithms as well (f.e. SOAR and its variants).
- object-rendering optimizations: creating LOD for all objects, using billboards when the objects are in distance (especially for trees, bushes, ...). These billboards should be generated automatically to save a lot of manual work.
ToDos (a lot more could be done but here the most important ones):
- shadows (I have experienced with HW shadow-mapping, dual-paraboloid shadow-mapping and shadow volumes. I have had the most success with the shadow-volume algorithm (as in Doom3) but it worked only for 100% error-free, closed objects)
- lightmap for terrain
- detail-texturing for the terrain (detail-textures should be used around the camera, and only base texture at distant areas, as in Oblivion)
- water refraction (with fresnel term), that is, combine underwater terrain with water reflections
- underwater fog (an easy task)
- better transition between ocean and skybox texture (at the horizon)
- terrain paging (for non-island levels) and/or terrain reuse at the end-of-the-world. In general: solving the end-of-the-world problem
- from the gaming perspective:
- more world objects, additionally level design
- better AI for the dogs (A* path-finding),
- more complex story,
- compass to help finding the closest flower,
- dog-feed or cat for drawing off the attention of dogs, ...
To see some screenshots, go to
http://flowerking.ne...creenshots.html
To download the game (windows binaries):
http://flowerking.net.tf/download.html
Homepage of the game: http://flowerking.net.tf
On my GeForce 6800GS, it performs between 80 and 200 FPS,
on older machines (without OcclusionCulling / VBO support) the performance ist much slower and the visual appearance could be poor (no roads / water due to missing GLSL support).
Note that I'm not a game-programmer (and not a level designer). I am only an OpenGL fan and 3D graphics programming is only my hobby.
(Currently I have a job in the telecommunication industry.)
So some of the features in this engine are possibly out-dated, but I have very few time to work on this project.
Of course, I would like to try to keep the engine as current as possible.
I don't want to make money from this (at the moment. Maybe in the future).
I can also release the source-code for the game (currently only a binary version is available on the website).
I would be glad to hear some comments about this engine (so far, I have got only very little feedback on it).
What are your opinions, which features should be improved, what is missing to achieve better visual experience, what direction should I go for improving the features/gameplay, ...
Also bug reports and performance informations are welcome (press F twice while playing, for interesting infos) !
kind regards,
AXP
Some screenshots:















