This page is a reproduction of the original articles on VavoomC from the Vavoom Wiki.


VavoomC is the game programming language of Vavoom engine which is used to implement game logic and user interface. It’s also refered to as progs.



Simple Variables

Here are some examples of instance variable declarations in VavoomC:

int a; // Declare an integer variable named "a".
float f; // Declare a floating-point variable named "f".
int Table[64]; // Declare an array of 64 integers named "Table".
int *p; // Declare a pointer to int named "p".
string PlayerName; // Declare a string pointer.
Actor Other; // Declare a variable referencing an actor.

Variables can appear in three kinds of places in VavoomC: global variables, which are accessible from everywhere. Instance variables, which apply to an entire object, appear immediately after the class declarations. Local variables appear within a function, and are only active while that function executes.

Here are the basic variable types supported in VavoomC:

  • int: A 32-bit integer value.
  • bool: A boolean value: either “true” or “false”.
  • float: A 32-bit floating point number.
  • string: A string of characters.
  • name: The name of an item in Vavoom (such as the name of a function, state, class, etc). Names are stored as a 16-bit index into the global name table. Names correspond to simple strings of 1-31 characters. Names are not like strings: strings can be modified dynamically, but names can only take on predefined name values.
  • classid: Represents a class. The actual value is a reference to an object describing class, but currently you can’t use it as a Class object.
  • Pointers.
  • Class references: A variable that refers to another object or actor in the world. Object and actor references are very powerful tools, because they enable you to access the variables and functions of another actor. Object references may also contain a special value called “none”, which is the equivalent of the C “NULL” pointer: it says “this variable doesn’t refer to any object”.
  • Structs: Same as C structures.



You can declare a pointer variable like this:

int *p; // A pointer to integer.

The variable “p” above is a pointer to an integer. Pointers to structs can refer to any object that belongs to a subclass of this struct.

There’s a special pointer constant NULL which points to “nowhere”.

Pointers of type void* also are handled specially – any pointer can be assigned to void* and void* can be assigned to any pointer.

Pointers to classes are not allowed.

Reference variables

You can declare a variable that refers to an object like this:

Actor A; // An actor reference.

The variable “A” above is a reference to an object in the Actor class. Such a variable can refer to any object that belongs to a subclass of Actor.

When you have a variable that refers to an actor, you can access that actor’s variables, and call its functions. Variables that refer to actors always either refer to a valid actor (any actor that actually exists in the level), or they contain the value “none”. none is equivalent to the C/C++ “NULL” pointer. Note that an object or actor reference “points to” another actor or object, it doesn’t “contain” an actor or object. The C equivalent of an actor reference is a pointer to an object.



Arrays are declared using the following syntax:

int MyArray[20]; // Declares an array of 20 ints.

VavoomC supports multidimensional arrays.



Enumerations exist in VavoomC as a convenient way to declare a bunch of keywords.
Here is sample code that declares enumerations.

// Declare an enumeration, with three values.


A VavoomC struct is a way of cramming a bunch of variables together into a new kind of super-variable called a struct. VavoomC structs are just like C structs, in that they can contain any simple variables or arrays.
You can declare a struct as follows:

// A structure describing a plane
struct TPlane
    TVec normal;
    float dist;
    int __type;
    int __signbits;
    int __reserved1;
    int __reserved2;

In VavoomC structures can have a parent structure, just like classes. For example:

struct sec_plane_t:TPlane
    float minz;
    float maxz;
    int pic;
    int __base_pic;
    float xoffs;
    float yoffs;
    int flags;
    int translucency;

Once you declare a struct, you are ready to start declaring specific variables of that struct type:

// Declare a pointer variable of type TPlane.
sec_plane_t *floor;

To access a component of a struct, use code like the following.

void MyFunction()
    // Scroll texture
    floor->xoffs += 8.0;
    floor->yoffs += 4.0;
    // Pass floor to a function.


Structure and class prototypes

VavoomC Compiler is one-pass compiler, that means that if you want to create a pointer to a struct it must be already declared or prototyped. Struct prototype looks like this:

struct sec_plane_t;


A class is declared like this:

class MyClass : MyParentClass
    // Class specifiers.

// Declaration of class variables and functions goes here

    //  Initialisation of properties goes here.

Here I am declaring a new class named “MyClass”, which inherets the functionality of “MyParentClass”.

Object is the parent class of all objects in Vavoom. Object is an abstract base class, in that it doesn’t do anything useful.

Each class inherets all of the variables and functions from its parent class. It can then add new variable declarations, add new functions (or override the existing functions).

