# wubly/velocity architecture

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

- Interactive diagram: https://gitdiagram.com/wubly/velocity
- Repository: https://github.com/wubly/velocity

## Overview

Velocity is a Counter-Strike 2 game modification with combat assistance, visual overlays, movement and world changes, and a configurable in-game menu. Its visible runtime workflow is the render context: on presentation it checks game state, invokes rendering features, and draws the menu. The tree also shows hooks, game-state systems, and item customization as major subsystems. Several domain modules are unsampled, so their internal calls and their wiring to hooks are not asserted; the documented render dispatches and excerpted UI/rendering relationships are shown where supported.

Main entry points: [`cs2/velocity-cs2/project/core/rendering/impl/context.cpp`](https://github.com/wubly/velocity/blob/main/cs2/velocity-cs2/project/core/rendering/impl/context.cpp) (Present context), [`cs2/velocity-cs2/project/core/rendering/impl/menu/menu.ragebot.cpp`](https://github.com/wubly/velocity/blob/main/cs2/velocity-cs2/project/core/rendering/impl/menu/menu.ragebot.cpp) (Feature menu), [`cs2/velocity-cs2/project/core/hooks/impl/cheat.cpp`](https://github.com/wubly/velocity/blob/main/cs2/velocity-cs2/project/core/hooks/impl/cheat.cpp) (Game hooks), [`cs2/velocity-cs2/project/external/xdraw/xui/xui.cpp`](https://github.com/wubly/velocity/blob/main/cs2/velocity-cs2/project/external/xdraw/xui/xui.cpp) (UI toolkit)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_combat["Combat assistance"]
  node_combat_rage["Ragebot<br/>[rage.cpp]"]
  node_combat_legit["Legitbot<br/>[legit.cpp]"]
  node_combat_shared["Combat utilities<br/>[shared.cpp]"]
end

subgraph group_visuals["Visual features"]
  node_esp_player["Player ESP<br/>[player.overlay.cpp]"]
  node_esp_item["Item ESP<br/>[item.overlay.cpp]"]
  node_esp_projectile["Projectile ESP"]
end

subgraph group_gameplay["Gameplay changes"]
  node_movement["Movement features<br/>[airstrafe.cpp]"]
  node_world["World changes<br/>[scene.cpp]"]
  node_misc["Misc features<br/>[impacts.cpp]"]
  node_changer["Item customization"]
end

subgraph group_runtime["Runtime and game state"]
  node_hooking["Game hooks<br/>[cheat.cpp]"]
  node_systems["Game systems"]
end

subgraph group_interface["Rendering and interface"]
  node_render_context["Present context<br/>[context.cpp]"]
  node_menu["Feature menu<br/>[menu.ragebot.cpp]"]
  node_settings["Feature settings<br/>[settings.hpp]"]
  node_xui["UI toolkit<br/>[xui.cpp]"]
  node_xdraw["Drawing engine<br/>[xdraw.cpp]"]
  node_shaders["Render shaders<br/>[shaders.hpp]"]
end

node_game(("CS2 game"))

node_game -.->|"hosts hooks"| node_hooking
node_hooking -.->|"dispatches present"| node_render_context
node_render_context -->|"checks game state"| node_systems
node_render_context -->|"calls render features"| node_misc
node_render_context -->|"calls render"| node_combat_rage
node_render_context -->|"calls render"| node_combat_legit
node_render_context -->|"calls render"| node_esp_item
node_render_context -->|"calls render"| node_esp_projectile
node_render_context -->|"calls render"| node_esp_player
node_render_context -->|"calls render"| node_movement
node_render_context -->|"draws menu"| node_menu
node_menu -->|"reads settings"| node_settings
node_menu -->|"builds controls"| node_xui
node_xui -->|"draws widgets"| node_xdraw
node_xdraw -->|"loads shader data"| node_shaders

click node_hooking "https://github.com/wubly/velocity/blob/main/cs2/velocity-cs2/project/core/hooks/impl/cheat.cpp"
click node_systems "https://github.com/wubly/velocity/tree/main/cs2/velocity-cs2/project/core/systems/impl"
click node_combat_rage "https://github.com/wubly/velocity/blob/main/cs2/velocity-cs2/project/core/features/combat/impl/rage.cpp"
click node_combat_legit "https://github.com/wubly/velocity/blob/main/cs2/velocity-cs2/project/core/features/combat/impl/legit.cpp"
click node_combat_shared "https://github.com/wubly/velocity/blob/main/cs2/velocity-cs2/project/core/features/combat/impl/shared.cpp"
click node_esp_player "https://github.com/wubly/velocity/blob/main/cs2/velocity-cs2/project/core/features/esp/player/player.overlay.cpp"
click node_esp_item "https://github.com/wubly/velocity/blob/main/cs2/velocity-cs2/project/core/features/esp/item/item.overlay.cpp"
click node_esp_projectile "https://github.com/wubly/velocity/blob/main/cs2/velocity-cs2/project/core/features/esp/projectile/projectile.overlay.cpp"
click node_movement "https://github.com/wubly/velocity/blob/main/cs2/velocity-cs2/project/core/features/movement/impl/airstrafe.cpp"
click node_world "https://github.com/wubly/velocity/blob/main/cs2/velocity-cs2/project/core/features/world/impl/scene.cpp"
click node_misc "https://github.com/wubly/velocity/blob/main/cs2/velocity-cs2/project/core/features/misc/impl/impacts.cpp"
click node_changer "https://github.com/wubly/velocity/blob/main/cs2/velocity-cs2/project/core/features/changer/impl/econ_item_system.cpp"
click node_render_context "https://github.com/wubly/velocity/blob/main/cs2/velocity-cs2/project/core/rendering/impl/context.cpp"
click node_menu "https://github.com/wubly/velocity/blob/main/cs2/velocity-cs2/project/core/rendering/impl/menu/menu.ragebot.cpp"
click node_settings "https://github.com/wubly/velocity/blob/main/cs2/velocity-cs2/project/core/settings.hpp"
click node_xui "https://github.com/wubly/velocity/blob/main/cs2/velocity-cs2/project/external/xdraw/xui/xui.cpp"
click node_xdraw "https://github.com/wubly/velocity/blob/main/cs2/velocity-cs2/project/external/xdraw/xdraw.cpp"
click node_shaders "https://github.com/wubly/velocity/blob/main/cs2/velocity-cs2/project/external/xdraw/dependencies/shaders.hpp"

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_combat_rage,node_combat_legit,node_combat_shared toneBlue
class node_esp_player,node_esp_item,node_esp_projectile toneAmber
class node_movement,node_world,node_misc,node_changer toneMint
class node_hooking,node_systems toneRose
class node_render_context,node_menu,node_settings,node_xui,node_xdraw,node_shaders,node_game toneIndigo
```

## Components

### Combat assistance

- [Ragebot](https://github.com/wubly/velocity/blob/main/cs2/velocity-cs2/project/core/features/combat/impl/rage.cpp): `cs2/velocity-cs2/project/core/features/combat/impl/rage.cpp`
- [Legitbot](https://github.com/wubly/velocity/blob/main/cs2/velocity-cs2/project/core/features/combat/impl/legit.cpp): `cs2/velocity-cs2/project/core/features/combat/impl/legit.cpp`
- [Combat utilities](https://github.com/wubly/velocity/blob/main/cs2/velocity-cs2/project/core/features/combat/impl/shared.cpp): `cs2/velocity-cs2/project/core/features/combat/impl/shared.cpp`

### Visual features

- [Player ESP](https://github.com/wubly/velocity/blob/main/cs2/velocity-cs2/project/core/features/esp/player/player.overlay.cpp): `cs2/velocity-cs2/project/core/features/esp/player/player.overlay.cpp`
- [Item ESP](https://github.com/wubly/velocity/blob/main/cs2/velocity-cs2/project/core/features/esp/item/item.overlay.cpp): `cs2/velocity-cs2/project/core/features/esp/item/item.overlay.cpp`
- [Projectile ESP](https://github.com/wubly/velocity/blob/main/cs2/velocity-cs2/project/core/features/esp/projectile/projectile.overlay.cpp): `cs2/velocity-cs2/project/core/features/esp/projectile/projectile.overlay.cpp`

### Gameplay changes

- [Movement features](https://github.com/wubly/velocity/blob/main/cs2/velocity-cs2/project/core/features/movement/impl/airstrafe.cpp): `cs2/velocity-cs2/project/core/features/movement/impl/airstrafe.cpp`
- [World changes](https://github.com/wubly/velocity/blob/main/cs2/velocity-cs2/project/core/features/world/impl/scene.cpp): `cs2/velocity-cs2/project/core/features/world/impl/scene.cpp`
- [Misc features](https://github.com/wubly/velocity/blob/main/cs2/velocity-cs2/project/core/features/misc/impl/impacts.cpp): `cs2/velocity-cs2/project/core/features/misc/impl/impacts.cpp`
- [Item customization](https://github.com/wubly/velocity/blob/main/cs2/velocity-cs2/project/core/features/changer/impl/econ_item_system.cpp): `cs2/velocity-cs2/project/core/features/changer/impl/econ_item_system.cpp`

### Runtime and game state

- [Game hooks](https://github.com/wubly/velocity/blob/main/cs2/velocity-cs2/project/core/hooks/impl/cheat.cpp): `cs2/velocity-cs2/project/core/hooks/impl/cheat.cpp`
- [Game systems](https://github.com/wubly/velocity/tree/main/cs2/velocity-cs2/project/core/systems/impl): `cs2/velocity-cs2/project/core/systems/impl`

### Rendering and interface

- [Present context](https://github.com/wubly/velocity/blob/main/cs2/velocity-cs2/project/core/rendering/impl/context.cpp): `cs2/velocity-cs2/project/core/rendering/impl/context.cpp`
- [Feature menu](https://github.com/wubly/velocity/blob/main/cs2/velocity-cs2/project/core/rendering/impl/menu/menu.ragebot.cpp): `cs2/velocity-cs2/project/core/rendering/impl/menu/menu.ragebot.cpp`
- [Feature settings](https://github.com/wubly/velocity/blob/main/cs2/velocity-cs2/project/core/settings.hpp): `cs2/velocity-cs2/project/core/settings.hpp`
- [UI toolkit](https://github.com/wubly/velocity/blob/main/cs2/velocity-cs2/project/external/xdraw/xui/xui.cpp): `cs2/velocity-cs2/project/external/xdraw/xui/xui.cpp`
- [Drawing engine](https://github.com/wubly/velocity/blob/main/cs2/velocity-cs2/project/external/xdraw/xdraw.cpp): `cs2/velocity-cs2/project/external/xdraw/xdraw.cpp`
- [Render shaders](https://github.com/wubly/velocity/blob/main/cs2/velocity-cs2/project/external/xdraw/dependencies/shaders.hpp): `cs2/velocity-cs2/project/external/xdraw/dependencies/shaders.hpp`

### Other components

- **CS2 game**

## Connections

- CS2 game → Game hooks: hosts hooks
- Game hooks → Present context: dispatches present
- Present context → Game systems: checks game state (evidence: `cs2/velocity-cs2/project/core/rendering/impl/context.cpp`)
- Present context → Misc features: calls render features (evidence: `cs2/velocity-cs2/project/core/rendering/impl/context.cpp`)
- Present context → Ragebot: calls render (evidence: `cs2/velocity-cs2/project/core/rendering/impl/context.cpp`)
- Present context → Legitbot: calls render (evidence: `cs2/velocity-cs2/project/core/rendering/impl/context.cpp`)
- Present context → Item ESP: calls render (evidence: `cs2/velocity-cs2/project/core/rendering/impl/context.cpp`)
- Present context → Projectile ESP: calls render (evidence: `cs2/velocity-cs2/project/core/rendering/impl/context.cpp`)
- Present context → Player ESP: calls render (evidence: `cs2/velocity-cs2/project/core/rendering/impl/context.cpp`)
- Present context → Movement features: calls render (evidence: `cs2/velocity-cs2/project/core/rendering/impl/context.cpp`)
- Present context → Feature menu: draws menu (evidence: `cs2/velocity-cs2/project/core/rendering/impl/context.cpp`)
- Feature menu → Feature settings: reads settings (evidence: `cs2/velocity-cs2/project/core/rendering/impl/menu/menu.ragebot.cpp`)
- Feature menu → UI toolkit: builds controls (evidence: `cs2/velocity-cs2/project/core/rendering/impl/menu/menu.ragebot.cpp`)
- UI toolkit → Drawing engine: draws widgets (evidence: `cs2/velocity-cs2/project/external/xdraw/xui/xui.cpp`)
- Drawing engine → Render shaders: loads shader data (evidence: `cs2/velocity-cs2/project/external/xdraw/xdraw.cpp`)
