the cutting room mirror

Monster Jam

This page is rather stubbly and could use some expansion.
Are you a bad enough dude to rescue this article?

Monster Jam is a monster truck game with licensed trucks, stadiums, and an announcer from a real world circuit.

Development Text#

All files in the pc/shaders folder of the Windows version contain code comments mentioning the author, target platform, and revision history. Some shaders appear to be shared between the Windows and Xbox 360 versions.

//--------------------------------------------------------------------------------------
// File:        cloth.fx
// Description: 
// Author:      Mark Wayland
// Platform:    Xbox 360
//
// Copyright (c) 2007 Torus Games Pty. Ltd.
//--------------------------------------------------------------------------------------
// History:
//  13-Mar-2007     MW      Initial Revision
//--------------------------------------------------------------------------------------

Material Attributes#

The matattr.txt defines several surface types that are not present in the game, such as flesh, lilypads, carpet and more. This is likely a leftover from other games by the same developer.

//--------------------------------------------------------------------------------------
// Note:
//  * Friction affects sideways drift of vehicle plus acceleration & braking - default 1.0
//  * Restitution describes how "bouncy" a surface is - default 0.5
//  * Resistance slows down the vehicle when on this surface (eg. increase for deep mud to slow vehicle) - default 0.0
//  * GePri is game event priority - higher is more important
//--------------------------------------------------------------------------------------
//File format:
//
//MaterialId    Name                    Friction    Wheel Friction  Restitution Bumpyness   Damping     TyreSkid        TyreTread   GeMaterial  GePri
//----------------------------------------------------------------------------------------------------------------------------------------------------
0               "DEFAULT"               3.0         1.0             0.5         0.05        1.0         "DIRTSKID"      ""          "default"   0
1               "INVISIBLEWALL"         0.0         0.0             0.5         0.0         0.0         ""              ""          "default"   0
2               "GRATING"               3.0         1.0             0.5         0.3         1.0         ""              ""          "default"   0
3               "FLESH"                 3.0         1.0             0.5         0.0         1.0         ""              ""          "default"   0
4               "PAPER"                 1.0         1.0             0.5         0.0         1.0         ""              ""          "default"   0
5               "CARDBOARD"             3.0         1.0             0.5         0.0         1.0         ""              ""          "default"   0
6               "CERAMIC"               3.0         1.2             0.5         0.0         1.0         ""              ""          "default"   0
7               "WOOD"                  3.0         1.2             0.5         0.3         1.0         "DIRTSKID"      ""          "wood"      9
8               "GRASS"                 2.8         0.8             0.5         0.2         1.2         "DIRTSKID"      "DIRTTREAD" "grass"     5
9               "LILYPAD"               2.8         0.8             0.5         0.0         1.2         ""              ""          "default"   0
10              "PLASTER"               3.0         1.2             0.5         0.0         1.0         ""              ""          "default"   0
11              "CONCRETE"              3.0         1.2             0.5         0.0         1.0         "RUBBERSKID"    ""          "road"      1
12              "BRICK"                 3.0         1.2             0.5         0.0         1.0         "RUBBERSKID"    ""          "brick"     3
13              "STONE"                 5.2         2.2             0.5         0.0         1.0         "RUBBERSKID"    ""          "rock"      8
14              "THIN_METAL"            3.0         1.0             0.5         0.0         1.0         "RUBBERSKID"    ""          "metal"     10
15              "THICK_METAL"           3.0         1.0             0.5         0.0         1.0         "RUBBERSKID"    ""          "metal"     10
16              "SAND"                  3.9         1.9             0.5         0.1         1.2         "DIRTSKID"      "DIRTTREAD" "sand"      7
17              "DIRT"                  5.0         2.0             0.5         0.2         1.0         "DIRTSKID"      "DIRTTREAD" "dirt"      6
18              "GRAVEL"                5.0         2.0             0.5         0.2         1.0         "DIRTSKID"      "DIRTTREAD" "gravel"    4
19              "CLOTH"                 3.0         1.0             0.5         0.0         1.0         ""              ""          "default"   0
20              "CARPET"                3.0         1.0             0.5         0.0         1.0         ""              ""          "default"   0
21              "PLASTIC"               3.0         1.0             0.5         0.0         1.0         ""              ""          "default"   0
22              "GLASS"                 3.0         1.0             0.5         0.0         1.0         ""              ""          "default"   0
23              "SNOW"                  2.8         0.8             0.5         0.0         4.0         ""              ""          "default"   0
24              "ICE"                   2.5         0.5             0.5         0.0         5.0         "DIRTSKID"      ""          "default"   0
25              "SLIME"                 3.0         1.0             0.5         0.0         1.0         "DIRTSKID"      ""          "default"   0
26              "WATER"                 3.0         1.0             0.5         0.0         1.0         ""              ""          "water"     12
27              "WATERPIPE"             3.0         1.0             0.5         0.0         1.0         "DIRTSKID"      ""          "default"   0
28              "STEAMPIPE"             3.0         1.0             0.5         0.0         1.0         "DIRTSKID"      ""          "default"   0
29              "RAZORWIRE"             3.0         1.0             0.5         0.0         1.0         "DIRTSKID"      ""          "default"   0
30              "NOTHING"               3.0         1.0             0.5         0.0         1.0         "DIRTSKID"      ""          "default"   0
31              "SOUNDOCCLUDER"         3.0         1.0             0.5         0.0         1.0         "DIRTSKID"      ""          "default"   0
32              "PERCEPTIONOCCLUDER"    3.0         1.0             0.5         0.0         1.0         "DIRTSKID"      ""          "default"   0
33              "MOVEABLEMETAL"         3.0         1.2             0.5         0.0         1.0         "DIRTSKID"      ""          "default"   0
34              "ICEROAD"               0.6         0.6             0.5         0.0         1.0         "DIRTSKID"      ""          "default"   0
35              "MUD"                   3.8         1.8             0.3         0.3         1.2         "DIRTSKID"      "DIRTTREAD" "mud"       11
36              "BOOST"                 1.0         1.0             0.5         0.0         1.0         "DIRTSKID"      ""          "default"   0
37              "HAIRPIN"               1.9         1.9             0.3         0.0         1.2         "DIRTSKID"      ""          "leaves"    5
38              "LAVA"                  0.0         0.0             0.5         0.0         1.0         ""              ""          "default"   0

