Inspiration Most Reddit games are played alone, even though Reddit itself is built around communities. I wanted to make something where the post belongs to everyone and no single player can finish the game by themselves. I have always liked contraption games because a tiny choice can completely change what happens next. Tomorrow Machine combines that idea with a simple Reddit habit: open a post, add one thing, and return later to see what everyone made. What it does Tomorrow Machine gives the subreddit one shared machine each day. The board has eight sockets, and every Reddit user can place one spring, bumper, fan, or ramp. The board updates as people add their parts. Each contribution is credited, and the leaderboard keeps track of who has helped across multiple rounds. At midnight UTC, the completed machine runs as a physics replay. The community wins if the moving ball reaches the vault. Moderators can also run an instant replay so judges and new players do not have to wait until midnight. Comments affect the next round too. Players can vote with !low, !fast, or !sticky to choose tomorrow's physics modifier. Voting is optional and never blocks the main game. How I built it I built the game with Devvit Web and TypeScript. Phaser 4 renders the board and Matter physics powers the replay. Devvit Redis stores the daily board, placements, contributor credits, votes, replay seed, and leaderboard scores. Redis transactions make each placement atomic, so two people cannot claim the same socket. The same rule also stops a player from placing more than one part per UTC day. Devvit Realtime sends successful placements to everyone viewing the post. A scheduled task resolves the current machine and prepares the next daily round at midnight. Each board has a fixed seed. That means the same pieces and seed always produce the same result, which makes the replay fair and testable. The interface is designed for Reddit's feed and mobile layout. Players see one clear action, large touch controls, the countdown, contributor names, vote totals, and the community leaderboard. Challenges I faced The first challenge was making a full physics game feel natural inside a Reddit post. Opening a separate expanded view caused a black screen during testing, so I changed the game to load directly inside the authenticated post frame. That also made the first interaction faster. Concurrency was another problem. A normal read followed by a write would allow two players to choose the same socket at nearly the same time. I used Redis transactions to make the socket check and placement one operation. Physics replays can change slightly between runs if they depend on random values or timing. I moved the replay decisions into deterministic game logic and gave every daily board a stored seed. Comment triggers can also be delivered more than once. I store processed comment IDs so a repeated event does not count the same vote twice. What I learned I learned that a Reddit game works best when the community action is small and easy to understand. Placing one part takes only a few seconds, but the unfinished machine gives people a reason to check the post again. I also learned to separate the shared game state from the visual replay. Redis decides what the machine contains, while Phaser is responsible for making the result fun to watch. That separation made the rules easier to test and the replay easier to debug.

Built With

Share this project:

Updates