# douglasteyh/cs16-macos-arm64 architecture

> Architecture diagram of the GitHub repository douglasteyh/cs16-macos-arm64, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-23). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/douglasteyh/cs16-macos-arm64
- Repository: https://github.com/douglasteyh/cs16-macos-arm64

## Overview

This repository packages a native Apple Silicon Counter-Strike 1.6 app around Xash3D FWGS and CS16Client. The main user workflow is to launch the app, import game files on first run if needed, then play using the engine and client. The README documents launcher behavior and integrations, but no source excerpts are available, so runtime relationships below rely on those documented statements; submodule paths identify directories rather than inspected implementation files.

Main entry points: [`src/xash3d-fwgs`](https://github.com/douglasteyh/cs16-macos-arm64/tree/main/src/xash3d-fwgs) (Xash3D engine), [`make-dmg.sh`](https://github.com/douglasteyh/cs16-macos-arm64/blob/main/make-dmg.sh) (First-run importer), [`src/cs16-client`](https://github.com/douglasteyh/cs16-macos-arm64/tree/main/src/cs16-client) (CS16 client), [`src/SDL3`](https://github.com/douglasteyh/cs16-macos-arm64/tree/main/src/SDL3) (SDL3)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App lifecycle"]
  node_launcher["App launcher<br/>[make-dmg.sh]"]
  node_importer["First-run importer<br/>[make-dmg.sh]"]
end

subgraph group_runtime["Game runtime"]
  node_engine["Xash3D engine"]
  node_client["CS16 client"]
  node_sdl["SDL3"]
  node_filesystem["filesystem_stdio"]
end

subgraph group_data["Game data and services"]
  node_gamefiles["Valve game files"]
  node_appfiles["Bundled game files"]
  node_support[("Application Support")]
  node_settings["Player settings"]
  node_screenshots["Screenshots and downloads"]
  node_identity["Player identity"]
end

node_player(("Player"))
node_servers(("Game servers"))
node_steam["Steam game files"]
node_folder["Selected game folder"]

node_player -->|"launches"| node_launcher
node_launcher -->|"starts if needed"| node_importer
node_importer -->|"searches first"| node_steam
node_importer -->|"requests if needed"| node_folder
node_steam -->|"provides files"| node_importer
node_folder -->|"provides files"| node_importer
node_importer -->|"copies game data"| node_support
node_launcher -->|"runs"| node_engine
node_engine -->|"reads read-only"| node_appfiles
node_engine -->|"uses working directory"| node_support
node_engine -->|"runs client"| node_client
node_engine -->|"uses SDL3 backend"| node_sdl
node_engine -->|"writes config"| node_settings
node_engine -->|"writes output"| node_screenshots
node_launcher -->|"symlinks at startup"| node_filesystem
node_launcher -->|"creates if absent"| node_identity
node_client -->|"connects to"| node_servers
node_servers -.->|"authenticates via ReUnion"| node_client

click node_launcher "https://github.com/douglasteyh/cs16-macos-arm64/blob/main/make-dmg.sh"
click node_importer "https://github.com/douglasteyh/cs16-macos-arm64/blob/main/make-dmg.sh"
click node_engine "https://github.com/douglasteyh/cs16-macos-arm64/tree/main/src/xash3d-fwgs"
click node_client "https://github.com/douglasteyh/cs16-macos-arm64/tree/main/src/cs16-client"
click node_sdl "https://github.com/douglasteyh/cs16-macos-arm64/tree/main/src/SDL3"
click node_filesystem "https://github.com/douglasteyh/cs16-macos-arm64/tree/main/src/xash3d-fwgs"

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_launcher,node_importer toneBlue
class node_engine,node_client,node_sdl,node_filesystem toneAmber
class node_gamefiles,node_appfiles,node_support,node_settings,node_screenshots,node_identity,node_servers toneMint
class node_player,node_steam,node_folder toneIndigo
```

## Components

### App lifecycle

- [App launcher](https://github.com/douglasteyh/cs16-macos-arm64/blob/main/make-dmg.sh): `make-dmg.sh`
- [First-run importer](https://github.com/douglasteyh/cs16-macos-arm64/blob/main/make-dmg.sh): `make-dmg.sh`

### Game runtime

- [Xash3D engine](https://github.com/douglasteyh/cs16-macos-arm64/tree/main/src/xash3d-fwgs): `src/xash3d-fwgs`
- [CS16 client](https://github.com/douglasteyh/cs16-macos-arm64/tree/main/src/cs16-client): `src/cs16-client`
- [SDL3](https://github.com/douglasteyh/cs16-macos-arm64/tree/main/src/SDL3): `src/SDL3`
- [filesystem_stdio](https://github.com/douglasteyh/cs16-macos-arm64/tree/main/src/xash3d-fwgs): `src/xash3d-fwgs`

### Game data and services

- **Valve game files**
- **Bundled game files**
- **Application Support**
- **Player settings**
- **Screenshots and downloads**
- **Player identity**

### Other components

- **Player**
- **Game servers**
- **Steam game files**
- **Selected game folder**

## Connections

- Player → App launcher: launches (evidence: `README.md`)
- App launcher → First-run importer: starts if needed (evidence: `README.md`)
- First-run importer → Steam game files: searches first (evidence: `README.md`)
- First-run importer → Selected game folder: requests if needed (evidence: `README.md`)
- Steam game files → First-run importer: provides files (evidence: `README.md`)
- Selected game folder → First-run importer: provides files (evidence: `README.md`)
- First-run importer → Application Support: copies game data (evidence: `README.md`)
- App launcher → Xash3D engine: runs (evidence: `README.md`)
- Xash3D engine → Bundled game files: reads read-only (evidence: `README.md`)
- Xash3D engine → Application Support: uses working directory (evidence: `README.md`)
- Xash3D engine → CS16 client: runs client (evidence: `README.md`)
- Xash3D engine → SDL3: uses SDL3 backend (evidence: `README.md`)
- Xash3D engine → Player settings: writes config (evidence: `README.md`)
- Xash3D engine → Screenshots and downloads: writes output (evidence: `README.md`)
- App launcher → filesystem_stdio: symlinks at startup (evidence: `README.md`)
- App launcher → Player identity: creates if absent (evidence: `README.md`)
- CS16 client → Game servers: connects to (evidence: `README.md`)
- Game servers → CS16 client: authenticates via ReUnion (evidence: `README.md`)
