Skip to content
neomorrisonPublic

About

cs_office HvH: a browser Counter-Strike 2 style Hack vs Hack game. 12v12 on a cs_office recreation with CS2 damage and economy, autowall, backtrack and bots that use the same in-game cheats as you.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

95 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cs_office HvH

A Counter-Strike 2 style Hack vs Hack game that runs in your browser.

12 v 12 on a cs_office recreation with CS2 damage, armor and economy.
Everyone cheats: you get the same aimbot, anti-aim, resolver and tickbase menu the bots use.

Play it →  ·  Features  ·  How it works  ·  Controls  ·  Run locally

Live demo License: MIT three.js JavaScript No build step Stars


cs_office HvH title screen with a player model under the ESP box

Why

HvH ("hack vs hack") is a Counter-Strike scene where both sides run cheats and the fight is about whose settings, resolver and tick exploits win. Watching it is easy; understanding why a "100% hit chance" shot missed is not. This game rebuilds those mechanics from the ground up, against bots that run the exact same cheat code you do, so every setting has a visible, testable effect.

It is a single-player game. The "cheats" are game mechanics against bots in your own browser tab. Nothing here touches Counter-Strike or any online game.

Features

  • MR12 matches. Best of 24, sides switch at the half, first to 13, with a CS2-style economy, buy menu, hostages and grenades.
  • CS2 damage model. Hitgroup multipliers, the real armor formula and distance falloff (base × range_modifier^(dist/500)).
  • Autowall. Bullets lose damage through walls by thickness and material, and stop when a wall is too dense for the weapon.
  • Real inaccuracy. Movement, jump, crouch, spray, recovery, flinch and landing penalties. Pistols punish spam, so you tap.
  • Backtrack in ticks. Every agent keeps a 16-tick (250 ms at 64 tick) lag-compensation history, with a trail and ghost so you can see it.
  • Hide shots and double tap. Both spend the same 16-tick budget, only one can apply per shot, and per-weapon fire cycles decide what can be doubled (never the SSG08 or the R8).
  • Anti-aim and resolver. Six yaw modes, real desync geometry, freestanding and fake duck, against a resolver with three modes (animation, brute, onshot) that has to earn its read.
  • Safepoint and body aim. A lost read costs the head, not the body, because desync rotates the body around the spine.
  • Per-weapon aimbot config. Hit chance, min damage and hitbox priority with a master value and optional per-weapon overrides.
  • Bots on equal footing. Named personas with their own playstyles and settings, squad roles (push, hold, flank) and lanes, and no hidden handicap.
  • aim_practice map. Three rooms: idle targets, an anti-aim target for tuning the resolver, and one armed bot that fires back.
  • Map Builder. An in-game editor for custom layouts, with grid nav generation and persistence in the browser.
  • Self-test. HVH.verifyCheats() toggles every menu feature against the live game and checks for an observable effect.

How it works

One cone for everything. Bullets are offset the way CS offsets them: r·(cos φ, sin φ), with r scaling linearly off a uniform roll, so the cone is dense in the middle and thin at the rim. Manual fire, the aimbot and the hit chance estimate all use that one implementation. Hit chance is measured by tracing the cone against the hitbox you aim at, scaled by how much of that hitbox is out of cover, and the bullet is then rolled down the same cone. 100% means the whole cone sits inside a fully exposed hitbox, so at a 100 min hit chance the aimbot rarely fires, and when it does, only the resolver can lose the shot. A shot's own bloom is charged to the next shot, as in CS.

Tickbase exploits share a budget. The server only processes a bounded burst of user commands (16 ticks) and only rewinds a bounded window. Hide shots shifts the tickbase backward so the round leaves on a tick where your fake angle was still up. Double tap shifts it forward past the weapon's next-attack check, which costs the weapon's whole fire cycle in ticks: Duals 10, USP-S and Glock 13, Deagle 15, SCAR-20 and G3SG1 16, SSG08 80 (over budget). The R8's trigger is a hammer-cock state machine, not a timestamp, so there is nothing to shift. While a shift is still recharging, backtrack is suppressed, and the HUD's DT / HS / BT badges light one at a time so the rule is visible.

