Hidden release · justback.world/aw

Astra Wars

A native Android multiplayer lane-skirmish: shatter the enemy crystal, command units with real-time micro, and escalate with tiered God Powers — backed by an authoritative shared simulation.

Direct APK: https://justback.world/downloads/astra-wars.apk
v0.5.5 — Auto-reconnect multiplayer · office Wi‑Fi fallback (port 8080) · waiting lobby · OkHttp client. Online matchmaking on justback.world.

Ideology

Astra Wars is built around one belief: fair multiplayer needs a shared truth. The phone is a window into the battle; the server (or offline local sim) owns the match clock, combat resolution, and win condition. That keeps cheats out of the critical path and lets bots, humans, and headless QA all speak the same language.

Authoritative sim

One `MatchSimulator` tick drives both live rooms and bot-vs-bot research runs.

Readable tactics

Three lanes, three unit roles, three God Power tiers — depth without opaque systems.

Player agency

Optional Manual control: units wait for your orders — great while learning.

AI as co-design

Unit micro, bot macro, and headless matches are first-class — not afterthoughts.

Design north star: a skirmish you can feel in ten seconds, and still argue about after a hundred matches.

Core loop

Both sides grow energy, summon specialists, contest mid with neutrals and waves, and aim to destroy the opposing nexus crystal. Kills credit Blue/Red; God Powers create tempo spikes when aimed well.

flowchart LR
  A[Energy regen] --> B[Summon units]
  B --> C[Lane pressure]
  C --> D[Micro: move / attack]
  D --> E[God Power windows]
  E --> F{Enemy nexus HP?}
  F -->|HP greater than 0| C
  F -->|HP is 0| G[Victory]
  C --> H[Neutral camps]
  H --> D
        

Architecture

Three modules share one mental model. The Android app never invents combat outcomes; it renders snapshots and sends intents.

flowchart TB
  subgraph Client["androidApp"]
    UI[Compose menus + Settings]
    Canvas[Canvas battlefield]
    Net[WebSocket / LocalMatchClient]
  end
  subgraph Shared["game-core"]
    Map[TileMap + A*]
    Sim[MatchSimulator 10Hz]
    UnitAI[Tier-1 Unit AI]
    BotAI[Tier-2 BotPlayerAi]
    Proto[Intents + Snapshots]
  end
  subgraph Server["server · Ktor"]
    Rooms[Rooms / Quick Match]
    Tick[Authoritative tick loop]
    Redis[Redis kill totals]
  end
  UI --> Net
  Canvas --> Net
  Net -->|PlayerIntent| Tick
  Tick --> Sim
  Sim --> UnitAI
  Tick --> BotAI
  Sim --> Proto
  Proto -->|MatchSnapshot| Net
  Tick --> Redis
  Map --> Sim
        

Protocol idea

  • Client → Server: Select, Move, Attack, Summon, GodPower (with tier + map tile)
  • Server → Client: snapshots at 10 Hz + MatchEnd telemetry
  • Offline: `LocalMatchClient` runs the same simulator on-device vs bot

Three-tier AI

flowchart TB
  T1[Tier 1 · Unit AI
aggro, path refresh, combat micro] T2[Tier 2 · Bot Player AI
lane calls, counter-summon, God Power] T3[Tier 3 · Headless QA
bot-vs-bot matches + telemetry] T1 --> T2 --> T3
  1. Unit AI — each living unit finds targets, refreshes paths, respects stuns and player orders.
  2. Bot Player AI — sits in a player seat: spends energy, presses weak lanes, detonates clusters.
  3. Headless — `--bot-vs-bot` runs full matches for balance and regression without a phone.

Units & energy

Energy starts at 50, caps at 100, and regenerates about +10 per second. Summon buttons show cost (30 / 35 / 45) and fill as you approach affordability.

◆ Gadadari — 30E

Mace warrior with shield. Cheap pressure and trades in choke points.

▲ Dhanurdhari — 35E

Bow archer with quiver. Safe poke that stacks behind the front line.

⬡ Rath — 45E

War chariot. Absorbs focus fire and anchors pushes.

Mid map periodically spawns neutral camps (auto mode only) — purple-ringed targets either team can farm. In Manual control practice, waves and neutrals pause so the board stays readable.

God Power tiers

Enter Aim mode, then tap any map tile (or unit). Powers hit enemies and the enemy nexus inside a Chebyshev radius, apply stun, and start a cooldown.

Tier Damage Radius Stun Cooldown Energy
I Spark 28 2 short fast 0
II Blast 55 3 medium medium 15
III Nova 95 5 long slow 35

Battlefield

Fully open arena (~23×15) with border walls only — units roam freely (no mid pillars). Blue nexus west / Red nexus east, and three lane bands. Walls are fortification, not a maze — pathfinding is 8-directional so player orders use open space freely.

BLUE
Nexus + Spawn
Top lane
Mid lane · neutrals
Bot lane
RED
Nexus + Spawn
sequenceDiagram
  participant P as Player
  participant C as Client
  participant S as Server sim
  P->>C: Tap unit / tile / Aim GP
  C->>S: PlayerIntent
  S->>S: Tick 10Hz (AI + combat)
  S-->>C: MatchSnapshot
  C-->>P: Canvas + SFX + HUD
        

Play modes

Multiplayer networking

The public APK (v0.5.5) connects automatically — tries ws://justback.world:8080/aw/ws first (office Wi‑Fi friendly), then wss://justback.world/aw/ws, with auto-reconnect if the network drops. Health: /aw/health. Kill stats: /aw/stats. Offline Practice vs Bot still runs entirely on-device.

How to play (controls)

  1. Win: reduce the enemy nexus crystal to 0 HP (500 max).
  2. Watch the Energy bar (0–100). Summon when a button says Ready.
  3. Summon Gadadari (30) / Dhanurdhari (35) / Rath (45).
  4. Tap an allied unit to select; tap a map tile to move; tap an enemy to attack.
  5. Pick God Power tier I–III → Aim → tap anywhere on the map.