Inspiration

We wanted to bring a rich, immersive 3D gaming experience directly into the heart of a Reddit post. The idea was to blend the accessibility of social media with the depth of a traditional web game, allowing subreddits to not just talk about games, but to actively build, defend, and explore a world together without ever leaving their feed. We were inspired by classic low-poly survival and base-defense games, and wanted to see if we could push the boundaries of Reddit's new developer platform to host a fully playable 3D environment.

What it does

HELAO2: Planet Outpost is a fully playable 3D survival and base-building game embedded natively within a Reddit post. Players can deploy onto a hostile alien world, gather resources like metal and data cores, build defensive structures, and fight off relentless waves of enemy drones.

The most exciting feature is the Co-op Wilds multiplayer mode. Redditors viewing the same post can jump into the game together in real-time. You can see other players move, watch their tracers as they shoot, and team up to defend the outpost tower from increasingly difficult enemy patrols.

How we built it

The core engine and 3D rendering are built entirely with vanilla Javascript and Three.js, keeping the game extremely lightweight and performant in the browser.

To bring it to Reddit, we migrated the game to the Devvit ecosystem using the @devvit/web framework. We replaced our traditional WebSocket multiplayer backend with Devvit's Realtime API and a custom Hono server. By dynamically overriding the game's internal networking objects, we successfully routed player movement, state updates, and combat events through Reddit's native infrastructure, using Redis to track active players in a session.

Challenges we ran into

Migrating an existing, highly interactive WebGL engine into a sandboxed Devvit iframe presented several unique hurdles:

  • Script Execution & Context: We had to carefully manage script execution order to bridge the gap between our legacy vanilla JS game logic and the modern, module-based Devvit context.
  • Multiplayer Networking: Rebuilding the network layer was a massive challenge. Devvit's strict TypeScript constraints on JsonValue payloads meant we had to cleverly type-cast and adapt our game's fast-paced binary-style state packets into structured JSON that Devvit's Realtime API could broadcast.
  • Sandbox Security: Dealing with browser iframe sandbox constraints—particularly around Pointer Lock API for standard FPS mouse look—required us to engineer graceful fallbacks and ensure the game remained playable regardless of environment restrictions.

Accomplishments that we're proud of

Successfully running a performant 3D game with complex AI, dynamic lighting, and chunk-based terrain generation inside a Reddit post is a huge win.

We are incredibly proud of the seamless multiplayer integration. Converting a legacy socket system into Devvit's Realtime API without having to completely rewrite the core game engine was a major technical victory. The fact that multiple Redditors can just open a post and instantly find themselves in a synchronized co-op survival session feels like magic.

What we learned

We gained a deep understanding of Devvit's architecture and how to push the limits of Reddit's Web View capabilities. We learned how to handle strict TypeScript interfaces for cloud relay payloads, how to manage state across distributed Redis instances, and how to safely navigate the security constraints of embedded iframes while maintaining a high-fidelity user experience.

What's next for Planet Outpost

We want to expand the multiplayer ecosystem and deepen the survival mechanics:

  • Persistent Worlds: Implementing Devvit's Database API so that bases built by one group of Redditors remain intact for the next players who discover the post.
  • Subreddit Boss Raids: Creating massive world events and boss fights that require an entire subreddit community to coordinate and defeat over several days.
  • Expanded Crafting: Adding more complex crafting trees, vehicles, and weapons to give players even more tools to conquer the alien wilds.
Share this project:

Updates