Release Notes for Build 112

From C4 Engine Wiki
Jump to navigation Jump to search

Release date: October 15, 2005

  • This build includes a heavily commented sample game module called "Skeleton" that represents nearly the minimum amount of code that needs to be written to have a working game module. You can tell the engine to load this game module by editing the file Data/CFG/Variables.cfg and changing the value of the variable $applicName to "Skeleton". To get the primary game module back, change $applicName to "Game" again.
  • Implemented a large amount of new collision detection functionality. The existing function World::DetectCollision() is still present and should continue to be used for line-of-sight tests and sphere-environment collision tests. There is now a new function for capsule collisions, World::DetectCapsuleCollision(), and it detects collisions between an arbitrary swept capsule and the environment. Both of these functions are precise to the polygon level and are implemented using continuous techniques (as opposed to iterative techniques). This means the collision detection is tunnel-proof.
  • For most types of moving objects, it is now best to use the new Collider class for collision detection instead of calling the above functions directly. The Collider class has two subclasses, SphereCollider and CapsuleCollider. Each controller class corresponding to a moving object should inherit from one of these two Collider subclasses. Then the controller's Move() function simply specifies the starting position and delta for the current frame. After all controllers have moved, the collision detection among all colliders is performed, and then the Travel() function of each collider class is called. At this point, the Collider class contains a collision state that indicates whether a collision occurred and, if so, whether it was with the environment or another collider. The implementation of the Travel() function can do whatever it wants in response.
  • See the BallController class in the Skeleton.* files for an example showing how to use the new collision system. To see a cool stress test, load the world called "Test" while running the Skeleton application module by entering load test in the command console. (Nothing will happen in this room if running the big game module.)
  • The engine module now contains stock controller base classes for basic projectiles and characters. The ProjectileController class is subclassed from SphereCollider and handles the motion of simple projectiles under the influence of gravity and/or through a resistive medium. The CharacterController class is subclassed from CapsuleCollider and handles things like gravity, falling off of things, sliding against walls, and climbing ramps.
  • Updated the sample game module to use the new collision system and controller base classes. Projectiles will now hit each other, so it's possible to shoot down rockets, etc. The game module class FighterController is now in a clean state and handles player movement, character collisions, weapon firing, and projectile hits.
  • The game module contains a class called FighterController that is a subclass of the CharacterController and handles more details of the player movement. It's pretty functional right now, but is still a work in progress in some ways. In particular, it doesn't currently spend any time trying to detect whether the character is climbing stairs, but some research is being done to determine whether this is practical and worth the extra computational expense. Right now, it's best to cover stairs with an invisible ramp for smooth character movement.
  • The FighterController doesn't currently implement client prediction for multiplayer games, but it will soon. The previous code, which was very hacky, has been removed.
  • Added shader level of detail for parallax mapping. When enabled, the scale of the parallax effect will gradually decrease to zero at the transition point from level 0 to level 1, and parallax mapping is reduced to ordinary bump mapping in level 1 and above.
  • Implemented full support for Cook-Torrance specular reflection via the MicrofacetAttribute material attribute. Both isotropic and anisotropic microfacet distributions are supported, but the geometrical attenuation factor has been omitted because it almost always makes an unnoticeable difference. Note: Microfacet shading has been disabled for all types of lights except infinite lights due to some pending changes in the shader building code. It will be fully functional in the next release.
  • Added the $featureDisableMask permanent system variable. This has 1-bits for any graphics features that are explicitly disabled by the user. Updated the graphics settings dialog to allow parallax mapping and microfacet shading to be turned on/off.
  • Added the kShaderCubeLightInhibit shader flag that prevents a cube light projection from being rendered on a geometry. This is useful when applied to the geometry surrounding a cube light source (that is actually casting the projected shadow) so that it doesn't receive its own shadow.
  • Updated the Sound Player tool. It now displays the wave being played as it used to under the old windowing system, and there is a volume control.
  • The sound mixer now supports 22.05 kHz stereo sounds, both streaming and non-streaming. All mono and stereo sounds that are either 22.05 kHz or 44.1 kHz are now supported.
  • Modified the free camera tool in both the World Editor and Model Viewer so that the camera accelerates like the spectator camera does.
  • Added the PropertyObject class. This serves as a shared container for an arbitrary list of properties, and it can be attached to nodes just like material objects. Thus, changing any of the properties affects all nodes using the property object. There's currently no interface for this in the World Editor, but it will be present in a later release.
  • Added the Collection node. This is a container that holds a set of key/node pairs. There's currently no interface for this in the World Editor, but it will be present in a later release.
  • There is now a new EnvironmentMapAttribute that can specify a texture map that will override the environment map assigned to the zone containing an object. This attribute should be applied in addition to the EnvironmentAttribute to take effect. It can be specified in the Textures pane in the World Editor's material manager.
  • Added a constructor and Set() overload for the Vector4D class that take a Vector3D and a Point3D. These are interpreted as the normal direction of a plane and a point lying in that plane. The normal is copied into the x, y, and z components, and the w component is given the value -Dot(n, p).
  • All of the random number functions have been moved into the Math namespace. This includes Random(), RandomFloat(), RandomUnitVector(), RandomUnitQuaternion(), GetRandomSeed(), and SetRandomSeed(). These functions either need to be qualified with Math:: or the statement using namespace C4::Math; needs to appear in any source file that uses them.
  • Defined an integer type called natural that corresponds to the natural register width on the target machine. This type should be used for variables which are expected to be kept in CPU registers so that arithmetic is performed on them at the machine's natural size, avoiding extra sign extensions or high-word clears. Defining the natural type is primarily a performance optimization for the 64-bit PowerPC architecture.
  • Made lots of various minor additions and improvements to the primary game module.
  • The Visual Studio project files have been updated to be easier to move to different machines and easier to convert to later versions.
  • This release contains temporary plugins for Maya, but these are going to be replaced by the Collada format in the next release.
  • The source texture map for the terrain in the demo is included in this release. It's path is Data/TEX/terrain/Lake.tex.