Overview
The HotWheels SDK is a comprehensive C++ framework for creating game modifications for Counter-Strike: Global Offensive. It follows a modular architecture that separates concerns into distinct layers, making it easy to extend and maintain.Core Components
The SDK is organized into four primary modules:Globals
Core initialization, interfaces, and global state management
Utils
Utility systems for memory operations, rendering, and helpers
Hacks
Feature implementations and game logic modifications
Game SDK
CS:GO game structures, classes, and interfaces
Directory Structure
Initialization Flow
The SDK follows a specific initialization sequence when injected into the game process:Thread Creation
A separate thread is created to avoid blocking the main game thread during initialization.
Interface Initialization
Game interfaces are captured using the Source:
g_interfaces global:globals/interfaces/interfaces.h:16-42Global Context System
The SDK uses a global context (g_ctx) to maintain state across different hooks and features:
globals/ctx/ctx.h:9-33
The context system provides centralized access to frequently used game objects and state, eliminating the need to pass parameters through multiple function calls.
Interface Management
Game interfaces are accessed through the globalg_interfaces object, which wraps Source Engine’s interface system:
- device - Direct3D9 device for rendering
- engine - Engine client for game state
- client - Client DLL for entity access
- globals - Global variables (tick count, time, etc.)
- entity_list - Access to all game entities
- prediction - Client-side prediction system
Module System
The module system provides utilities for working with game DLLs:utils/modules/modules.h:47-64
Each module provides pattern scanning and interface finding capabilities.
Feature Architecture
Features are organized by category:- Combat
- Visual
- Movement
- Misc
- Aimbot - Automatic targeting system
- Triggerbot - Automatic firing
- Lag Compensation - Hit registration improvements
Dependencies
The SDK includes several third-party libraries:| Library | Purpose |
|---|---|
| MinHook | Function hooking and detours |
| ImGui | Menu and overlay rendering |
| FreeType | Font rendering |
| nlohmann/json | Configuration serialization |
| lazy_importer | Import obfuscation |
| mocking_bird | Exception handling |
Best Practices
Initialization Order
Initialization Order
Always initialize components in this order:
- Console/logging system
- Module handles
- Game interfaces
- Netvars
- Hooks
- Features
Error Handling
Error Handling
Use the
MOCKING_TRY and MOCKING_CATCH macros for exception safety:Thread Safety
Thread Safety
Game functions are typically called from the game’s main thread. Be cautious when accessing shared state from multiple threads.
Next Steps
Hooking
Learn how to intercept and modify game functions
Memory
Understand memory scanning and netvar management