Line Defence

Inspiration

We wanted a quick, tactile game that feels at home in a feed: easy to understand, satisfying to play in short sessions, and built for Reddit’s community. The “draw lines to block” idea made the mechanic clear and fun without a long tutorial.

What it does

Line Defence is a Reddit game where you draw lines to protect a core from waves of enemies. Survive until wave 10 to win.

Players tap and drag to create defensive lines that block incoming enemies. Use power-ups—freeze, nuke, heal to turn the tide. The goal is simple: defend the core until wave 10. The game runs inside Reddit as a Devvit app, so people can play it directly from their feed or a subreddit.

How we built it

  • Reddit & Devvit — The game runs as a Devvit app so it can live directly in Reddit (posts, subreddits, install flow).
  • React + TypeScript — The client is a React app with shared types for game state, enemies, lines, and power-ups.
  • Vite — We use Vite to build the webview (splash and game) and the server bundle.
  • Tailwind CSS — UI and game styling (splash, HUD, buttons) are done with Tailwind.
  • Express (server) — Backend handles post creation, app install hooks, and any future leaderboard or persistence.
  • Game logic — Wave spawning, line collision, enemy pathing, and power-up effects are implemented in shared/client code so the game stays responsive and easy to extend.

We separated the splash (entry point) and game (full-screen) entrypoints so the first paint is fast and the full game loads on “Start.”

Challenges we ran into

  • Input and performance — Making line drawing feel good on both mouse and touch, and keeping the game smooth with multiple enemies and particles.
  • Devvit constraints — Designing around Reddit’s embed and navigation so the game feels native (e.g. expanding to full-screen on start).
  • Scope — Keeping the loop tight (defend the core, until wave 10) so we could polish one clear objective instead of many half-built features.

Accomplishments that we're proud of

  • Shipping a full playable loop (draw lines, defend core, win at wave 10) that runs inside Reddit.
  • A clean separation between splash and game so the app loads quickly and expands to full-screen when the user taps Start.
  • Power-ups (freeze, nuke, heal) and wave-based difficulty that make each run feel different.
  • A codebase that keeps client, server, and shared types in sync and is easy to extend.

What we learned

We got deeper into Devvit’s lifecycle (install, menu actions, post creation), React state and hooks for real-time game updates, and how to structure a small codebase so client, server, and shared types stay in sync.

What's next for Line Defence

  • Leaderboards — Persist scores and show top players per subreddit or globally.
  • More content — Additional waves and power-ups to keep the loop fresh.
  • Polish — More juice (particles, sound, screen shake), better touch controls, and optional accessibility settings.
  • Community — Let subreddits or mods customize difficulty or themes so Line Defence fits their community.

Built with

Category Technologies
Platform Reddit, Devvit
Frontend React, TypeScript, Vite, Tailwind CSS
Backend Node.js, Express

Try it out (Links)

Built With

Share this project:

Updates