- About
- Features
- Project structure
- Getting started
- Build & run
- Controls
- Architecture overview
- Roadmap
- Contributing
- Socials
- License
TrueShot is an in-development tactical first-person shooter inspired by the movement and gunplay of competitive Source-engine titles. The current build is a single-player practice range that exercises the core systems (movement, weapons, audio, networking) before they are wired together into the full 5v5 match flow.
This repository hosts both the client (rendered with OpenGL 3.3 + GLFW) and a separate network module (ENet-based authoritative server / client prototype).
- Source-style movement — strafe-jumping, bunny-hopping, fixed 64-tick physics, wall bounces, friction and air-control modelled after CS-style values.
- Weapon system — five weapons (Glock, Deagle, AK-47, M4A4, AWP) with their own damage, recoil patterns, fire modes, ADS times and reload behaviour.
- Real hit detection — ray-vs-AABB raycasting against an
GameWorldof scoring targets, with location-based damage (head / chest / legs). - Score & accuracy tracking — kills, hits, shots fired, accuracy %.
- Audio system — OpenAL-ready architecture with 3D sources, footsteps, weapon cues and reverb zones.
- Network module — ENet-based prototype with input snapshots, server reconciliation scaffolding and a tiny bit-stream codec.
- Modern CMake — single
CMakeLists.txt, presets, warnings enabled, optional Werror.
TrueShot/
├─ include/ # public headers (one .h per subsystem)
│ ├─ application.h # top-level lifecycle (init / run / shutdown)
│ ├─ renderer.h # OpenGL renderer
│ ├─ game_world.h # targets, score, hit registration
│ ├─ target.h # AABB target + ray intersection
│ ├─ fps_camera.h # yaw/pitch camera
│ ├─ player_controller.h # CS-style movement
│ ├─ physics_types.h # tuneable physics constants
│ ├─ weapon_system.h # weapons, recoil, ADS, hit detection
│ ├─ weapon_types.h
│ ├─ audio_system.h # 3D audio, footsteps, reverb
│ ├─ audio_types.h
│ └─ shader.h
├─ src/ # implementations
├─ shaders/ # GLSL (basic.vert / basic.frag)
├─ network_module/ # ENet client/server prototype + library
├─ CMakeLists.txt
├─ CMakePresets.json
├─ RunTrueShot.sh # macOS / Linux build & run
├─ RunTrueShot.bat # Windows build & run
├─ CONTRIBUTING.md
├─ LICENSE
└─ README.md
| Tool | Minimum version | Notes |
|---|---|---|
| C++ compiler | C++17 | MSVC 19.30+, Clang 12+, GCC 10+ |
| CMake | 3.16 | 3.21+ recommended for presets |
| vcpkg | latest | installs the native deps |
The Windows-specific Visual Studio / MinGW setup steps are in CONTRIBUTING.md.
git clone https://github.com/microsoft/vcpkg.git
./vcpkg/bootstrap-vcpkg.sh # or .\vcpkg\bootstrap-vcpkg.bat on Windows
export VCPKG_ROOT="$PWD/vcpkg" # set %VCPKG_ROOT% on Windows
"$VCPKG_ROOT/vcpkg" install glfw3 glm "glad[gl-api-33]" enetgit clone git@github.com:SachsA/TrueShot.git
cd TrueShot# macOS / Linux
./RunTrueShot.sh
# Windows
RunTrueShot.batcmake --preset default # configure (Release)
cmake --build --preset default
./build/default/bin/TrueShotOther presets: debug, strict (Werror).
cmake -S . -B build \
-DCMAKE_TOOLCHAIN_FILE="$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake" \
-DCMAKE_BUILD_TYPE=Release
cmake --build build --parallel
./build/bin/TrueShotThe build copies shaders/ next to the executable automatically.
| Action | Key |
|---|---|
| Move | W A S D |
| Jump / bunny-hop | Space |
| Look | Mouse |
| Fire | Mouse 1 |
| Aim down sights | Mouse 2 |
| Reload | R |
| Switch weapon | 1 Glock · 2 Deagle · 3 AK-47 · 4 M4A4 · 5 AWP |
| Master volume | + / - |
| Toggle audio debug | M |
| Quit | Esc |
┌──────────────────────────────────────────────────────────────┐
│ Application │
│ Owns the window, callbacks, main loop and every subsystem. │
├──────────────────────────────────────────────────────────────┤
│ FPSCamera PlayerController WeaponSystem │
│ GameWorld AudioSystem Renderer │
└──────────────────────────────────────────────────────────────┘
│ │ │
▼ ▼ ▼
yaw/pitch 64-tick physics raycast vs targets
score / accuracy
Applicationis the only owner of subsystem lifetimes; everything else takes raw pointers / references.Rendereronly knows about the camera, the world, the weapon (for FOV) and the player — it never reaches back into input, audio or globals.WeaponSystem::fire()performs a real ray-vs-AABB raycast againstGameWorld::raycastTargets()and applies damage based on hit location.
- Proper HUD (TTF text rendering for ammo / HP / score)
- Wire the ENet network module into the main game loop
- Lobby + match flow (5v5 round structure)
- Map loading (BSP / glTF), AI bots
- Proper asset pipeline (textures, view-models, sound banks)
- Replay & demo system
See CONTRIBUTING.md for development setup, the coding style and the pull-request workflow.
- X / Twitter — https://x.com/TrueShotGame
- YouTube — https://www.youtube.com/channel/UC0cwNEc0hI77cCWwX7EaNTg
- Twitch — https://www.twitch.tv/trueshotgame
TrueShot is proprietary software. All rights reserved. See LICENSE for the full terms — in short, you may not use, copy, modify, redistribute or sell any part of this project without explicit permission from the author.