Chasm: The Rift

From ModdingWiki
Jump to navigation Jump to search
Edge of map!
Chasm: The Rift
Chasm- The Rift.png
Mod-Chasm- The Rift.png
Levels?Tick.png Editable
Tiles?Tick.png Editable
Sprites?X mark.svg Not editable
Fullscreen?X mark.svg Not editable
Sound?X mark.svg Not editable
Music?X mark.svg Not editable
Text?X mark.svg Not editable
Story/cutscenes?Tick.png Editable
UI/menus?X mark.svg Not editable
Demos?Unknown

Chasm: The Rift is an FPS game from the twilight of the DOS era, developed by Action Forms Ltd. and released in 1997. The engine, contrary to popularly spread misinformation, is not based on Quake but appears to be an original, and has some interesting features but is also, for its time, somewhat limited regarding the level geometry that can be created.

A level editor is included on the game CD, and some enemy and weapon stats can be modified using a plain text configuration, but certain other aspects of modifying the game (such as the 3D models) remain poorly understood.

File formats

The following file formats are used by this game.

Filename Format Details
csm.bin BIN Format (Chasm) Main data archive. Structure and archive formats differ between DOS (CSM.BIN) and the 2022 Remaster (csm.bin)
chasm2.pal VGA Palette (6-bit version) Game palette
chasm.inf CHASM.INF Configures enemy and weapon stats
*.rgb 256x255 color index array Translucency tables
*.3o 3O Format 3D models (weapons, scenery)
*.ani ANI Format (Chasm) DOS: Data to animate models. 2022 Remaster: ASCII text to determine keyframes for animation.
*.car CAR Format Contain data for "living" entities (player, monsters)
*.obj OBJ Format (Chasm) Sprites ! Possibly multiple frames per file
*.cel CEL Format (Chasm) Textures and raster graphics
*.wav WAV Format Sounds
resource.** RESOURCE (Chasm) Level data (definitions)
process.** PROCESS (Chasm) Level data (action scripts)
floors.** FLOORS (Chasm) Floor graphics associated with level
map.** MAP (Chasm) Level data
script.** SCRIPT (Chasm) Level data (cutscene scripts, not present in every level)
*.raw Raw PCM audio, unsigned 8-bit PCM, mono, little-endian, 11025 Hz Sound effects
*.pcm Raw PCM audio, unsigned 8-bit PCM, mono, little-endian, 11025 Hz Sound effects
*.sfx Raw PCM audio, unsigned 8-bit PCM, mono, little-endian, 11025 Hz Sound effects
chasm.r?? ! Likely recorded gameplay with ?? corresponding to level number
chasm.key ! Appears to be related to keyboard layout
menu.txt Plain Text ! Appears to configure aspects of the game menu (possibly useful for translation only?)
*.flac FLAC (Free Lossless Audio Codec) (2022 Remaster Only) music
*.gltf glTF (Graphics Library Transmission Format) (2022 Remaster Only) geometry, monster, character and item models
*.png PNG (Portable Network Graphics) (2022 Remaster Only) Textures used for walls, geometry models, item models and character models
*.ttf and *.otf TrueType Font (2022 Remaster Only) In-game fonts (accessibility mode only)

Source Ports and Reimplementations

DOS

The original 1997 version of the game.

2022 Remaster

An official remaster of the game was released in 2022 by General Arcade and SNEG for Windows (decent compatibility for Linux via Proton has been reported). This version of the game includes a new fully featured release of the game, the DOS version with DOSBox, a three level addon pack (including two additional monsters and a boss), and level editing software. 'Modding Manual.pdf' is also included, which contains notes on how to modify parts of the game for this new version.

The 2022 Remaster uses .gltf and .png files for easier modding, rather than the legacy file types from the DOS version. Having said this, the 2022 Remaster also has the ability to convert these legacy file types, making mods for the DOS version compatible with the rerelease.

PanzerChasm

PanzerChasm was a project to reverse-engineer and re-implement the game's engine, being worked on by Artöm "Panzerschrek" Kunz. It can be found at:

https://github.com/Panzerschrek/Chasm-Reverse