The resolver has a ceiling, not a coin flip. An enemy who fires without hiding the shot pins their real angles and hands you a near-certain read for a few seconds, until their desync side re-rolls. With no read, the resolver guesses and the target's anti-aim cuts the guess down. A faster yaw, a wider desync, a fake pitch and a fake duck each cost the resolver something. The counter-play is "make them shoot".

Auto-stop solves for speed. Instead of planting you, it sheds exactly as much speed as your min hit chance needs at the current range. A close shot barely slows you; a long one stops you.

Tested headless. test/smoke.mjs loads every game module under stubbed three.js and DOM, starts a match and fast-forwards several rounds. It also runs HVH.verifyCheats(), so a setting that stops being wired fails the test instead of failing mid-round.

Controls

Key Action
W A S D / mouse Move / look
LMB / RMB Fire / scope, burst or fan
R Reload
1 2 3 Pistol, rifle, knife
4 or G Grenade
B Buy menu
E Rescue hostage
Ctrl or C Crouch (use C if Ctrl+W closes your tab)
X Fake duck (hold or toggle, rebindable)
V Third person
Tab Scoreboard
I Cheat menu
F1 to F8 Cheat toggles

In the buy menu, picking another gun during the same buy time refunds the one you just bought, like the CS2 misclick sellback.

Run locally

The game is plain ES modules with three.js from a CDN import map. No install, no build. It has to be served over HTTP because modules do not load from file://.

git clone https://github.com/neomorrison/hvh.git
cd hvh
python3 -m http.server 8000     # then open http://localhost:8000/
node --import ./test/register.mjs ./test/smoke.mjs     # headless smoke test

Open the browser console and run HVH.verifyCheats() for a table of every cheat feature and whether it had an effect.

Project structure

index.html        HUD, panels, styles, import map, module entry
src/
  data.js         economy, weapon stats, inaccuracy, penetration, damage model
  world.js        materials, collision, line of sight, penetration, nav graph
  map.js          cs_office layout, custom maps, grid nav, persistence
  agents.js       bodies, weapon models, personas, hitboxes
  combat.js       bloom, fire, damage, aimbot, movement, weapons
  ai.js           bot economy and HvH behaviour
  game.js         rounds, match, buy menu, hostages, grenades
  cheats.js       cheat menu UI and config persistence
  practice.js     aim_practice map
  editor.js       Map Builder
  selftest.js     HVH.verifyCheats()
  main.js         input, main loop, boot
test/             Node smoke test with stubbed three.js and DOM
tools/            BSP/VPK readers and import notes for loading your own CS2 map

tools/IMPORT.md covers loading the geometry and spawns of another CS2 map from your own game install.

Contributing

Issues and pull requests are welcome. Good first additions:

  • another weapon with its real CS2 stats in src/data.js
  • a new bot persona or squad role in src/ai.js
  • a fresh layout made in the Map Builder
  • a check in src/selftest.js for a feature it does not cover yet

If cs_office HvH gave you a few good rounds, a ⭐ helps other people find it.

Disclaimer

An independent fan project, not affiliated with, endorsed by or sponsored by Valve. Counter-Strike, CS2 and cs_office are Valve trademarks. The game reproduces CS2 mechanics; the engine code is original. The cs_office map textures in maps/ and the sound files in sfx/ are Valve's intellectual property, included for this personal project only and not licensed for redistribution. The cheats exist only inside this game against its own bots.

License

Code: MIT. The MIT license does not cover the Valve assets described above.

About

cs_office HvH: a browser Counter-Strike 2 style Hack vs Hack game. 12v12 on a cs_office recreation with CS2 damage and economy, autowall, backtrack and bots that use the same in-game cheats as you.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages