Shooter
Server-authoritative shooter combat networking for Game Creator 2.
Overview
This module provides network-aware shooter combat for GC2, enabling server-authoritative shot and hit validation with lag compensation. It integrates seamlessly with the base GC2 Network Integration and supports raycast, projectile, and all GC2 shot types.
Requirements
Game Creator 2 Core
Game Creator 2 Shooter Module
GC2 Network Integration (base module)
A configured transport adapter (NGO/FishNet/Mirror/custom)
Installation
Import the GC2 Network Integration base module
Import this GC2 Shooter Network module
The module will auto-detect GC2 Shooter via the
GC2_SHOOTERdefine symbol
Architecture
Network Flow
Two-Phase Validation
Unlike melee, shooter combat uses two-phase validation:
Shot Validation: When trigger is pulled
Validates: ammo, weapon state, cooldown, position
Results in: muzzle flash, tracer, sound
Hit Validation: When shot hits something
Validates: hit position, target state, obstruction
Results in: damage, impact effects, reactions
This allows for accurate projectile-based weapons where the hit happens after the shot.
Components
NetworkShooterManager
Global singleton that coordinates all shooter networking.
Setup:
NetworkShooterController
Per-character component that handles shot and hit interception.
Properties:
Optimistic Shot Effects: Show tracer/muzzle flash before server confirmationOptimistic Hit Effects: Show impact effects before server confirmationWeapon State Sync Interval: How often to sync ammo/reload/jam stateAim State Sync Interval: How often to sync aim direction
ConditionNetworkShooterHit (Visual Scripting)
A GC2 Condition that intercepts hits in the ShooterWeapon's "Can Hit" conditions.
Usage:
Open your ShooterWeapon asset
Find the "Can Hit" conditions section
Add the "Network Shooter Hit" condition
Setup Guide
Step 1: Scene Setup
Add
NetworkShooterManagerto your scene
Configure the network delegates
Step 2: Character Setup
For each networked character with shooter weapons:
Add
NetworkCharactercomponentSet Combat Mode = Disabled
Add
NetworkShooterControllercomponentConfigure optimistic effects preferences

Step 3: Weapon Setup
For each ShooterWeapon that should use network hit validation:
Open the ShooterWeapon ScriptableObject
In "Can Hit" conditions, add Network Shooter Hit condition
Step 4: Network Transport
Connect the manager to your transport adapter. Optional NGO example: This sample follows NGO 2.10 unified RPC API ([Rpc], RpcParams, RpcTarget).
Data Types
NetworkShotRequest (~40 bytes)
Sent from client to server when a shot is fired.
RequestId
ushort
Unique ID for response matching
ClientTimestamp
float
When shot was fired
ShooterNetworkId
uint
Shooter's network ID
MuzzlePosition
Vector3
Muzzle position at fire time
ShotDirection
Vector3
Direction with spread applied
WeaponHash
int
Hash of weapon used
SightHash
int
Hash of sight used
ChargeRatio
float
For charged weapons (0-1)
ProjectileIndex
byte
Index for multi-projectile
TotalProjectiles
byte
Total projectiles in shot
NetworkShooterHitRequest (~36 bytes)
Sent when a shot hits something.
RequestId
ushort
Unique ID
ClientTimestamp
float
When hit detected
ShooterNetworkId
uint
Who fired
TargetNetworkId
uint
Who was hit (0 for environment)
HitPoint
Vector3
World position of hit
HitNormal
Vector3
Surface normal
Distance
float
Distance from muzzle
WeaponHash
int
Weapon used
PierceIndex
byte
Pierce order (0 = first)
IsCharacterHit
bool
Hit a character vs environment
NetworkShotBroadcast (~32 bytes)
Broadcast when shot is confirmed.
ShooterNetworkId
uint
Who fired
MuzzlePosition
Vector3
Muzzle position
ShotDirection
Vector3
Shot direction
WeaponHash
int
For effects lookup
SightHash
int
For effects lookup
HitPoint
Vector3
Final hit point (for tracer)
DidHit
bool
Whether it hit something
NetworkShooterHitBroadcast (~28 bytes)
Broadcast when hit is confirmed.
ShooterNetworkId
uint
Who fired
TargetNetworkId
uint
Who was hit
HitPoint
Vector3
Hit position
HitNormal
Vector3
Hit normal
WeaponHash
int
For effects
BlockResult
byte
Block/parry result
MaterialHash
int
For impact sound
NetworkWeaponState (~12 bytes)
Synced periodically for weapon status.
WeaponHash
int
Equipped weapon
SightHash
int
Current sight
AmmoInMagazine
ushort
Current ammo
StateFlags
byte
Bitflags for state
State Flags:
0x01: Is Reloading0x02: Is Jammed0x04: Is Aiming0x08: Is Shooting0x10: Is Charging
Rejection Reasons
Shot Rejection
ShooterNotFound
Shooter doesn't exist on server
WeaponNotEquipped
Weapon not equipped
NoAmmo
Out of ammunition
WeaponJammed
Weapon is jammed
CooldownActive
Fire rate limit
InvalidPosition
Suspicious muzzle position
InvalidDirection
Suspicious shot direction
TimestampTooOld
Request too far in past
RateLimitExceeded
Firing too fast
CheatSuspected
Anti-cheat triggered
Hit Rejection
ShotNotValidated
Associated shot was rejected
TargetNotFound
Target doesn't exist
OutOfRange
Hit too far from shot
ObstructionDetected
Something blocking shot
TargetInvincible
Target has invincibility
TargetDodged
Target was dodging
AlreadyHit
Duplicate hit detection
TimestampTooOld
Too far in past
CheatSuspected
Anti-cheat triggered
Weapon State Synchronization
The controller automatically syncs weapon state (ammo, reload, jam) at configurable intervals:
Subscribe to state changes:
Advanced: Custom Shot Types
If you create custom TShot implementations, integrate network awareness:
Troubleshooting
Shots not registering on server
Check
NetworkShooterManageris in sceneVerify network delegates are connected
Check ammo sync - server may think you have no ammo
Tracer not showing on remote clients
Verify
BroadcastShotToAllClientsis connectedCheck remote clients are receiving broadcasts
Ensure weapon effects are configured
Hit effects delayed
Check optimistic effects setting
Verify network latency
Consider enabling optimistic for better feel
Ammo desynced between client/server
Check
WeaponStateSyncIntervalsettingEnsure server is authoritative for ammo
Use
OnWeaponStateChangedevent to sync
Transport Agnostic Design
Like the Melee module, this is completely transport-agnostic:
Netcode for GameObjects
[Rpc(SendTo.*)] + RpcTarget.Single(...)
FishNet
[ServerRpc], [ObserversRpc]
Mirror
[Command], [ClientRpc]
Photon Fusion
[Rpc] attributes
You implement the bridge layer; we handle the combat logic.
Last updated