Due to some changes in the way PanzerChasm works, some map-packs and mods might have compatibility issues unless they were specifically designed for this source port.

Panzerschrek has confirmed that PanzerChasm is no longer in active development and that elements of it were used, with permission, for the Remastered version of the game released in 2022. Panzerschrek is noted in the credits of the 2022 Remaster.

DOS Specifics

Archive and addons

Most of the files listed above are normally stored inside CSM.BIN. However, an addon loaded with the "-addon:<addon_dir>" game parameter can read replacement files from an open directory structure, provided that they are placed in the correctly named subdirectory.

Levels, cutscenes

Levels are not stored in a single file, but several files with an extension .01, .02 etc. corresponding to the level number. The process.**, script.** and resource.** files are in plain text; process defines action scripts using a scripting language explained in the level editor documentation, script defines a cutscene for the level and resource defines level settings such as title, CD track to play for background music, 3O, CEL and WAV files used, etc. The map.** and floors.** files contain binary data; floors contains graphics for the floors (and probably ceilings) and appears to use a mipmap system.

Level 99 exists in CSM.BIN, but is not a playable level and cannot be warped to. Instead, it is a special case use of the map format whose purpose is to provide the background scenes for the mission briefing cutscenes. The "room" numbers in the script.** files correspond to the numbered player starts in level 99.

Translucency

CHASM.RGB and CHASM60.RGB are almost identical in construction to the TINTTAB format used in Heretic and Hexen except that there is no 256th row for the final color (which in Chasm is a dummy/transparent color). CHASM.RGB appears to be a 50-50 blend while CHASM60.RGB appears to have a stronger influence from one of the colors (perhaps 60-40, judging by the file name?)

Textures

Wall textures are of a .CEL format which is an Autodesk Animator file type. They conform to the Chasm color palette (which can be obtained here).

Textures are 64px or 128px in length and are always 128px in height. A pink color is used for transparency.

The Autodesk Animator Pro source code was released by the author and can be downloaded and compiled if desired.

Imagine, by Sejin Chun, is free software which allows application of color palettes, as well as conversion to and from the .CEL format. This makes it an ideal tool for modding for Chasm: The Rift.

Models

The .CAR format is believed to be an early iteration of the format used by the Carnivores games for Windows (however, Chasm's .CAR data might be more closely related to the Chasm .3O files). There is speculation where some believe .CAR refers to 'Caracter' (per folder name) or 'Chasm Archive'. Part of the data contained within are sounds for the entity that the .CAR defines. These sounds can be heard at the end of the file if imported as raw data into audio software such as Audacity.

2022 Remaster Specifics

Archive and Addons

Files are kept within csm.bin in the root directory of the game and within a specific file structure. The 2022 Remaster uses a .tar file renamed as .bin and can therefore be accessed easily via archiving software (such as 7Zip) or even SLADE. Mods made for the 2022 Remaster should copy this file structure and file extension. Much like a WAD Format file (for Doom), not all folders and files are required to be present with a mod because anything not present is instead taken from csm.bin. A mod can be created by archiving the files into an uncompressed .tar archive and then manually renamed to .bin.

Addons can be played using the launch parameter of --addon xxxx (where xxxx is the name of the addon's .bin file, without the bin extension. e.g: --addon mymod would launch mymod.bin). It is possible to append this further with --modding (e.g: --addon xxxx --modding).

The --modding parameter unlocks additional functionality which is useful for testing:

  • "noclip" command available
  • "go" command allows access to map 99
  • "chojin" command not only provides invulnerability, but also restores ammo
  • Pressing "M" toggles Monster animation on/off
  • Pressing "N" toggles on-screen debug information
  • Additional options in the menu are accessible, including movement speed, draw distance etc

Music

The 2022 Remaster uses .FLAC (Free Lossless Audio Codec) files for music audio. However, it is not limited to this format specifically. The game can also use:

Although the game can use .ogg and .wav audio files, they must be manually renamed with a .flac extension (even if the data within the file is not .flac formatted). These files must be placed inside your mod's .bin file within the 'Music' folder. Additionally, they must be named as trackxx.flac (where xx represents a number, e.g track01.flac).

A map's RESOURCE.XX file tells the game which music track to play.