Entity Debugging#

In the game memory strings you can find some field names used for the entity classes in the game, usually they all start with "m_" because for programming that's easier to locate fields and diferentiate from the functions/methods.

This may have been used by the developers to tweak these field values through a debug menu, allowing them to fix bugs more easily.

Here's a C++ psedo-code of CEntityStaticDebug fields definition:

// based on the PC patched version,
// NOTE: CEntityStaticDebug fields info can be found at 0x5797E8 address.
// CEntityStaticDebug static address -> 0x58B080.

class CEntityStaticDebug /* size: ? */ {
    // <inherited Entity class fields>
    
    fp32 m_fDebugRenderCollisionWithinRadius; // 0x60 : 0x4
    fp32 m_fDebugRenderDodgyCollisionWithinRadius; // 0x64 : 0x4
    fp32 m_fDebugRenderCollisionNormalsWithinRadius; // 0x68 : 0x4
    TSEBool m_bDebugRenderCollision; // 0x6C : 0x1
    TSEBool m_bDebugRenderDodgyCollision; // 0x70 : 0x1
    TSEBool m_bDebugRenderDestructibleHierarchies; // 0x74 : 0x1
    TSEBool m_bDebugRenderClothCollision; // 0x78 : 0x1
    TSEBool m_bDebugRenderAreaTriggers; // 0x7C : 0x1
    TSEBool m_bDebugRenderProfiling; // 0x80 : 0x1
    TSEBool m_bDebugRenderRAMUsage; // 0x84 : 0x1
    TSEBool m_bDebugRenderRAMMap; // 0x88 : 0x1
};