The class declaration can take several optional specifiers that affect the class:

  • native: Says “this class uses behind-the-scenes C++ support”. Vavoom expects native classes to contain a C++ implementation in the EXE file.
  • abstract: Declares the class as an “abstract base class”. This prevents the user from spawning actors of this class, because the class isn’t meaningful on its own.
  • __mobjinfo__(a): Sets the ID number used in editor.
  • __scriptid__(a): Sets the ID number used in Thing_Spawn* action specials.


Class prototypes

VavoomC Compiler is two-pass compiler, that means that if you want to create a reference to a class, it must be already declared or prototyped. Prototypes lloks like this:

class MyClass;



In VavoomC, you can specify constant values of nearly all data types:

  • Integer constants are specified with simple numbers, for example: 123
  • If you must specify an integer constant in hexidecimal format, use i.e.: 0x123
  • Floating point constants are specified with decimal numbers like: 456.789
  • String constants must be enclosed in double quotes, for example: “MyString”
  • Name constants must be enclosed in single quotes, for example ‘MyName’
  • Vector constants contain X, Y, and Z values like this: vector(1.0,2.0,4.0)
  • The “NULL” constant points to “nothing”.
  • The “none” constant refers to “no object”.
  • The “self” constant refers to “this object”, i.e. the object whose script is executing.


To assign a value to a variable, use “=” like this:

void Test(void)
    int i;
    float f;
    string s;
    name n;
    TVec v, q;

    i = 10; // Assign a value to integer variable i.
    f = 2.7; // Assign a value to floating-point variable f.
    s = "Hello!"; // Assign a value to string variable s.
    n = 'John'; // Assign a value to name variable n.
    v = q; // Copy value of vector q to v.

VavoomC is strongly typed language, that means that attempts to assign a value of incompatible type will result in compiler error.

Built-in operators and their precedence

VavoomC provides a wide variety of C/C++/Java-style operators for such operations as adding numbers together, comaring values, and incrementing variables. Note that all of the operators have the same precedence as they do in C.

Operator Types it applies to Meaning
*= int, float, vector Multiply and assign
/= int, float, vector Divide and assign
= int, float, vector Add and assign
|| bool Logical or
&& bool Logical and
& int Bitwise and
| int Bitwise or
^ int Bitwise exlusive or
!= All Compare for inequality
== All Compare for equality
< int, float Less than
> int, float Greater than
<= int, float Less than or equal to
>= int, float Greater than or equal to
<< int Left shift
>> int Right shift
int, float Add
% int Modulo (remainder after division)
* int, float, vector Multiply
/ int, float, vector Divide

The above table lists the operators in order of precedence (with operators of the same precedence grouped together). When you type in a complex expression like “1*2+3*4”, VavoomC automatically groups the operators by precedence. Since multiplication has a higher precedence than addition, the expression is evaluated as “(1*2)+(3*4)”.

The “&&” (logical and) and “||” (logical or) operators are short-circuited: if the result of the expression can be determined solely from the first expression (for example, if the first argument of && is false), the second expression is not evaluated.

In addition, VavoomC supports the following unary operators:

  • ! (bool) Logical not.
  • – (int, float) negation.
  • ~ (int) bitwise negation.
  • ++, — Decrement (either before or after a variable).


Declaring Functions

VavoomC supports only class member functions.

In VavoomC, you can declare new functions and write new versions of existing functions. Functions can take one or more parameters, and can optionally return a value. The parameter and return value type mus be of size 4 (i.e. integers, floats, pointers, references) or vectors. Some functions are implemented in C++, they are called builtin functions.

Here are some simple function declarations:

class MyClass : MyParentClass;

int MyVariable;

int GetMyVariable()
    return MyVariable;


When a function is called, the code within the brackets is executed. Inside the function, you can declare local variables, and execute any VavoomC code. The optional “return” keyword causes the function to immediately return a value.

WARNING! Local variables you declare in a function are not initialised.

Function calls can be recursive. For example, the following function computes the factorial of a number:

// Function to compute the factorial of a number.
int Factorial(int Number)
    if (Number <= 0)
        return 1;
        return Number * Factorial(Number - 1);

Function overriding

“Function overriding” refers to writing a new version of a function in a subclass.

To override a function, just cut and paste the function definition from the parent class into your new class. For example, for OnMapSpawn, you could add this to your Demon class.

// New Demon class version of the OnMapSpawn function.
void OnMapSpawn(mthing_t *mthing)
    // If monsters are disabled, then destroy this actor immediately
    if (nomonsters)
    // Call parent class version of OnMapSpawn

