Skip to the game
PK® / Cosmic Defender

Experimental product / browser-native play

MISSION 001 · LOCAL CANVAS ENGINE · SINGLE PILOT

Cosmic
Defender.

A precision space-defense mission where every sector gets harder, every clean hit charges a five-tier arsenal, and a new cosmic animal may be waiting beyond every third sector.

Runtime
Browser-local
Input
Keyboard + touch
Audio
Adaptive + opt-in
Assets
Zero external
DEFENSE GRID / LIVE PREVIEW
Seeded encounters60 Hz modelHuman pilot

01 / Interactive mission

Pilot the defense grid.

Everything is drawn, simulated, and synthesized locally in your browser—including the adaptive soundtrack. Clear threats, collect power cores, and evolve the ship through five weapon tiers.

COSMIC DEFENDER / LOCAL SIMULATION
Full effectsAudio offSeed C05C1C

Use W A S D or the arrow keys to move, Space to fire, U to upgrade when enough power cores are available, P or Escape to pause, and R to restart. Touch and keyboard buttons are also available after the playfield.

Current state: ready. Score 0. Sector 1, Lunar Gate, difficulty multiplier 1. 3 lives remaining. Weapon mark 1, Ion Needle, with 0 power cores. Clearance 0 of 8.

Cosmic Defender requires a browser with HTML canvas support. Score, controls, and instructions remain available around the playfield.
MISSION 001

Defense grid online

Navigate the ion craft, clear asteroid fields, intercept surprise alien waves, and discover which animal guards every third sector.

Music and sound are off by default. Enable them separately below.
Active weaponMK1 · Ion Needle1× impact · 1 beam · 5.4 cycles/sec
Power cores0 / 6
Sector pressure×1.00Enemy speed, armor, fire rate, and density rise every level.
Touch movement
Keyboard

WASD / arrows move Space fire U upgrade P / Esc pause R restart

Lunar Gate · Calibration threat · Best 0 · 5 asteroids tracked

Defense grid ready. Launch the mission when you are ready.

Global flight records

Community high scores.

Loading community flight records…

2–18 letters or numbers, or leave blank. Your best verified run is submitted only at game over.
Scanning the global defense grid…

Awaiting first verified flight · Display handles are public and are not verified identities.

Five-tier arsenal

Every clean hit moves the ship toward a stronger weapon.

Asteroids, alien craft, and bosses drop power cores. Spend them on faster cycles, higher impact, twin beams, and the final Prism Cannon.

Rising pressure

Every sector asks for sharper reactions.

Enemy speed, armor, projectile velocity, fire cadence, field density, clearance goals, and boss durability scale upward level by level.

Adaptive audio

The soundtrack responds without taking over.

Layered laser and impact effects sit above a low-volume procedural score that shifts with the sector and gains energy during boss encounters.

02 / Encounter design

Unpredictable to play.
Inspectable by design.

The mission mixes escalating pressure with deterministic rules. Randomness creates surprise, while a seed makes every encounter sequence reproducible for debugging and evaluation.

01

Asteroid fields

Rock size controls durability and score value. Speed, armor, density, and spawn cadence rise by sector, while a strict entity cap keeps the simulation responsive.

02

Surprise waves

Alien arrival windows are randomized from the mission seed. Formations track, fire, and leave a reproducible trail for testing.

03

Power progression

Threats drop power cores for five deliberate weapon upgrades—from the precise Ion Needle to the triple-beam Prism Cannon—while endless sectors keep raising the pressure.

03 / Engineering

A small game with production-shaped boundaries.

Rendering, simulation, controls, sound, and accessibility are separate responsibilities. That separation keeps the experience testable and prevents the experiment from affecting any other portfolio product.

  1. 01

    Deterministic simulation

    One seeded state machine owns movement, spawning, collisions, difficulty, weapon upgrades, boss selection, scoring, and lives. The same inputs produce the same result.

  2. 02

    Canvas rendering

    Every ship, asteroid, alien, animal silhouette, star, glow, and interface effect is drawn at runtime without downloaded imagery or a rendering library.

  3. 03

    Input adapter

    Focused keyboard controls and always-visible touch controls feed the same normalized action state, so neither mode receives a gameplay advantage.

  4. 04

    Adaptive audio

    Audio starts disabled. When enabled, layered weapon effects and a low-volume procedural score react to sector pressure and boss encounters without loading a media file.

18+named sectors

Distinct regions, threat tiers, evolving atmospheres, and endless cycles beyond the campaign.

5weapon tiers

Visible power costs unlock new firing patterns, greater impact, and faster cycle times.

10global records

The public board shows one best verified run per anonymous browser installation; the game remains playable when scores are offline.

1simulation truth

Keyboard, touch, score, lives, levels, and bosses share one model.

Designed and engineered by Prasiddha Karki

One craft.
An infinite sky.

Play again Privacy & local play Return to portfolio