// reversed engineered structure of the field info.
struct SDebugField /* size: 0x28 */ {
    int m_offset; // relative to the entity address/pointer
    short m_unknown1;
    short m_unknown2;
    int m_unknown3;
    int m_unknown4;
    int m_unknown5;
    const char* m_pFieldTypeName; // "TSEBool", "TSEVec3", "TSEMatrix44", "TSEAxisAlignedBox", "fp32", "Entity", "HashedText", "enum", "u32", "externalenum", "Sample", "Model"
    const char* m_pszFieldName;
    char padding[12];

    SDebugField(int offset = 0, const char* type = nullptr, const char* name = nullptr)
        : m_offset(offset),
          m_unknown1(4),
          m_unknown2(4),
          m_unknown3(0),
          m_unknown4(0),
          m_unknown5(0),
          m_pFieldTypeName(type),
          m_pszFieldName(name) {}
};

// The devs would put the information inside the game like this (without macros)
struct CEntityStaticDebug_dbgfieldinfo {
    SDebugField m_aFields[11];

    CEntityStaticDebug_dbgfieldinfo() {
        m_aFields[0] = SDebugField(offsetof(CEntityStaticDebug, m_fDebugRenderCollisionWithinRadius), "fp32", "m_fDebugRenderCollisionWithinRadius");
        m_aFields[1] = SDebugField(offsetof(CEntityStaticDebug, m_fDebugRenderDodgyCollisionWithinRadius), "fp32", "m_fDebugRenderDodgyCollisionWithinRadius");
        m_aFields[2] = SDebugField(offsetof(CEntityStaticDebug, m_fDebugRenderCollisionNormalsWithinRadius), "fp32", "m_fDebugRenderCollisionNormalsWithinRadius");
        m_aFields[3] = SDebugField(offsetof(CEntityStaticDebug, m_bDebugRenderCollision), "TSEBool", "m_bDebugRenderCollision");
        m_aFields[4] = SDebugField(offsetof(CEntityStaticDebug, m_bDebugRenderDodgyCollision), "TSEBool", "m_bDebugRenderDodgyCollision");
        m_aFields[5] = SDebugField(offsetof(CEntityStaticDebug, m_bDebugRenderDestructibleHierarchies), "TSEBool", "m_bDebugRenderDestructibleHierarchies");
        m_aFields[6] = SDebugField(offsetof(CEntityStaticDebug, m_bDebugRenderClothCollision), "TSEBool", "m_bDebugRenderClothCollision");
        m_aFields[7] = SDebugField(offsetof(CEntityStaticDebug, m_bDebugRenderAreaTriggers), "TSEBool", "m_bDebugRenderAreaTriggers");
        m_aFields[8] = SDebugField(offsetof(CEntityStaticDebug, m_bDebugRenderProfiling), "TSEBool", "m_bDebugRenderProfiling");
        m_aFields[9] = SDebugField(offsetof(CEntityStaticDebug, m_bDebugRenderRAMUsage), "TSEBool", "m_bDebugRenderRAMUsage");
        m_aFields[10] = SDebugField(offsetof(CEntityStaticDebug, m_bDebugRenderRAMMap), "TSEBool", "m_bDebugRenderRAMMap");
    }
};

// as a C++ variable based on the memory address.
CEntityStaticDebug_dbgfieldinfo* g_fields_CEntityStaticDebug = 0x5797e8;

Monster_jam_-_debug_2.png Monster_jam_-_debug_3.png

All these features can be enabled by manipulating memory addresses.

Splitscreen Multiplayer#

All the console versions had a splitscreen multiplayer feature which didn't make it to the PC version, however it was still left in the PC version and it was cut probably because old PC specs couldn't handle rendering more than one viewport but it can be enabled through third-party programs.

Monster_jam_-_debug_splitscreen_1.png Monster_jam_-_debug_splitscreen_2.png