Function overriding is the key to creating new VavoomC classes efficiently. You can create a new class that expands on an existing class. Then, all you need to do is override the functions which you want to be handled differently. This enables you to create new kinds of objects without writing gigantic amounts of code.

Advanced function specifiers

  • native: You can declare VavoomC functions as “native”, which means that the function is callable from VavoomC, but is actually written (elsewhere) in C++. For example:
native float sin(float angle);
  • static: Says that function has no self object. Currently only native functions can be static.

Control statements

VavoomC supports all the standard flow-control statements of C/C++/Java.


For Loops

“for” loops let you cycle through a loop as long as some condition is met.

For example:

// Example of "for" loop.
void ForExample(void)
    int i;
    print("Demonstrating the for loop");
    for (i = 0; i < 4; i++)
        print("The value of i is %d\n", i);
    print("Completed with i=%d\n", i);

The output of this loop is:

Demonstrating the for loop
The value of i is 0
The value of i is 1
The value of i is 2
The value of i is 3
Completed with i=4

In a for loop, you must specify three expressions separated by semicolons. The first expression is for initializing a variable to its starting value. The second expression gives a condition which is checked before each iteration of the loop executes; if this expression is true, the loop executes. If it’s false, the loop terminates. The third condition gives an expression which increments the loop counter.

Though most “for” loop expressions just update a counter, you can also use “for” loops for more advanced things like traversing linked lists, by using the appropriate initialization, termination, and increment expressions.

In all of the flow control statements, you can either execute a single statement, without brackets, as follows:

for (i = 0; i < 4; i++)
    print("The value of i is %d", i);

Or you can execute multiple statements, surrounded by brackets, like this:

for (i = 0; i < 4; i++)
    print("The value of i is");
    print("%d\n", i);

Do-While Loops

“do”-“whilel” loops let you cycle through a loop while some ending expression is true.

// Example of "do" loop.
void DoExample(void)
    int i;
    print("Demonstrating the do loop");
    i = 0;
        print("The value of i is %d\n", i);
        i = i + 1;
    } while (i < 4);
    print("Completed with i=%d\n", i);

The output of this loop is:

Demonstrating the do loop
The value of i is 0
The value of i is 1
The value of i is 2
The value of i is 3
Completed with i=4

While Loops

“While” loops let you cycle through a loop while some starting expression is true.

// Example of "while" loop.
void WhileExample(void)
    int i = 0;

    print("Demonstrating the while loop");
    while (i < 4)
        print( "The value of i is %d\n", i);
        i = i + 1;
    print("Completed with i=%d\n", i);

The output of this loop is:

Demonstrating the do loop
The value of i is 0
The value of i is 1
The value of i is 2
The value of i is 3
Completed with i=4


The “break” command exits out of the nearest loop (“for”, “do”, or “while”).

// Example of "while" loop.
void WhileExample(void)
    int i;
    print("Demonstrating break");
    for (i = 0; i < 10; i++)
        if (i == 3)
        print("The value of i is %d\n", i);
    print("Completed with i=%d\n", i);

The output of this loop is:

Demonstrating break
The value of i is 0
The value of i is 1
The value of i is 2
Completed with i=3

Conditional Statements

“if” and “else” let you execute code if certain conditions are met.

// Example of simple "if".
if (LightBrightness < 20)
    print("My light is dim\n");

// Example of "if-else".
if (LightBrightness < 20)
    print("My light is dim\n");
    print("My light is bright\n");

Case Statements

“switch”, “case”, “default”, and “break” let you handle lists of conditions easily.

// Example of switch-case.
void TestSwitch(void)
    // Executed one of the case statements below, based on
    // the value in LightType.
    switch (LightType)
    case LT_None:
        print("There is no lighting\n");
    case LT_Steady:
        print("There is steady lighting\n");
    case LT_Backdrop:
        print("There is backdrop lighting\n");
        print("There is dynamic\n");

A “switch” statement consists of one or more “case” statements, and an optional “default” statement. After a switch statement, execution goes to the matching “case” statement if there is one; otherwise execution goes to the “default” statement; otherwise execution continues past the end of the “select” statement.

After you write code following a “case” label, you must use a “break” statement to cause execution to go past the end of the “switch” statement. If you don’t use a “break”, execution “falls through” to the next “case” handler.


Class Reference

Here goes the default progs class list, as is in Vavoom 1.28. You most probably will use and/or edit at least several of these classes when creating a new mod for Vavoom.

