A small first-person 3D shooter inspired by a USPSA (United States Practical Shooting Association) match. You run a two-stage course of fire against a buzzer, scored by hit factor (points ÷ time). Stage 2 adds an armed ranchero bad guy who shoots back — use cover and put him down to clear it.
The entire match (arena, lights, player, targets, the ranchero, the HUD) is generated procedurally from C# at runtime using Unity primitives. There are no imported models, textures, materials, or prefabs to break — open the scene and press Play.
- Unity 6 LTS (6000.0.x) recommended. Any Unity 2021.3+ will also open it (Unity Hub will offer to upgrade-open). Built-in Render Pipeline.
- Open Unity Hub → Add → Add project from disk and select this folder
(
USPSA-Shooter). - Open the project. Unity imports and compiles the scripts (first open takes a minute).
- Open the scene
Assets/Scenes/Match.unityif it isn't already loaded. (It contains a singleGameManagerobject that builds everything else.) - Press Play.
| Input | Action |
|---|---|
W A S D |
Move |
| Mouse | Look |
| Left mouse | Fire |
R |
Reload |
Shift |
Sprint |
Space |
Jump |
F |
Make Ready / start the buzzer (when prompted) |
Space |
Advance after a stage / restart match |
R |
Re-shoot a stage after you go down |
Esc |
Free the mouse cursor |
- Make Ready — press
F. After a random delay the buzzer goes (GO!) and the clock starts. - On the clock — engage every target. Scoring follows USPSA conventions:
- Paper targets need two hits ("double tap") to be neutralized. Hits are zoned by height: A = 5, C = 3, D = 1.
- Steel poppers fall on a single hit (5 points).
- Stage 1 — "El Presidente Bay": freestyle paper + steel, no return fire.
- Stage 2 — "The Ranchero Strikes Back": paper targets plus the ranchero. He fires dodgeable bursts at you from behind a barricade — break line of sight behind cover. He takes ~3 solid hits. The stage clears only when all paper is neutralized and the ranchero is down (+15 bonus).
- Each stage reports time, points, and hit factor; the match summary shows a combined hit factor.
You regenerate health a few seconds after the last time you were hit. If your
health reaches zero on Stage 2, you go down and can re-shoot the stage with R.
Assets/
Scenes/Match.unity Bootstrap scene — just the GameManager object
Scripts/
GameManager.cs Match director, state machine, scoring, HUD (IMGUI)
StageBuilder.cs Procedurally builds each stage's geometry & targets
PlayerController.cs FPS movement + mouse look (CharacterController)
WeaponController.cs Hitscan firing, ammo, reload, recoil
Target.cs Paper/steel targets, zone scoring, neutralization
RancheroAI.cs Stage-2 enemy: strafes, fires bursts, can be killed
Projectile.cs The ranchero's dodgeable rounds
HealthSystem.cs Shared health (player + ranchero) with regen
GameUtil.cs Asset-free primitive/material/tracer helpers
Most feel knobs are public fields you can tweak in code or, after pressing Play, on the live objects in the Hierarchy:
WeaponController:damage,fireRate,magSize,spread,recoilKickRancheroAI:burstSize,fireInterval,aimError,projectileDamage,strafeRangePlayerController:walkSpeed,mouseSensitivity,jumpHeightHealthSystem:maxHealth,regenRate,regenDelay
Running in the Unity Editor (Play mode) is fine. However, a built
.exe of this game will be blocked under WDAC enforcement until it's
whitelisted by Publisher (Unity-built players are typically unsigned, so
you'd sign it first, then approve the signer). That's only relevant if you do
File → Build — for development just use Play mode.