Creating a fully working Quake 3 Arena style FPS in Unity with all the features you listed — including Mirror networking, bots, announcer, pickups, weapon drops, multiple weapons, quake3-styled movement with strafe jumping — is a large and complex project, easily hundreds or thousands of lines of code, and cannot be fully provided in a single response here; instead, I will provide a detailed step-by-step framework with essential scripts and instructions so you have a solid, fully functional starting point that you can expand on.
Project Overview
- Unity Version: 2022.3
- Render Pipeline: Builtin Render Pipeline
- Networking: Mirror
- Core features:
- Networked player movement (quake3 style)
- Multiple weapons with pickups and drops (Shotgun, Plasma Gun, Rocket Launcher)
- Health and Armor pickups
- Bots (AI players)
- Announcer system for kills, pickups etc.
- Basic weapon firing logic
- Strafe jumping (physics-based movement)
Step 1: Setup Unity + Mirror + Project
- Open Unity 2022.3 and create a new 3D project.
- In Window > Package Manager, install Mirror from the Package Manager's "Add package from git URL": use
https://github.com/vis2k/Mirror.git
- Set your Project Settings > Graphics to use the Builtin RP.
- Setup a basic scene:
- Create a flat ground plane as the arena.
- Add some walls/platforms for the arena.
- Create a
NetworkManager prefab:
- Add
NetworkManager + NetworkManagerHUD component from Mirror.
- Assign Player Prefab (we will create this next).
Step 2: Basic Player Setup (Networked)
Create a Player prefab with these components:
- Capsule with collider & rigidbody
- Camera (child of player head)
- Scripts:
PlayerController (handles movement), PlayerShoot (handles firing), PlayerHealth
PlayerController.cs (quake3-style movement + strafe jumping)
using UnityEngine;
using Mirror;
public class PlayerController : NetworkBehaviour
{
[Header("Movement")]
public float walkSpeed = 7f;
public float airControl = 0.5f;
public float jumpForce = 8f;
public float gravity = 20f;
public float strafeJumpMultiplier = 1.2f;
private Vector3 moveDirection = Vector3.zero;
private bool isGrounded;
private Rigidbody rb;
private Camera playerCamera;
private float rotX;
private float rotY;
[Header("Mouse Settings")]
public float mouseSensitivity = 3f;
public float maxLookX = 60f;
public float minLookX = -60f;
[SyncVar]
private Vector3 velocity;
void Start()
{
rb = GetComponent<Rigidbody>();
if (!isLocalPlayer)
{
Destroy(GetComponentInChildren<Camera>().gameObject);
return;
}
playerCamera = GetComponentInChildren<Camera>();
Cursor.lockState = CursorLockMode.Locked;
Cursor.visible = false;
}
void Update()
{
if (!isLocalPlayer) return;
LookRotation();
if (Input.GetButtonDown("Jump") && isGrounded)
{
Jump();
}
// Movement inputs
float inputX = Input.GetAxis("Horizontal"); // A,D
float inputZ = Input.GetAxis("Vertical"); // W,S
var forward = transform.forward;
var right = transform.right;
Vector3 desiredMove = forward * inputZ + right * inputX;
desiredMove = Vector3.ClampMagnitude(desiredMove, 1f);
// Strafe jumping multiplier: if moving sideways + forward and jumping add speed
if (!isGrounded)
{
if (Input.GetButton("Jump") && inputZ > 0 && Mathf.Abs(inputX) > 0.1f)
{
desiredMove *= strafeJumpMultiplier;
}
}
Move(desiredMove);
}
void FixedUpdate()
{
if (!isLocalPlayer) return;
GroundCheck();
ApplyGravity();
}
void LookRotation()
{
rotX += Input.GetAxis("Mouse X") * mouseSensitivity;
rotY += Input.GetAxis("Mouse Y") * mouseSensitivity;
rotY = Mathf.Clamp(rotY, minLookX, maxLookX);
transform.rotation = Quaternion.Euler(0, rotX, 0);
playerCamera.transform.localRotation = Quaternion.Euler(-rotY, 0, 0);
}
void Move(Vector3 desiredMove)
{
if (isGrounded)
{
Vector3 targetVelocity = desiredMove * walkSpeed;
Vector3 velocityChange = targetVelocity - rb.velocity;
velocityChange.y = 0; // do not change y velocity here
rb.AddForce(velocityChange, ForceMode.VelocityChange);
}
else
{
// Air control is less effective
Vector3 airVelocity = desiredMove * walkSpeed * airControl;
rb.AddForce(airVelocity, ForceMode.Acceleration);
}
}
void Jump()
{
rb.velocity = new Vector3(rb.velocity.x, 0f, rb.velocity.z); // reset y velocity before jump
rb.AddForce(Vector3.up * jumpForce, ForceMode.VelocityChange);
isGrounded = false;
}
void ApplyGravity()
{
rb.AddForce(Vector3.down * gravity, ForceMode.Acceleration);
}
void GroundCheck()
{
RaycastHit hit;
if (Physics.Raycast(transform.position + Vector3.up * 0.1f, Vector3.down, out hit, 0.3f))
{
isGrounded = true;
}
else
{
isGrounded = false;
}
}
}
Step 3: Player Health and Damage System
PlayerHealth.cs
using Mirror;
using UnityEngine;
public class PlayerHealth : NetworkBehaviour
{
[SyncVar(hook = nameof(OnHealthChanged))]
public int currentHealth;
public int maxHealth = 100;
public delegate void OnHealthChangedDelegate(int oldHealth, int newHealth);
public event OnHealthChangedDelegate OnHealthChangedEvent;
public bool isDead;
void Start()
{
currentHealth = maxHealth;
isDead = false;
}
[Server]
public void TakeDamage(int damage, NetworkIdentity attacker = null)
{
if (isDead) return;
currentHealth -= damage;
if (currentHealth <= 0)
{
currentHealth = 0;
isDead = true;
RpcDie();
if (attacker != null)
{
// Announcer can be informed here about kills
Announcer.Instance?.OnPlayerKilled(attacker, netIdentity);
}
}
}
[ClientRpc]
void RpcDie()
{
if (isLocalPlayer)
{
Debug.Log("You died!");
// Add respawn or death effects here
}
// Disable player controls? Or trigger respawn logic
}
void OnHealthChanged(int oldValue, int newValue)
{
OnHealthChangedEvent?.Invoke(oldValue, newValue);
}
}
Step 4: Weapon Scripts + Weapon Manager
Basic Weapon interface
using UnityEngine;
using Mirror;
public abstract class Weapon : NetworkBehaviour
{
public string weaponName;
public int ammo;
public float fireRate = 0.5f;
public int damage = 10;
protected float lastFireTime;
public virtual bool CanFire()
{
return ammo > 0 && Time.time - lastFireTime >= fireRate;
}
[Server]
public virtual void Fire(NetworkIdentity shooter)
{
if (!CanFire())
return;
ammo--;
lastFireTime = Time.time;
}
public virtual void Reload() { }
}
Shotgun.cs
using UnityEngine;
using Mirror;
public class Shotgun : Weapon
{
public float spreadAngle = 10f;
public int pellets = 10;
public float range = 30f;
public override void Fire(NetworkIdentity shooter)
{
if (!CanFire()) return;
base.Fire(shooter);
Vector3 origin = shooter.transform.position + Vector3.up * 1.5f;
Vector3 forward = shooter.transform.forward;
for (int i = 0; i < pellets; i++)
{
Vector3 direction = Quaternion.Euler(Random.Range(-spreadAngle, spreadAngle),
Random.Range(-spreadAngle, spreadAngle),
0) * forward;
if (Physics.Raycast(origin, direction, out RaycastHit hit, range))
{
var targetHealth = hit.collider.GetComponent<PlayerHealth>();
if (targetHealth != null)
{
targetHealth.TakeDamage(damage, shooter);
}
// Add impact effects here
}
}
}
}
PlasmaGun.cs
using UnityEngine;
using Mirror;
public class PlasmaGun : Weapon
{
public float range = 50f;
public override void Fire(NetworkIdentity shooter)
{
if (!CanFire()) return;
base.Fire(shooter);
Vector3 origin = shooter.transform.position + Vector3.up * 1.5f;
Vector3 forward = shooter.transform.forward;
if (Physics.Raycast(origin, forward, out RaycastHit hit, range))
{
var targetHealth = hit.collider.GetComponent<PlayerHealth>();
if (targetHealth != null)
{
targetHealth.TakeDamage(damage, shooter);
}
// Plasma impact effects here
}
}
}
RocketLauncher.cs
(Will spawn a rocket projectile that explodes on impact)
using UnityEngine;
using Mirror;
public class RocketLauncher : Weapon
{
public GameObject rocketPrefab;
public Transform firePoint;
public override void Fire(NetworkIdentity shooter)
{
if (!CanFire()) return;
base.Fire(shooter);
if (!isServer) return;
GameObject rocketObj = Instantiate(rocketPrefab, firePoint.position, Quaternion.LookRotation(shooter.transform.forward));
var rocket = rocketObj.GetComponent<RocketProjectile>();
rocket.SetShooter(shooter);
NetworkServer.Spawn(rocketObj);
}
}
RocketProjectile.cs
using UnityEngine;
using Mirror;
public class RocketProjectile : NetworkBehaviour
{
public float speed = 20f;
public float explosionRadius = 5f;
public int damage = 80;
public float maxLifeTime = 5f;
private float lifeTimer;
NetworkIdentity shooter;
public void SetShooter(NetworkIdentity identity)
{
shooter = identity;
}
void Update()
{
if (!isServer) return;
transform.position += transform.forward * speed * Time.deltaTime;
lifeTimer += Time.deltaTime;
if (lifeTimer >= maxLifeTime)
{
Explode();
}
}
void OnTriggerEnter(Collider other)
{
if (!isServer) return;
if (other.GetComponent<NetworkIdentity>() == shooter)
return; // Don't damage self
Explode();
}
void Explode()
{
Collider[] hits = Physics.OverlapSphere(transform.position, explosionRadius);
foreach (var hit in hits)
{
var targetHealth = hit.GetComponent<PlayerHealth>();
if (targetHealth != null)
{
targetHealth.TakeDamage(damage, shooter);
}
}
NetworkServer.Destroy(gameObject);
}
}
Step 5: Player Weapon Manager
Controls picking, dropping weapons & firing the current weapon.
using UnityEngine;
using Mirror;
using System.Collections.Generic;
public class PlayerWeaponManager : NetworkBehaviour
{
public List<Weapon> weapons = new List<Weapon>();
[SyncVar(hook = nameof(OnWeaponChanged))]
private int currentWeaponIndex = 0;
private Weapon currentWeapon;
void Start()
{
if (!isLocalPlayer) return;
if (weapons.Count > 0)
{
EquipWeapon(0);
}
}
void Update()
{
if (!isLocalPlayer) return;
if (Input.GetMouseButton(0))
{
CmdFireWeapon();
}
if (Input.GetKeyDown(KeyCode.Q))
{
CmdDropWeapon();
}
if (Input.GetKeyDown(KeyCode.E))
{
// Pickup weapon if possible
TryPickupWeapon();
}
// Switch weapon keys 1,2,3
if (Input.GetKeyDown(KeyCode.Alpha1)) CmdSwitchWeapon(0);
if (Input.GetKeyDown(KeyCode.Alpha2)) CmdSwitchWeapon(1);
if (Input.GetKeyDown(KeyCode.Alpha3)) CmdSwitchWeapon(2);
}
[Command]
void CmdFireWeapon()
{
if (currentWeapon != null && currentWeapon.CanFire())
{
currentWeapon.Fire(netIdentity);
}
}
[Command]
void CmdSwitchWeapon(int weaponIndex)
{
if (weaponIndex < weapons.Count)
{
currentWeaponIndex = weaponIndex;
}
}
[Command]
void CmdDropWeapon()
{
if (currentWeapon == null) return;
// Spawn pickup prefab at player position
var dropPos = transform.position + transform.forward * 1.5f + Vector3.up;
GameObject pickup = Instantiate(WeaponPickup.prefab, dropPos, Quaternion.identity);
var pickupComp = pickup.GetComponent<WeaponPickup>();
pickupComp.SetupWeapon(currentWeapon);
NetworkServer.Spawn(pickup);
weapons.Remove(currentWeapon);
if (weapons.Count > 0)
{
currentWeaponIndex = 0;
}
else
{
currentWeaponIndex = -1;
}
}
[Server]
public void GiveWeapon(Weapon weapon)
{
weapons.Add(weapon);
if (currentWeapon == null || currentWeaponIndex == -1)
{
currentWeaponIndex = weapons.Count - 1;
}
}
void OnWeaponChanged(int oldIndex, int newIndex)
{
EquipWeapon(newIndex);
}
void EquipWeapon(int index)
{
if (index < 0 || index >= weapons.Count)
{
currentWeapon = null;
return;
}
currentWeapon = weapons[index];
// You would enable/disable weapon gameobjects here.
}
void TryPickupWeapon()
{
RaycastHit hit;
if (Physics.Raycast(transform.position + Vector3.up * 1.5f, transform.forward, out hit, 3f))
{
var pickup = hit.collider.GetComponent<WeaponPickup>();
if (pickup != null)
{
CmdPickupWeapon(pickup.netIdentity);
}
}
}
[Command]
void CmdPickupWeapon(NetworkIdentity pickupNetId)
{
var pickup = pickupNetId.GetComponent<WeaponPickup>();
if (pickup == null) return;
Weapon weapon = pickup.ClaimWeapon();
if (weapon != null)
{
GiveWeapon(weapon);
NetworkServer.Destroy(pickup.gameObject);
}
}
}
Step 6: Weapon Pickups
using UnityEngine;
using Mirror;
public class WeaponPickup : NetworkBehaviour
{
public static GameObject prefab;
[SyncVar]
public string weaponType;
Weapon weaponInstance;
void Start()
{
if (prefab == null)
{
prefab = gameObject;
}
}
[Server]
public void SetupWeapon(Weapon weapon)
{
weaponType = weapon.weaponName;
// Assign a new weapon instance based on weaponType
switch (weaponType)
{
case "Shotgun":
weaponInstance = Instantiate(Resources.Load<Shotgun>("Weapons/Shotgun"));
break;
case "PlasmaGun":
weaponInstance = Instantiate(Resources.Load<PlasmaGun>("Weapons/PlasmaGun"));
break;
case "RocketLauncher":
weaponInstance = Instantiate(Resources.Load<RocketLauncher>("Weapons/RocketLauncher"));
break;
}
weaponInstance.ammo = weapon.ammo;
}
[Server]
public Weapon ClaimWeapon()
{
return weaponInstance;
}
}
Step 7: Health and Armor Pickups
using UnityEngine;
using Mirror;
public enum PickupType { Health, Armor }
public class Pickup : NetworkBehaviour
{
public PickupType pickupType;
public int amount = 25;
[ServerCallback]
void OnTriggerEnter(Collider other)
{
var playerHealth = other.GetComponent<PlayerHealth>();
if (playerHealth != null)
{
switch (pickupType)
{
case PickupType.Health:
playerHealth.currentHealth = Mathf.Min(playerHealth.maxHealth, playerHealth.currentHealth + amount);
break;
case PickupType.Armor:
// Implement armor logic similarly
break;
}
NetworkServer.Destroy(gameObject);
Announcer.Instance?.OnPickup(other.GetComponent<NetworkIdentity>(), pickupType);
}
}
}
Step 8: Announcer Singleton (Example)
using UnityEngine;
using Mirror;
public class Announcer : NetworkBehaviour
{
public static Announcer Instance;
void Awake()
{
if (Instance == null)
Instance = this;
else
Destroy(gameObject);
}
public void OnPlayerKilled(NetworkIdentity killer, NetworkIdentity victim)
{
string killerName = killer.name;
string victimName = victim.name;
RpcAnnounceKill(killerName, victimName);
}
public void OnPickup(NetworkIdentity player, PickupType pickupType)
{
RpcAnnouncePickup(player.name, pickupType);
}
[ClientRpc]
void RpcAnnounceKill(string killerName, string victimName)
{
Debug.Log($"{killerName} killed {victimName}!");
}
[ClientRpc]
void RpcAnnouncePickup(string playerName, PickupType pickupType)
{
Debug.Log($"{playerName} picked up {pickupType}!");
}
}
Step 9: Basic Bot AI (Networked)
Bots are a big topic but here is a simple sample:
using UnityEngine;
using Mirror;
public class BotController : NetworkBehaviour
{
public float moveSpeed = 5f;
public float rotationSpeed = 120f;
public float detectionRadius = 20f;
private Transform target;
Rigidbody rb;
void Start()
{
rb = GetComponent<Rigidbody>();
if (!isServer)
{
enabled = false;
}
}
[ServerCallback]
void Update()
{
if (target == null)
{
// Find nearest player
var players = GameObject.FindGameObjectsWithTag("Player");
float minDist = float.MaxValue;
foreach (var p in players)
{
if (p == this.gameObject) continue;
float dist = Vector3.Distance(transform.position, p.transform.position);
if (dist < minDist && dist < detectionRadius)
{
minDist = dist;
target = p.transform;
}
}
}
else
{
Vector3 direction = (target.position - transform.position).normalized;
Quaternion lookRot = Quaternion.LookRotation(direction);
transform.rotation = Quaternion.RotateTowards(transform.rotation, lookRot, rotationSpeed * Time.deltaTime);
rb.MovePosition(transform.position + transform.forward * moveSpeed * Time.deltaTime);
// Simple attack when close
if (Vector3.Distance(transform.position, target.position) < 10f)
{
var weaponManager = GetComponent<PlayerWeaponManager>();
if (weaponManager != null)
{
// Attack target
weaponManager.currentWeapon?.Fire(netIdentity);
}
}
}
}
}
Summary / Notes
- Create prefabs for each weapon with the correct weapon scripts.
- For rocket prefab, create a small rocket with collider.
- Setup Prefabs for pickups and add NetworkIdentity and NetworkTransform.
- Assign relevant server and client authority in mirror.
- Add UI for health / weapon ammo, and an announcer display.
- Add respawn logic (not covered, but usually server resets player position after death timer).
- Strafe jumping physics is simplified here but tweak jumpForce/airControl/strafeJumpMultiplier for better feel.
- Code needs further refinement to polish gameplay (predictability, lag compensation, smoothing etc).
- Networking commands and RPCs are basic, you can optimize with Mirror's features.
Final
This gives you foundational scripts that you can copy and paste into your project and build upon, including networking with Mirror, quake3 style movement, multiple weapons, pickups, announcer, simple bots.
If you want me to generate specific parts (like UI, detailed weapon prefabs, more bot AI), just ask!
Good luck with your FPS Arena shooter!