Classes are divided by a number of sections. The common section enlists classes at the top of class hierarchy that every Vavoom mod must use, this section is divided in sub-sections the engine sub- section defines classes that are native to the core of the engine. The linespec sub-section shows classes that are shared by all the games and related to the line, sector and thing specials available for ACS and map editing, they also have the most basic algorithms used by actor AI. There’s one last sub-section called uibase that contains the menu API methods for drawing the status bar and menus for every game. Finally, game sections Doom, Doom2, Heretic etc) have a list of classes which only belong to named games’ progs correspondingly.

Feel free to add descriptions for missing classes and methods.

See also:

[[VavoomC Class Hierarchy|Class Heirarchy]]


Common classes

Engine (engine)

* [[ActorDisplayWindow]]

* [[BasePlayer]]
* [[ClientGameBase]]
* [[Entity]]

* [[GameInfo]]

* [[Level]]
* [[LevelInfo]]

* [[Object]]

* [[PlayerReplicationInfo]]
* [[RootWidget]]

* [[ScriptsParser]]
* [[Thinker]]

* [[Widget]]

* [[WorldInfo]]


Line Specials (linespec)

* [[Actor.DoomAttack]]
* [[Actor.DoomSpecific]]
* [[Actor.FlagsAndAppearance]]

* [[Actor.FreezeDeath]]
* [[Actor.GenericAttacks]]
* [[Actor.Inventory]]
* [[Actor.Misc]]
* [[Actor.MissileMovement]]
* [[Actor.MonsterAi]]
* [[Actor.Sound]]
* [[Actor.Spawn]]
* [[Actor.Special]]
* [[Actor.StateJump]]
* [[Actor.States]]
* [[ActorMover]]
* [[AimingCamera]]
* [[AmbientSound]]
* [[Ammo]]
* [[BackpackItem]]
* [[Bang4Cloud]]
* [[BasicArmor]]
* [[BasicArmorBonus]]
* [[BasicArmorPickup]]
* [[BossBrain]]
* [[BossEye]]
* [[BossTarget]]
* [[BrainState]]
* [[CeilingMover]]
* [[CeilingWaggle]]
* [[Coin]]
* [[CustomInventory]]
* [[DoomBuilderCamera]]
* [[DynamicLight]]
* [[Elevator]]
* [[EntityEx.AiUtils]]
* [[EntityEx.Damage]]
* [[EntityEx.Defaults]]
* [[EntityEx.Head]]
* [[EntityEx.Inventory]]
* [[EntityEx.LineAttack]]
* [[EntityEx.Misc]]
* [[EntityEx.Physics]]
* [[EntityEx.SpawnMissile]]
* [[FakeInventory]]
* [[Feather]]
* [[FireDroplet]]
* [[FireFlicker]]
* [[FlashFader]]
* [[FloorMover]]
* [[FloorWaggle]]
* [[GlassShard]]
* [[GlowingLight]]
* [[Gold10]]
* [[Gold25]]
* [[Gold50]]
* [[HateTarget]]
* [[Health]]
* [[HealthPickup]]
* [[HexenArmor]]

* [[IceChunk]]

* [[IceChunkHead]]
* [[InterpolationPoint]]
* [[InterpolationSpecial]]
* [[Inventory]]
* [[InvisibleBridge]]
* [[InvisibleBridge8]]
* [[InvisibleBridge16]]
* [[InvisibleBridge32]]
* [[Junk]]
* [[Key]]
* [[LightEffect]]
* [[LightFlash]]
* [[Lighting]]
* [[LineSpecialClientGame]]
* [[LineSpecialGameInfo]]
* [[LineSpecialLevelInfo]]
* [[LookAtCamera]]
* [[LowerStackLookOnly]]
* [[MapRevealer]]
* [[Meat]]
* [[MiniMissilePuff]]
* [[MorphProjectile]]
* [[ParticleFountain]]
* [[PathFollower]]
* [[PatrolSpecial]]
* [[PhasedLight]]
* [[PickupFlash]]
* [[Pillar]]
* [[PlaneWatcher]]
* [[Platform]]
* [[PlayerChunk]]
* [[PlayerEx]]
* [[PlayerPawn]]
* [[PointLight]]
* [[PointLightFlicker]]
* [[PointLightFlickerRandom]]
* [[PointLightPulse]]
* [[PointPuller]]
* [[PointPusher]]
* [[PolyobjDoor]]
* [[PolyobjMover]]
* [[PolyobjRotator]]
* [[PolyobjThinker]]
* [[PowerFlight]]
* [[PowerGhost]]
* [[PowerInvisibility]]
* [[PowerInvulnerable]]
* [[PowerIronFeet]]
* [[PowerLightAmp]]
* [[PowerMask]]
* [[PowerMinotaur]]
* [[PowerScanner]]
* [[PowerShadow]]
* [[PowerSpeed]]
* [[PowerStrength]]
* [[PowerTargeter]]
* [[PowerTorch]]
* [[Powerup]]
* [[PowerupGiver]]
* [[PowerWeaponLevel2]]
* [[Pusher]]
* [[PuzzleItem]]
* [[QuakeFocus]]
* [[RocketTrail]]
* [[Scroller]]
* [[SecActEnter]]

