# commercial-game-sources/rise_of_the_triad architecture

> Architecture diagram of the GitHub repository commercial-game-sources/rise_of_the_triad, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/commercial-game-sources/rise_of_the_triad
- Repository: https://github.com/commercial-game-sources/rise_of_the_triad

## Overview

This repository contains the Rise of the Triad game, its DOS-era audio and communications support, and the RTS sound-resource maker. The principal workflow is player input through game simulation and rendering to audiovisual output; multiplayer, cinematics, level/resource handling, and sound authoring are separate capabilities. The README identifies the game but gives no subsystem wiring, and most source references are unsampled or absent from the index, so inferred runtime links are dashed rather than asserted as verified calls.

Main entry points: [`rott/RT_GAME.C`](https://github.com/commercial-game-sources/rise_of_the_triad/blob/master/rott/RT_GAME.C) (Game flow), [`audiolib/SOURCE/FX_MAN.C`](https://github.com/commercial-game-sources/rise_of_the_triad/blob/master/audiolib/SOURCE/FX_MAN.C) (Sound effects), [`audiolib/SOURCE/MULTIVOC.C`](https://github.com/commercial-game-sources/rise_of_the_triad/blob/master/audiolib/SOURCE/MULTIVOC.C) (Voice mixer), [`rott/RT_MAP.C`](https://github.com/commercial-game-sources/rise_of_the_triad/blob/master/rott/RT_MAP.C) (Map handling)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_game["Game runtime"]
  node_main["Game entry<br/>[RT_MAIN.C]"]
  node_input["Input<br/>[RT_IN.C]"]
  node_gameplay["Game flow<br/>[RT_GAME.C]"]
  node_actors["Actors<br/>[RT_ACTOR.C]"]
  node_level["Level build<br/>[RT_TED.C]"]
  node_map["Map handling<br/>[RT_MAP.C]"]
  node_engine["Raycaster<br/>[ENGINE.C]"]
  node_draw["Scene drawing<br/>[RT_DRAW.C]"]
  node_video["Video output<br/>[RT_VID.C]"]
  node_menus["Menus<br/>[RT_MENU.C]"]
end

subgraph group_content["Content and cinematics"]
  node_resources["WAD resources<br/>[W_WAD.C]"]
  node_cinema["Cinematics<br/>[CIN_MAIN.C]"]
end

subgraph group_audio["Audio system"]
  node_soundgame["Game sound<br/>[RT_SOUND.C]"]
  node_fx["Sound effects<br/>[FX_MAN.C]"]
  node_mixer["Voice mixer<br/>[MULTIVOC.C]"]
  node_blaster["Sound Blaster<br/>[BLASTER.C]"]
  node_gus["GUS playback<br/>[GUSWAVE.C]"]
  node_music["MIDI music<br/>[MIDI.C]"]
end

subgraph group_network["Multiplayer"]
  node_ipxsetup["IPX setup<br/>[IPXSETUP.C]"]
  node_ipxnet["IPX transport<br/>[IPXNET.C]"]
  node_serial["Serial transport<br/>[SERCOM.C]"]
  node_serialport["Serial port<br/>[PORT.C]"]
  node_netgame["Game networking<br/>[RT_NET.C]"]
end

subgraph group_tools["Sound authoring"]
  node_maker["RTS maker<br/>[RTSMAKER.C]"]
  node_script["Script commands<br/>[CMDLIB.C]"]
end

node_player(("Player"))
node_audiofile["Sound files"]
node_hardware["Audio hardware"]

node_player -.->|"starts"| node_main
node_main -.->|"reads input"| node_input
node_input -.->|"drives play"| node_gameplay
node_gameplay -.->|"updates actors"| node_actors
node_gameplay -.->|"uses map"| node_map
node_level -.->|"builds map"| node_map
node_map -.->|"supplies tiles"| node_engine
node_engine -.->|"produces posts"| node_draw
node_draw -.->|"draws scene"| node_video
node_menus -.->|"selects play"| node_gameplay
node_resources -.->|"supplies content"| node_level
node_resources -.->|"supplies content"| node_cinema
node_gameplay -.->|"plays sequences"| node_cinema
node_gameplay -.->|"requests sound"| node_soundgame
node_soundgame -.->|"uses effects"| node_fx
node_fx -.->|"mixes voices"| node_mixer
node_mixer -.->|"starts playback"| node_blaster
node_mixer -.->|"starts playback"| node_gus
node_fx -.->|"outputs audio"| node_hardware
node_gameplay -.->|"requests music"| node_music
node_ipxsetup -.->|"uses transport"| node_ipxnet
node_serial -.->|"uses port"| node_serialport
node_netgame -.->|"exchanges packets"| node_ipxnet
node_netgame -.->|"exchanges data"| node_serial
node_maker -.->|"processes commands"| node_script
node_audiofile -.->|"packages sounds"| node_maker

click node_main "https://github.com/commercial-game-sources/rise_of_the_triad/blob/master/rott/RT_MAIN.C"
click node_input "https://github.com/commercial-game-sources/rise_of_the_triad/blob/master/rott/RT_IN.C"
click node_gameplay "https://github.com/commercial-game-sources/rise_of_the_triad/blob/master/rott/RT_GAME.C"
click node_actors "https://github.com/commercial-game-sources/rise_of_the_triad/blob/master/rott/RT_ACTOR.C"
click node_level "https://github.com/commercial-game-sources/rise_of_the_triad/blob/master/rott/RT_TED.C"
click node_map "https://github.com/commercial-game-sources/rise_of_the_triad/blob/master/rott/RT_MAP.C"
click node_engine "https://github.com/commercial-game-sources/rise_of_the_triad/blob/master/rott/ENGINE.C"
click node_draw "https://github.com/commercial-game-sources/rise_of_the_triad/blob/master/rott/RT_DRAW.C"
click node_video "https://github.com/commercial-game-sources/rise_of_the_triad/blob/master/rott/RT_VID.C"
click node_menus "https://github.com/commercial-game-sources/rise_of_the_triad/blob/master/rott/RT_MENU.C"
click node_resources "https://github.com/commercial-game-sources/rise_of_the_triad/blob/master/rott/W_WAD.C"
click node_cinema "https://github.com/commercial-game-sources/rise_of_the_triad/blob/master/rott/CIN_MAIN.C"
click node_soundgame "https://github.com/commercial-game-sources/rise_of_the_triad/blob/master/rott/RT_SOUND.C"
click node_fx "https://github.com/commercial-game-sources/rise_of_the_triad/blob/master/audiolib/SOURCE/FX_MAN.C"
click node_mixer "https://github.com/commercial-game-sources/rise_of_the_triad/blob/master/audiolib/SOURCE/MULTIVOC.C"
click node_blaster "https://github.com/commercial-game-sources/rise_of_the_triad/blob/master/audiolib/SOURCE/BLASTER.C"
click node_gus "https://github.com/commercial-game-sources/rise_of_the_triad/blob/master/audiolib/SOURCE/GUSWAVE.C"
click node_music "https://github.com/commercial-game-sources/rise_of_the_triad/blob/master/audiolib/SOURCE/MIDI.C"
click node_ipxsetup "https://github.com/commercial-game-sources/rise_of_the_triad/blob/master/rottcom/ROTTIPX/IPXSETUP.C"
click node_ipxnet "https://github.com/commercial-game-sources/rise_of_the_triad/blob/master/rottcom/ROTTIPX/IPXNET.C"
click node_serial "https://github.com/commercial-game-sources/rise_of_the_triad/blob/master/rottcom/ROTTSER/SERCOM.C"
click node_serialport "https://github.com/commercial-game-sources/rise_of_the_triad/blob/master/rottcom/ROTTSER/PORT.C"
click node_netgame "https://github.com/commercial-game-sources/rise_of_the_triad/blob/master/rott/RT_NET.C"
click node_maker "https://github.com/commercial-game-sources/rise_of_the_triad/blob/master/rtsmaker/RTSMAKER.C"
click node_script "https://github.com/commercial-game-sources/rise_of_the_triad/blob/master/rtsmaker/CMDLIB.C"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_main,node_input,node_gameplay,node_actors,node_level,node_map,node_engine,node_draw,node_video,node_menus toneBlue
class node_resources,node_cinema toneAmber
class node_soundgame,node_fx,node_mixer,node_blaster,node_gus,node_music toneMint
class node_ipxsetup,node_ipxnet,node_serial,node_serialport,node_netgame toneRose
class node_maker,node_script,node_player,node_audiofile,node_hardware toneIndigo
```

## Components

### Game runtime

- [Game entry](https://github.com/commercial-game-sources/rise_of_the_triad/blob/master/rott/RT_MAIN.C): `rott/RT_MAIN.C`
- [Input](https://github.com/commercial-game-sources/rise_of_the_triad/blob/master/rott/RT_IN.C): `rott/RT_IN.C`
- [Game flow](https://github.com/commercial-game-sources/rise_of_the_triad/blob/master/rott/RT_GAME.C): `rott/RT_GAME.C`
- [Actors](https://github.com/commercial-game-sources/rise_of_the_triad/blob/master/rott/RT_ACTOR.C): `rott/RT_ACTOR.C`
- [Level build](https://github.com/commercial-game-sources/rise_of_the_triad/blob/master/rott/RT_TED.C): `rott/RT_TED.C`
- [Map handling](https://github.com/commercial-game-sources/rise_of_the_triad/blob/master/rott/RT_MAP.C): `rott/RT_MAP.C`
- [Raycaster](https://github.com/commercial-game-sources/rise_of_the_triad/blob/master/rott/ENGINE.C): `rott/ENGINE.C`
- [Scene drawing](https://github.com/commercial-game-sources/rise_of_the_triad/blob/master/rott/RT_DRAW.C): `rott/RT_DRAW.C`
- [Video output](https://github.com/commercial-game-sources/rise_of_the_triad/blob/master/rott/RT_VID.C): `rott/RT_VID.C`
- [Menus](https://github.com/commercial-game-sources/rise_of_the_triad/blob/master/rott/RT_MENU.C): `rott/RT_MENU.C`

### Content and cinematics

- [WAD resources](https://github.com/commercial-game-sources/rise_of_the_triad/blob/master/rott/W_WAD.C): `rott/W_WAD.C`
- [Cinematics](https://github.com/commercial-game-sources/rise_of_the_triad/blob/master/rott/CIN_MAIN.C): `rott/CIN_MAIN.C`

### Audio system

- [Game sound](https://github.com/commercial-game-sources/rise_of_the_triad/blob/master/rott/RT_SOUND.C): `rott/RT_SOUND.C`
- [Sound effects](https://github.com/commercial-game-sources/rise_of_the_triad/blob/master/audiolib/SOURCE/FX_MAN.C): `audiolib/SOURCE/FX_MAN.C`
- [Voice mixer](https://github.com/commercial-game-sources/rise_of_the_triad/blob/master/audiolib/SOURCE/MULTIVOC.C): `audiolib/SOURCE/MULTIVOC.C`
- [Sound Blaster](https://github.com/commercial-game-sources/rise_of_the_triad/blob/master/audiolib/SOURCE/BLASTER.C): `audiolib/SOURCE/BLASTER.C`
- [GUS playback](https://github.com/commercial-game-sources/rise_of_the_triad/blob/master/audiolib/SOURCE/GUSWAVE.C): `audiolib/SOURCE/GUSWAVE.C`
- [MIDI music](https://github.com/commercial-game-sources/rise_of_the_triad/blob/master/audiolib/SOURCE/MIDI.C): `audiolib/SOURCE/MIDI.C`

### Multiplayer

- [IPX setup](https://github.com/commercial-game-sources/rise_of_the_triad/blob/master/rottcom/ROTTIPX/IPXSETUP.C): `rottcom/ROTTIPX/IPXSETUP.C`
- [IPX transport](https://github.com/commercial-game-sources/rise_of_the_triad/blob/master/rottcom/ROTTIPX/IPXNET.C): `rottcom/ROTTIPX/IPXNET.C`
- [Serial transport](https://github.com/commercial-game-sources/rise_of_the_triad/blob/master/rottcom/ROTTSER/SERCOM.C): `rottcom/ROTTSER/SERCOM.C`
- [Serial port](https://github.com/commercial-game-sources/rise_of_the_triad/blob/master/rottcom/ROTTSER/PORT.C): `rottcom/ROTTSER/PORT.C`
- [Game networking](https://github.com/commercial-game-sources/rise_of_the_triad/blob/master/rott/RT_NET.C): `rott/RT_NET.C`

### Sound authoring

- [RTS maker](https://github.com/commercial-game-sources/rise_of_the_triad/blob/master/rtsmaker/RTSMAKER.C): `rtsmaker/RTSMAKER.C`
- [Script commands](https://github.com/commercial-game-sources/rise_of_the_triad/blob/master/rtsmaker/CMDLIB.C): `rtsmaker/CMDLIB.C`

### Other components

- **Player**
- **Sound files**
- **Audio hardware**

## Connections

- Player → Game entry: starts
- Game entry → Input: reads input
- Input → Game flow: drives play
- Game flow → Actors: updates actors
- Game flow → Map handling: uses map
- Level build → Map handling: builds map
- Map handling → Raycaster: supplies tiles
- Raycaster → Scene drawing: produces posts
- Scene drawing → Video output: draws scene
- Menus → Game flow: selects play
- WAD resources → Level build: supplies content
- WAD resources → Cinematics: supplies content
- Game flow → Cinematics: plays sequences
- Game flow → Game sound: requests sound
- Game sound → Sound effects: uses effects
- Sound effects → Voice mixer: mixes voices
- Voice mixer → Sound Blaster: starts playback
- Voice mixer → GUS playback: starts playback
- Sound effects → Audio hardware: outputs audio
- Game flow → MIDI music: requests music
- IPX setup → IPX transport: uses transport
- Serial transport → Serial port: uses port
- Game networking → IPX transport: exchanges packets
- Game networking → Serial transport: exchanges data
- RTS maker → Script commands: processes commands
- Sound files → RTS maker: packages sounds
