Ele Defense: An Elemental Tower Defense on a Deep Reef
- Lab Skill
- v0.1.0
- Game creation
Hold a glowing fixed tideway across a deep reef, in one small offline HTML file: four elemental pylons on a counter ring (earth→wind→water→fire, +50%), water slows, twenty hand-authored waves with a behemoth every fifth, and early wave calls that pay decaying bonus shards. Pure Canvas 2D, no engine. English and Chinese UI.
例
Ele Defense elemental tower defense
この例はサンドボックス化されたフレームで実行され、このページにはアクセスできません。
オンラインで実行
SandBase sandbox で実行し、結果を Lab で確認できます。
Lab で開く ↗得られるもの
Bring the reef and the elements, and optionally the counter table, the wave composition, the tower stats, the early-call bonus and the UI text. The Skill returns a downloadable Skill (the tower-defense project, a customize guide, headless verification) and one playable example run.
仕組み
- 01
Generate the defense project
Ele Defense begins with node scripts/new-project.mjs --out my-line and npm ci. The agent then edits src/config.js: the TOWERS three-level stat tables for cost, damage, range and rate, the WAVES schedule written as element, count and boss flag, the WAYPOINTS road route and CFG for lives, economy, slow and speed. Rendering lives in src/world/draw.js and the overlay in src/ui/hud.js.
- 02
Play the counter wheel
Spirit waves ride one fixed tide-road through a reef field, and four pylons sit on plates beside it: earth, water, air and fire. Earth grounds air, water quenches fire, air dries water and fire scorches earth, so a countered hit lands +50% damage. Water pylons chill instead. Twenty scripted tides arrive, a titan comes every fifth, and SEND NOW calls the next tide early for decaying bonus shards.
- 03
Build one offline file
npm run build:single makes a single HTML file under 32 MiB that runs from file: or a static host with no network calls, using plain Canvas 2D. Node 22 builds it. npm run shoot -- --file dist-single/index.html drives a headless browser through placements, upgrades, sales, an early send, a leak, the wave-5 titan, a win, a loss and a restart on desktop and phone, screenshotting each step.
FAQ
How is Ele Defense different from a maze tower defense?
Ele Defense keeps the road fixed. Pylons fit only on reef plates off the road, and enemies never reroute, so walling a path is impossible. The strategy is reading the compass, which previews the next wave's element mix, and placing counters ahead of time, such as water behind the line before a fire wave or earth before an air wave.
What makes a titan in Ele Defense?
Ele Defense marks the lead entry of every fifth wave with isBoss. That titan has 20 times the hit points, 3 times the shard value and half the speed, carries a bigger twin-ring sigil, and costs 3 lives if it leaks. The player starts with thirteen lives, so a leaked titan is a heavy loss.
Does Ele Defense need WebGL or a key?
No. Ele Defense draws everything with plain Canvas 2D and needs no key, external model or network call, so a game session is not billed.
Can I add new elements to Ele Defense?
Yes. Ele Defense keeps elements, the counter table, tower stats and the wave table as config blocks. The counter check in Enemy.hurt compares the attacker's counters field with the target element and scales damage by CFG.counterBonus, which is 1.5. Water shots deal low damage but stack ticks of half speed from CFG.slowBase and slowPerLvl.
Does Ele Defense run on phones?
Yes. Ele Defense makes every action a tap on touch screens and keeps all targets at least 44 px. Pick a pylon card in the dock, tap a reef plate, then tap a pylon to attune it up to 3 levels or recall it for 75% of what was spent. Phone play is verified under emulation, not on real devices.
その他の Skills
すべての Game creation Skills →
Seagull Swoop
Build a 3D flight-and-delivery game with light fries, heavy fish, crosswinds and optional ring routes. The gull must bring lunch home; cargo weight changes which openings it can safely reach.

Wedding Cake Wobble
Build a 3D fragile-cargo delivery game around a wobbling wedding cake. Brake before turns, avoid crossing guests and steer around tables. Lost tiers change the score, while a partial delivery can still succeed.

Hermit Tide
Build a 3D route-and-timing game where a hermit crab changes shells to cross a tidal shore. Narrow gaps favour the cap, stronger shells resist waves, and dry stones provide shelter and checkpoints.

Clover Circuit: Estate Cut
Drive a coral ride-on mower through a fenced estate garden. Steering, braking and the moving blade cut actual grass tufts; Overview reveals the genuine trail. Edit three gardens and three scene palettes offline. Coverage counts trimmed tuft centers rather than continuous ground area.

Glide Gates: Lagoon Run
Flap a golden bird through emerald pipe pairs above a turquoise lagoon. Actual fixed-step gravity, swept circle contacts and full-gate scoring power both manual flight and clearly labeled practice. Edit three courses and three scene palettes offline.

3D Interactive Garden Islands
Walk a curved garden, harvest fruit, share gifts, catch butterflies, fish, grow flowers and craft furniture. Four lighting states and one offline HTML with bilingual keyboard and touch controls.