* [[SecActExit]]

* [[SecActEyesAboveC]]

* [[SecActEyesBelowC]]

* [[SecActEyesDive]]
* [[SecActEyesSurface]]

* [[SecActHitCeiling]]

* [[SecActHitFakeFloor]]

* [[SecActHitFloor]]
* [[SecActUse]]
* [[SecActUseWall]]

* [[SecretTrigger]]
* [[SectorAction]]
* [[SectorMover]]
* [[SectorPointLight]]

* [[SectorSilencer]]

* [[SectorThinker]]
* [[SecurityCamera]]
* [[SkyPicker]]
* [[SkyViewpoint]]
* [[SoundEnvironment]]
* [[SoundSequence]]
* [[SoundSequenceSlot]]
* [[Spark]]
* [[SpawnFire]]
* [[SpawnShot]]
* [[StackPoint]]
* [[StairStepMover]]
* [[StaticLightSource]]
* [[StaticRGBLightSource]]

* [[StrifeHumanoid]]
* [[StrifePuff]]
* [[Strobe]]
* [[SwitchableDecoration]]

* [[SwitchingDecoration]]

* [[TeleportDest]]
* [[TeleportDest2]]
* [[TeleportDest3]]
* [[TextureChangeDoor]]
* [[UpperStackLookOnly]]
* [[VerticalDoor]]
* [[WallLightTransfer]]
* [[WaterZone]]
* [[Weapon]]
* [[WeaponHolder]]
* [[WeaponPiece]]
* [[WorldInfoEx]]

UI Base (uibase)

* [[ClientGameShared]]

* [[ConDialog]]
* [[ConDlgChoice]]
* [[FinaleBackground]]

* [[FinaleScreen]]

* [[HUDMessage]]
* [[HUDMessageFadeInOut]]
* [[HUDMessageFadeOut]]
* [[HUDMessageTypeOnFadeOut]]
* [[IntermissionBackground]]

* [[MenuBigTextButton]]
* [[MenuChoice]]

* [[MenuChoiceEnum]]
* [[MenuChoiceEpisode]]
* [[MenuChoicePClass]]
* [[MenuChoiceSkill]]
* [[MenuChoiceSlider]]
* [[MenuChoiceSlot]]
* [[MenuChoice_LoadSlot]]
* [[MenuChoice_OnOff]]
* [[MenuChoice_SaveSlot]]
* [[MenuControlKey]]
* [[MenuInputLine]]
* [[MenuModel]]
* [[MenuSaveSlot]]
* [[MenuScreen]]
* [[MenuScreenAdvancedVideoOptions]]

* [[MenuScreenClass]]
* [[MenuScreenControls]]
* [[MenuScreenEpisode]]
* [[MenuScreenJoinGame]]
* [[MenuScreenLoadGame]]
* [[MenuScreenMasterList]]
* [[MenuScreenMouseOptions]]
* [[MenuScreenSaveGame]]
* [[MenuScreenScreenResolution]]
* [[MenuScreenSinglePlayer]]
* [[MenuScreenSkill]]
* [[MenuScreenSList]]
* [[MenuScreenSoundOptions]]
* [[MenuScreenVideoOptions]]
* [[MenuSelector_Big]]
* [[MenuSelector_SmallLeft]]
* [[MenuSelector_SmallRight]]
* [[MenuSList]]
* [[MenuSmallTextButton]]
* [[MenuSpriteAnim]]
* [[MenuStaticAnim]]
* [[MenuStaticBitmap]]
* [[MenuTextButton]]
* [[MenuTitleText]]
* [[StatusBarShared]]

Game classes

Since Vavoom engine added support for [[DECORATE]], most of the game classes were ported, but their actions are still defined in VavoomC language inside of the Actor.Game classes, they are listed here.


* [[BaronOfHell]]
* [[BaronBall]]
* [[Cacodemon]]
* [[CacodemonBall]]

* [[Cyberdemon]]

