©2004,2007 Jim E. Brooks http://www.palomino3d.org
See also Palomino Design and Palomino Implementation.
[2007/10]
A basic guidance algorithm is:
To avoid flip-flopping and jittering, the switching of maneuvers needs to be moderated and have a tolerance for small angles. For N frames, continue the same maneuver.
[2007/12]
A Physics and Dyna (or derivative) will be bound together at run-time. For example, F14TomcatCraft has a pointer to a Physics object which is configured for a F-14 Tomcat's characteristics.
The Physics class is written in terms of the Dyna interface and can manipulate (move) a Dyna object. A reason is that Dyna defines the axises of the local coordinate space which Physics needs access to. For example, the thrust vector correlates to a Dyna's Z axis. Physics will call Dyna::Translate(axis,step) to move along an axis.
The animation convention is for an Object to register a timer-tick handler. When a tick arrives, a Dyna will defer its animation to its Physics member. Physics computes a net vector offset in World Space then Physics changes the position of a Craft (moves it) in terms of the Object/Dyna interface.
tick eventDyna::Tick()
Physics::MoveObject()
[2007/09]
Terrain model is based on height-maps.
World parameters are read and computed from world.conf.
The Terrain class contains a 2D array of heightmaps. Terrain maps World coordinates to a heightmap file. Terrain::GetHeightmap(BoxVolume&) returns a correlating heightmap.
[2007/08]
-- Replaced by terrain generated from Perlin noise --
Height-maps can be imported from the program Terraform. To render terrain, the engine uses a height-map and color-map as input. The engine imports these images from gzip-compressed Targa files (.tga.gz).
Using GIMP, set Brightness (Layers) = -60 of a height-map. This adjusts the heights so that water and land mesh correctly. For the color-map, guideline values are Lightness = -25, Saturation = -50.
While using Terraform, export the height-map (gray-scale) to GIMP, and save as a Targa file, compress it using gzip, then move it to modules/sim/data/terrain/ with .tga.gz suffix. Likewise, export the color-map image to GIMP, and move it to modules/sim/data/texture/tga/. To facilitate choosing nice-looking Terraforms without recompiling, pass -test-terraform. The program will look for $HOME/terraform_heightmap.tga.gz and $HOME/terraform_colormap.tga.gz (height-map and color-map images, resp).
[2007/10]
The GUI-inside-a-window is rendered in 2D mode after rendering 3D objects. GUI should be pulsed by a timer-tick. GUI is divided into "screens" which are a collection of GuiObjects which can be enabled/disabled (visibility state) as a group. GuiButtons can register callbacks. Callback typically change a program setting, then GuiButton::SetText() is called to update the button's text. Font code was hacked from GL-117 flight sim. Font data is compiled into the executable (rather than loaded from data files which could be mis-installed). GUI fonts are rendered as 2D textured quads which can be alpha-blended. Fonts are positioned in terms of character cells (not pixels, as in VGA text-mode).
[2007/10]
The HUD is rendered last, after 3D and GUI. HUD is drawn in 2D mode. Characters are 2D vector fonts. The altitude and speed widgets are named ladders in sim terminology. The HUD is one entity (unlike the GUI is composed of GuiScreens/GuiObjects).
Last modified: Tue Dec 4 14:36:55 EST 2007