Adjacencies - Modules are linked together to their immediate neighbors by defining which modules are adjacent to each other. Adjacent modules are connected by entry points. The web of adjacencies is also used by AIs as part of the pheromone system.
Example: If you are looking at a map of the US. You will see the borders between states. The lines between states are State Lines (adjacency lines). This web of state lines defines where one state (module) begins and ends and the size of that particular state (module).
Adjacent Modules - A series of models that are next to each other.
Example: Think of Modules like square city blocks. They are neatly structured together to form a city. Two blocks that are next to each other separated by streets. So if you use a crosswalk and go from one block to another you have traveled to the adjacent module.
AI - (Artificial Intelligence) AI, is defined as any 'character' that is controlled by the engine. Marines, aliens, and any other character that is attacking you (other then multiplayer) are ran by the engine and must obey certain laws of the level. You naturally cannot teach them how to move at all times as it would require too much time. Instead, if you design the level to have certain properties the AI will navigate the level on their own.
.asc - (ascii) .asc is a file extension that CCAmain uses to read basic level data. Ascii is one of the most basic way to communicate to the computer and other programs simple information about levels.
Badguys - Badguys are AI that have been placed into the level rather then spawned using a generator. Badguys are only used in singleplayer campaigns. These spawn points will not endlessly pump out enemies like generators will. Instead, they spawn in specific types of enemies. Inteng determines which type of character to spawn in. In inteng a Badguy is signified by a Skull
EAX flags - The engine supports Creative Lab's EAX audio extensions. Modules can be manually flagged with a specific pre-defined EAX type (like sewer, bathroom, concert hall, etc) or you can set the reverb and other values manually. When setting the EAX sounds, keep in mind if a flag is not set the module will return to the default sound settings. This will create a sound distortion, which is best avoided by setting all modules evenly.
Entry Point - Entry points are a specific point where AI can safely move between the modules.
Example: Think of Modules like square city blocks. If you want to walk from one block to another, you must travel using crosswalks. If you try to just run across the street you might get hit by a car. Since AI need to be careful when crossing modules to avoid getting stuck, they must use entry points (crosswalks) to travel safely.
Fastfiles - (.ffl files) A compacted file format which is intended for quick & easy loading of textures and sounds. This is format can only be created by a registered developer. Loading textures & sounds from fastfiles has one purpose - it's quicker.
Generators - Generators are spawn points that are managed by the engine. Generators only spawn AI into an inactive modules, this way the player never sees the AI magically spawn before their eyes. Generators in singleplayer create mainly Aliens and other low intelligence enemies. This form of AI always spawns into the level in the 'far' state. They create far AI's which then navigate using the Adjacency Web to find the first drawn module. Generators spawn in AI on a rhythmic pattern which is referred to as Global Generator Times. They can also be set to have their own weightings on which type of enemy to spawn in. In multiplayer games Generators are the starting point for players. In Inteng the "G" symbol represents generators. For further information about how to add placed AI read badguys.
Hudson - A Hudson is an object that is created to help you scale your level. Hudson (crudely) represents the marines' size in comparison to the level.
Inactive - This is another term for Far. Far and Inactive are both terms to refer that something is not currently being rendered by the engine. A far AI is known as something that is not being drawn currently although it is still there. An Inactive module is currently not seen by any character and therefore is not being drawn.
Lights - There are several sorts of lights in AvP. There are placed light objects (the ones with the coronas), there are floating light objects which can be either runtime or pre-calculated, and there is the global ambience which is a general attribute of a level. Individual lights can be specular or non-specular - a specular light adds its lighting value to the target vertex, and allows the colors to go above their basic luminance defined by the polygon's texture map, for example permitting the over burning effect of grenades. A non-specular light does not do this, so will not brighten a black texture at all.
Modules - AvP is an entirely module-based engine. Modules are defined as regular orthogonal boxes within the gameworld. Modules contain the polygons which make up the rooms & corridors - module size is defined by the extents of this shape. Modules must not overlap. Nothing can exist in AvP unless it is within a module. Everything in an AvP environment must be split up into modules. A module is a cubical volume of space defined by the polygons within it. This volume is always aligned to the x,y,z axes and must not overlap any other module. A module equates to an object in 3dMax. Modules are at the core of how the AvP engine works. Primarily (as far as an artist is concerned) they are important in defining how much of the environment can be 'seen' at any one time. In the following plan view, from where the stick man is, the shaded yellow modules are the ones that are visible.
Module Linking - Modules are linked together on a 'can see' basis so that the engine knows what to draw from each individual module. This is automatically generated initially, but needs to be fine-tuned manually by the artists and is stored as part of the .rif file. In the case of morph modules (where visibility changes) then they use a branched link, which determines what should be drawn when the door is open and closed. Branched links can be nested inside each other. Modules that are currently linked into the player's module are known as near or active modules, and have collisions and dynamics run inside them. Other things (such as a bounced grenade) can force an otherwise inactive (or far) module to become active.
Morph Module - Doors in AvP are generated by morphing all the vertices in a module between two specified shapes. To create a door we save off two versions of the 3D shape, one with the door open and one with the door closed. The engine then interpolates the vertex positions according to the strategies defined. (time to open, time to close etc)
Object - A separately constructed and textured shape with its own .rif file. This object is imported into the environment rif and can then be placed by the artist wherever desired. can also have fragments which can be specific to the object itself (placed fragments) or generic fragment types spawned randomly in the object's volume when it is destroyed. Objects may be many types, but important ones include:
- Static The object is immobile. You may collide with all polygons in the object's shape.
- Furniture The object can be moved. Collisions are run on the bounding box of the object.
- Weapon A pickup (many types). You may set an explosion and fragments on this object.
- Placed light Treated as a light source. One poly can be flagged as having a corona in game.
Additionally, movable objects have mass and destructible objects have integrity. Mass is stored in grams. Integrity values range from 0 (single shot destruction) to 21 (immortal). Destructible objects can also trigger explosions and have specific destruction sounds. Objects can be destroyed (their integrity adjusted) by the strategy system.
Polygon flags - All polygons can have a number of flags set on them. These include:
- No BFC (No Back Face Cull) This allows the polygon to be visible from both sides, although only one side will collide with things.
- Translucent The entire polygon is drawn see-through.
- Not Visible The polygon is calculated in certain dynamics collisions, but is not drawn.
- Corona Only works for specific light objects. The center of the polygon is the source of the corona. The corona's color is defined by the light's specific color.
- No Light The polygon is not affected by the surrounding light values - it is drawn at full brightness.
Pre-calculated light - This is a light object which does not exist in-game, but the effects are pre-calculated and applied to the necessary vertices to give the appearance of lighting. Pre-calculated lights can have a number of options unavailable to runtime lights - they can be spotlights, different attenuations etc. Additionally, since they do not slow the game down (they don't exist) then many more of them can be used to attractively light a scene. However, they do not light objects in the world, so it is normally necessary to use a judicious mixture of pre-calculated and runtime lights.
Pheromone system - A method of simulating scent and hunting behavior. The player's module has the strongest pheromone 'weighting'. This scent value then spreads across the adjacency links, reducing in strength at every jump. Virtual AIs will follow the strongest scent until they enter an active module at which point they are spawned at an entry point and go into the near AI system.
Quantum Objects - A quantum object is one that has multiple positions defined in the .rif. When the game starts, the engine resolves the object by picking one of them, allowing bad guys and other objects to be in different places each time the game is played. Quantum objects can also be assigned to sets so that when one object is in one place, another will be in an associated place.
Rif - (Rebellion Interface File) The basic data format for AvP 3D shapes. A rif file is composed of many elements and also refers to other vital components stored elsewhere within the data structure. For example, while it will reference certain textures and sounds, these are actually stored inside the fastfiles. Rifs can be environments, objects, basic shapes (e.g. fragments) or hierarchical characters.
.RIM files - (Rebellion Image Map) Textures in AvP are stored as .rim files within the fastfiles. This is a proprietary Rebellion file format allowing the storage of bitmaps in multiple image modes. All graphics must be converted to .rim files before being loaded into AvP. Rim files also support specific color transparency (e.g. for grilles or gratings) where one color from a bitmap is picked to be the transparent color. The entirety of these rim files will not be bilinearly interpolated by the 3D card, so should be used cautiously.
Runtime light - This is a placed light object which dynamically (i.e. every frame) calculates the lighting values on the vertices within its range. This means that it will affect all in-game objects that move through its influence (such as aliens, or the player's gun). Runtime lights do have a processor overhead, so cannot be used in excess.
Sounds - Placed exactly like other objects, sounds have inner and outer radii - the inner one determines the range from the object where the sound is at 100% volume, and the outer one defines the range of 0% volume. Sound objects are integrated with the strategy system.
Strategies - These are properties applied to objects (such as door open / close times). All strategies must be associated with an object to exist within the engine. Where a strategy is required that does not have an object, we create a virtual object. This is an object in the world that has no polygonal shape associated with it. The strategy system is large and complex and controls all sorts of disparate elements of the game, so is a little beyond the scope of this definition. Generally, strategies revolve around the use of switches, which themselves can have many different forms.
Texturing - All polygons are textured via the use of UV co-ordinates which define the area of a .rim file to be textured. The UV co-ordinates can wrap over the boundaries of the .rim file allowing the tiling of multiple identical copies of the texture. There is also a texture animation system where multiple UV co-ordinates are stored for the polygon and the engine interpolates their position in-game.
Tracks - Objects in AvP can be moved in-game via the use of tracks. These are essentially a set of specific points in space, defined manually by the artist. The engine will then interpolate the object along the track when triggered by the strategy system. The simplest track objects are lifts and moving switches, which have merely a start and endpoint. Tracks can themselves trigger strategies at any time.
Virtual AIs - Non-visible AI creatures (those in a module that is not currently being rendered) are virtual, in that they do not have a spatial location except 'somewhere inside this module'. They are sometimes called Far AIs, and they move from module to module via the adjacency links, traveling towards the player according to the pheromone system.
Waypoints - Basic near AI is relatively simple - 'approach target'. When the module is complex, however, the AIs are guided around obstacles by the use of waypoints. These are also the primary means of getting aliens to navigate on the walls. The module is split up into many waypoint volumes, which are cuboids and touching each other. The waypoints are then linked together according to how the AI should move, including special alien-only connections. Finally, the center point of each waypoint is placed according to the required effect - if you wish an alien to crawl up a wall, the center of the waypoint should be placed inside the wall.