* [[DeadMarine]]
* [[GibbedMarine]]
* [[GibbedMarineExtra]]
* [[DeadZombieMan]]
* [[DeadShotgunGuy]]
* [[DeadDoomImp]]
* [[DeadDemon]]
* [[DeadCacodemon]]
* [[DeadLostSoul]]

* [[Demon]]
* [[Spectre]]

* [[Clip]]
* [[ClipBox]]
* [[RocketAmmo]]
* [[RocketBox]]
* [[Cell]]
* [[CellPack]]
* [[Shell]]
* [[ShellBox]]
* [[Backpack]]
* [[GreenArmor]]
* [[BlueArmor]]
* [[ArmorBonus]]
* [[Soulsphere]]
* [[InvulnerabilitySphere]]
* [[BlurSphere]]
* [[RadSuit]]
* [[Infrared]]
* [[Allmap]]
* [[MegasphereHealth]]
* [[Megasphere]]
* [[Berserk]]
* [[TechLamp]]
* [[TechLamp2]]
* [[Column]]
* [[TallGreenColumn]]
* [[ShortGreenColumn]]
* [[TallRedColumn]]
* [[ShortRedColumn]]
* [[SkullColumn]]
* [[HeartColumn]]
* [[EvilEye]]
* [[FloatingSkull]]
* [[TorchTree]]
* [[BlueTorch]]
* [[GreenTorch]]
* [[RedTorch]]
* [[ShortBlueTorch]]
* [[ShortGreenTorch]]
* [[ShortRedTorch]]
* [[Stalagtite]]
* [[TechPillar]]
* [[Candlestick]]
* [[Candelabra]]
* [[BloodyTwitch]]
* [[Meat2]]
* [[Meat3]]
* [[Meat4]]
* [[Meat5]]
* [[NonsolidMeat2]]
* [[NonsolidMeat4]]
* [[NonsolidMeat3]]
* [[NonsolidMeat5]]
* [[NonsolidTwitch]]
* [[HeadsOnAStick]]
* [[HeadOnAStick]]
* [[HeadCandles]]
* [[DeadStick]]
* [[LiveStick]]
* [[BigTree]]
* [[BurningBarrel]]
* [[HangNoGuts]]
* [[HangBNoBrain]]

* [[HangTLookingDown]]
* [[HangTSkull]]

* [[HangTLookingUp]]

* [[HangTNoBrain]]
* [[ColonGibs]]
* [[SmallBloodPool]]

* [[BrainStem]]
* [[HealthBonus]]
* [[Stimpack]]
* [[Medikit]]
* [[DoomImp]]
* [[DoomImpBall]]
* [[DoomKey]]
* [[BlueCard]]
* [[YellowCard]]
* [[RedCard]]
* [[BlueSkull]]
* [[YellowSkull]]
* [[RedSkull]]
* [[ExplosiveBarrel]]
* [[BulletPuff]]
* [[DoomUnusedStates]]

* [[DoomPlayer]]
* [[DoomWeapon]]
* [[Fist]]
* [[Chainsaw]]
* [[Pistol]]
* [[Shotgun]]
* [[Chaingun]]
* [[RocketLauncher]]
* [[Rocket]]
* [[PlasmaRifle]]
* [[PlasmaBall]]
* [[BFG9000]]
* [[BFGBall]]
* [[BFGExtra]]
* [[LostSoul]]
* [[ZombieMan]]
* [[ShotgunGuy]]
* [[MarineFist]]
* [[MarineBerserk]]
* [[MarineChainsaw]]
* [[MarinePistol]]
* [[MarineShotgun]]
* [[MarineSSG]]
* [[MarineChaingun]]
* [[MarineRocket]]
* [[MarinePlasma]]
* [[MarineRailgun]]
* [[MarineBFG]]
* [[SpiderMastermind]]

* [[StealthBaron]]
* [[StealthCacodemon]]

* [[StealthDemon]]
* [[StealthDoomImp]]
* [[StealthShotgunGuy]]

* [[StealthZombieMan]]


Doom2 shares all classes from Doom, here are the Doom2 specific classes.

* [[Arachnotron]]
* [[ArachnotronPlasma]]

* [[Archvile]]
* [[ArchvileFire]]

* [[BossBrain]]
* [[BossEye]]
* [[BossTarget]]
* [[SpawnShot]]
* [[SpawnFire]]
* [[HellKnight]]
* [[SuperShotgun]]
* [[Fatso]]

* [[FatShot]]
* [[CommanderKeen]]
* [[PainElemental]]
* [[ChaingunGuy]]
* [[WolfensteinSS]]
* [[Revenant]]
* [[StealthArachnotron]]

* [[StealthArchvile]]
* [[StealthChaingunGuy]]

