Earth Clicker

Inspiration

Inspired by classic idle clickers like Cookie Clicker, we asked: "What if you could play console-quality 3D games directly in your Reddit feed?" Earth Clicker was born to answer that question.

What it does

Earth Clicker is a 3D idle game that runs entirely inside a Reddit post. Players click a rotating Earth to make it grow, collect green orbital rings for bonus points. It's a pure, addictive gameplay in your feed.

How we built it

Tech Stack:

  • Devvit - Reddit's developer framework for custom posts
  • Three.js - WebGL library for 3D graphics
  • TypeScript - Type-safe game logic
  • Redis - Persistent scores and leaderboards
  • CSS3 - Mobile-first UI with glassmorphism

Architecture:

  1. Three.js renders the 3D Earth scene in Devvit's WebView at 60fps
  2. Raycasting detects clicks on Earth and collectibles
  3. Game state persists to Redis every 5 seconds
  4. Fixed HUD with safe-area CSS for mobile devices
  5. Reddit API integration for one-click UGC sharing

We optimized geometry (32-segment spheres), implemented touch controls for mobile, and used Redis sorted sets for efficient leaderboards.

Challenges we ran into

Performance on Mobile - Three.js struggled at 60fps. We optimized by reducing polygon count, implementing frustum culling, and using efficient materials.

Touch Detection - Mobile raycasting was inconsistent. Fixed by normalizing touch coordinates and adding separate touch event listeners.

Safe Areas - UI was hidden behind iPhone notches. Solved with env(safe-area-inset-*) CSS and viewport-fit=cover.

State Persistence - Used Redis for persistence.

Accomplishments that we're proud of

Perfect mobile experience - Works on notched iPhones, Android, tablets, desktop Pixel-perfect UI - Glassmorphism effects, gradient animations, particle feedback

What we learned

Technical: WebGL optimization is critical for mobile.

Design: Visual feedback makes clicks satisfying. Simplicity beats complexity.

What's next for Earth Clicker

Short-term:

  • Daily challenges with unique objectives
  • Weekly tournaments with prizes
  • Planet customization (Mars, Moon, Jupiter skins)
  • Sound effects and ambient music

Built with ❤️ for Reddit's Developer Community

🌍 Click the Earth. Change Reddit forever.

Built With

Share this project:

Updates