Skip to main content

Overview

Hyperscape uses RuneScape-style tick-based combat with authentic mechanics including attack styles, accuracy formulas, and damage calculations.

Tick System

Combat operates on a 600ms tick cycle, matching Old School RuneScape:

Combat Stats

Combat Level

Aggregate level calculated from combat stats:

Attack Styles

Players choose how XP is distributed:

Damage Calculation

The combat system uses OSRS-style formulas with equipment bonuses:

OSRS Constants

Ranged Combat

Ranged combat is now fully implemented with OSRS-accurate mechanics for bows and arrows.

Requirements

  • Bow equipped in weapon slot
  • Arrows equipped in ammo slot
  • Arrows consumed on each attack (100% consumption, no Ava’s device yet)

Combat Styles

Damage Formula

Projectile System

Ranged attacks use a projectile system with OSRS-accurate hit delays:
Projectiles are rendered as 3D arrow meshes that travel from attacker to target.
Without arrows, the bow cannot attack. Arrows are consumed on every shot (100% loss rate).

Magic Combat

Magic combat allows spellcasting with or without a staff equipped.

Requirements

  • Magic level sufficient for the spell
  • Runes in inventory (or infinite runes from elemental staff)
  • Spell selected for autocast (optional)

Combat Styles

Spells (F2P)

Strike Tier (Levels 1-13):
  • Wind Strike (L1): 2 max hit
  • Water Strike (L5): 4 max hit
  • Earth Strike (L9): 6 max hit
  • Fire Strike (L13): 8 max hit
Bolt Tier (Levels 17-35):
  • Wind Bolt (L17): 9 max hit
  • Water Bolt (L23): 10 max hit
  • Earth Bolt (L29): 11 max hit
  • Fire Bolt (L35): 12 max hit

Damage Formula

Magic Defense

Magic defense uses a unique formula combining Magic and Defense levels:

Rune Consumption

Runes are consumed on each cast. Elemental staves provide infinite runes:
  • Staff of Air: Infinite air runes
  • Staff of Water: Infinite water runes
  • Staff of Earth: Infinite earth runes
  • Staff of Fire: Infinite fire runes

Autocast

Players can select a spell for autocast, which automatically casts that spell when attacking:

Projectile Visuals

Magic spells render as colored orbs with element-specific colors:
  • Wind: Light gray/white
  • Water: Blue
  • Earth: Brown
  • Fire: Orange-red
Projectiles use OSRS-accurate hit delay formula:

Death Mechanics

When health reaches zero:
  1. Items drop at death location (headstone)
  2. Player respawns at nearest starter town
  3. Headstone persists for item retrieval
  4. Other players cannot loot your headstone

Mob Combat

Mobs can use melee, ranged, or magic attacks configured via NPC manifest:

Attack Types

Mob Projectile Attacks

Ranged and magic mobs emit projectiles with OSRS-accurate hit delays:
Mob Damage Calculation:
  • Mobs have zero equipment bonuses (no attack/strength/defense from gear)
  • Mobs have infinite resources (no rune/arrow consumption)
  • Uses mob’s magic or ranged stat from NPC manifest
  • Players can still use prayer bonuses to defend
Visual Weapons:
  • heldWeaponModel field attaches bow/staff GLB to mob’s hand bone
  • Weapons cached and shared across mob instances (GPU efficient)
  • Supports Asset Forge V1 and V2 attachment metadata

Mob Aggression

Aggro Range

Each mob has a detectionRange. Entering this range triggers combat for aggressive mobs.

Chase Behavior

Mobs return to spawn point if player escapes their leashRange.

Loot System

On mob death: Drop tables are defined in packages/shared/src/data/npcs.ts.