* [[StealthHellKnight]]
* [[StealthFatso]]
* [[StealthRevenant]]


* [[Beast]]
* [[BeastBall]]
* [[Puffy]]
* [[Beak]]
* [[BeakPowered]]
* [[BeakPuff]]
* [[Chicken]]
* [[Feather]]
* [[Clink]]
* [[Sorcerer1]]
* [[SorcererFX1]]
* [[Sorcerer2FX1]]
* [[Sorcerer2FX2]]
* [[Sorcerer2FXSpark]]
* [[Sorcerer2Telefade]]
* [[GoldWandAmmo]]
* [[GoldWandHefty]]
* [[MaceAmmo]]
* [[MaceHefty]]
* [[CrossbowAmmo]]
* [[CrossbowHefty]]
* [[SkullRodAmmo]]
* [[SkullRodHefty]]
* [[PhoenixRodAmmo]]
* [[PhoenixRodHefty]]
* [[BlasterAmmo]]
* [[BlasterHefty]]
* [[BagOfHolding]]
* [[SilverShield]]
* [[EnchantedShield]]
* [[SuperMap]]
* [[ArtiInvisibility]]
* [[ActivatedTimeBomb]]
* [[SkullHang70]]
* [[SkullHang60]]
* [[SkullHang45]]
* [[SkullHang35]]
* [[Chandelier]]
* [[SerpentTorch]]

* [[SmallPillar]]
* [[StalagmiteSmall]]

* [[StalagmiteLarge]]

* [[StalactiteSmall]]

* [[StalactiteLarge]]

* [[FireBrazier]]

* [[Barrel]]
* [[BrownPillar]]
* [[Moss1]]
* [[Moss2]]
* [[WallTorch]]
* [[HangingCorpse]]
* [[HereticImp]]
* [[HereticImpLeader]]
* [[HereticImpChunk1]]
* [[HereticImpChunk2]]
* [[HereticImpBall]]
* [[HereticKey]]
* [[KeyGreen]]
* [[KeyBlue]]
* [[KeyYellow]]
* [[KeyGizmoFloatBlue]]
* [[KeyGizmoBlue]]
* [[KeyGizmoFloatGreen]]
* [[KeyGizmoGreen]]
* [[KeyGizmoFloatYellow]]
* [[KeyGizmoYellow]]
* [[Pod]]
* [[PodGoo]]
* [[PodGenerator]]
* [[TeleGlitterGenerator1]]
* [[TeleGlitterGenerator2]]
* [[TeleGlitter1]]
* [[TeleGlitter2]]
* [[Volcano]]
* [[VolcanoBlast]]
* [[VolcanoTBlast]]
* [[HereticPlayer]]
* [[BloodySkull]]
* [[Staff]]
* [[StaffPowered]]
* [[StaffPuff]]
* [[StaffPuff2]]
* [[Gauntlets]]
* [[GauntletsPowered]]
* [[GauntletPuff1]]
* [[GauntletPuff2]]
* [[GoldWand]]
* [[GoldWandPowered]]
* [[GoldWandFX1]]
* [[GoldWandFX2]]
* [[GoldWandPuff1]]
* [[GoldWandPuff2]]
* [[Crossbow]]
* [[CrossbowPowered]]
* [[CrossbowFX1]]
* [[CrossbowFX2]]
* [[CrossbowFX3]]
* [[CrossbowFX4]]
* [[Blaster]]
* [[BlasterPowered]]
* [[BlasterPuff]]
* [[BlasterSmoke]]
* [[SkullRod]]

* [[SkullRodPowered]]
* [[HornRodFX1]]

* [[PhoenixPuff]]
* [[MacePowered]]
* [[MaceSpawner]]
* [[MaceFX1]]
* [[MaceFX2]]
* [[MaceFX3]]
* [[Ironlich]]
* [[HeadFX1]]
* [[HeadFX2]]
* [[HeadFX3]]
* [[Knight]]
* [[KnightGhost]]
* [[KnightAxe]]
* [[RedAxe]]
* [[Mummy]]
* [[MummySoul]]
* [[MummyLeader]]
* [[MummyFX1]]
* [[MummyGhost]]
* [[MummyLeaderGhost]]
* [[Snake]]
* [[SnakeProjA]]
* [[SnakeProjB]]
* [[Wizard]]
* [[WizardFX1]]




Static Function Reference







[[Object]] -> [[Thinker]] -> Entity
defined in progs\common\shared\

See also:
[[VavoomC Class Hierarchy]]


class Entity



