Hey everyone,
I've recently built the simple quiz game on Reddit and want to share my experience and things I learned on the way.
This is my take on Reddit games on Youtube, in case you prefer a video format:
First of all, what is the Reddit Games?
They exist for years I believe, but for some reason many people don't know about them and I actually found out only recently too. It's an ecosystem on Reddit that includes their native hosting for web apps and proprietary framework called Devvit.js. So you can build full scale applications and games and host them for free on Reddit. Also, you can even receive in-app payments, and this is why I think it's still undervalued. I believe it will grow, but right now it looks like it's still early to enter the ecosystem. So in case you're interested keep reading.
A couple of words about Devvit
This is a framework built by the Reddit's team. You write an app with TypeScript or JavaScript, and it's ultimately running on Node.js on their servers. So you don't have any costs, just push your app and Reddit will host both frontend and backend for you.
There are two types of apps you can build: Blocks and Web. I only used Blocks so far. You write React/HTML-like syntax, but with custom HTML tags provided by Devvit (this is how you integrate it with you linter and transpiler) Blocks are very much limited and not an option for large/complex apps I'd say. But it's running automatically in the feed, and users don't have to launch it. For simple games and apps it might be just enough. I see much more emphasis on the Web, which was released not that long ago. With Web you build a standalone web application with a framework/library of your choice (React, Vue, Angular or any other). You have the backend part and the frontend part. For both types of apps you can access user data and use internal Redis storage to persist any data you need.
Here's quick comparison of Block and Web:
| Feature | Devvit Blocks | Devvit Web |
|---|---|---|
| Interactive In-feed | ✅ | ❌ |
| Reddit Design System | ✅ | ❌ |
| Cross-platform (iOS/Android/Web) | ✅ | ✅ |
| Full Screen / Focus Mode | ❌ | ✅ |
| Sounds | ❌ | ✅ |
| 3D Graphics | ❌ | ✅ |
| Animations | Limited | ✅ |
| Standard Web Stack | ❌ | ✅ |
Need to start Blocks app quickly?
I have built a minimalistic starter repo for Blocks app. It uses TypeScript and Biome.js instead of ESLint which is used in their original starter. Feel free to give it a try!
Starter: https://github.com/room-js/reddit-game-blocks-starter/
If you have any questions or ideas, please leave a comment.
Happy Coding!
Top comments (0)