Class Entity is the parent class for all the positioned map objects; thus it may be said that its first extension to parent Thinker class are coordinates in world. According to them Entity determines map objects’ collisions, centers of objects’ images and sound sources.

Since Entity class is abstract, you cannot create objects of this type, only of its non-abstract descendants.

Member variables

  • Angles
  • Args
  • bAvoidingDropoff
  • bBlasted
  • bCantLeaveFloorpic
  • bCheckLineBlocking
  • bCheckLineBlockMonsters
  • bColideWithThings
  • bColideWithWorld
  • bCorpse
  • bDropOff
  • bFixedModel
  • bFloat
  • bFloorClip
  • bFly
  • bHidden
  • bIgnoreCeilingStep
  • bIsPlayer
  • bNoBlockmap
  • bNoGravity
  • bNoPassMobj
  • bOnMobj
  • bSolid
  • BlockMapNext
  • BlockMapPrev
  • Ceiling
  • CeilingZ
  • DropOffZ
  • Effects
  • Floor
  • FloorClip
  • FloorZ
  • Health
  • Height
  • InUse
  • Mass
  • MaxDropoffHeight
  • MaxStepHeight
  • ModelFrame
  • ModelIndex
  • ModelSkinIndex
  • ModelSkinNum
  • NetID
  • NextState
  • Origin
  • Player
  • Radius
  • SoundClass
  • SoundGender
  • Special
  • SpriteFrame
  • SpriteIndex
  • SpriteName
  • SpriteType
  • State
  • StateTime
  • SubSector
  • Sector
  • TID
  • Translation
  • Translucency
  • ValidCount
  • Velocity
  • WaterLevel
  • WaterType

Member functions

  • Activate
  • ApplyFriction
  • BlockedByLine
  • BounceWall
  • CanSee
  • CheckDropOff
  • CheckInventory
  • CheckOnmobj
  • CheckPosition
  • CheckRelPosition
  • CheckSides
  • CheckWater
  • CrossSpecialLine
  • Deactivate
  • Destroyed
  • DistTo
  • DistTo2
  • FindState
  • GetGravity
  • GetSigilPieces
  • GiveInventory
  • HandleFloorclip
  • InsertIntoTIDList
  • LinkToWorld
  • PlayFullVolumeSound
  • PlaySound
  • PushLine
  • Remove
  • RemoveFromTIDList
  • RemoveThing
  • RoughCheckThing
  • RoughMonsterSearch
  • SectorChanged
  • SetInitialState
  • SetOrigin
  • SetState
  • SlideMove
  • StopSound
  • TakeInventory
  • TestMobjZ
  • Touch
  • TryMove
  • UnlinkFromWorld
  • UpdateVelocity


Entities are used to tell the refresh where to draw an image, tell the world simulation when objects are contacted, and tell the sound driver how to position a sound.

The refresh uses the snext and sprev links to follow lists of things in sectors as they are being drawn. The sprite, frame, and angle elements determine which patch_t is used to draw the sprite if it is visible.
The sprite and frame values are allmost allways set from state_t structures. The xyz origin point represents a point at the bottom middle of the sprite (between the feet of a biped). This is the default origin position for patch_ts grabbed with lumpy.exe. A walking creature will have its z equal to the floor it is standing on.

The sound code uses the x,y, and z fields to do stereo positioning of any sound effited by the Entity.

The play simulation uses the BlockLinks, x,y,z, radius, height to determine when mobj_ts are touching each other, touching lines in the map, or hit by trace lines (gunshots, lines of sight, etc). The Entity->flags element has various bit flags used by the simulation.

Every Entity is linked into a single sector based on its origin coordinates. The subsector_t is found with R_PointInSubsector(x,y), and the sector_t can be found with subsector->sector. The sector links are only used by the rendering code, the play simulation does not care about them at all.

Any Entity that needs to be acted upon by something else in the play world (block movement, be shot, etc) will also need to be linked into the blockmap. If the thing has the MF_NOBLOCK flag set, it will not use the block links. It can still interact with other things, but only as the instigator (missiles will run into other things, but nothing can run into a missile). Each block in the grid is 128*128 units, and knows about every line_t that it contains a piece of, and every interactable Entity that has its origin contained.

A valid Entity is a Entity that has the proper subsector_t filled in for its xy coordinates and is linked into the sector from which the subsector was made, or has the MF_NOSECTOR flag set (the subsector_t needs to be valid even if MF_NOSECTOR is set), and is linked into a blockmap block or has the MF_NOBLOCKMAP flag set. Links should only be modified by the P_[Un]SetThingPosition() functions. Do not change the MF_NO? flags while a thing is valid.