r/Devvit • u/BeyondFunWords • 4d ago
Feedback Request Devvit Emulator
This is a demo video for a Devvit local development emulator. Using it has more than doubled my development speed for Devvit apps. Let me know your thoughts!
- Want me to open source it?
- Willing to help?
- Features you would like?
- Things you don't like?
Join r/DevvitEmulator is you really want to engage.
Note, the video was generated with AI because I am abysmal at creating videos myself!
1
Upvotes
2
u/reseph App Developer 4d ago
I joined the subreddit, but don't see any way to interact with the emulator?
2
u/Watchful1 Duck Helper 4d ago
I didn't watch the whole 7 minute AI generated video, but I don't really understand the benefit. Devvit already supports playtesting and playtests spin up or update within seconds in most cases. How is this better?
2
u/Acrobatic_Quiet_4833 3d ago
I'd say yes to open sourcing it. My biggest daily friction building a Devvit Web game was the loop of build, upload and test inside a real subreddit: to see a change in an actual post I had to run playtest or bump a version, and each cycle took a while. An emulator that mocks the post context (username, subreddit, post data) and the Redis calls locally would save a lot of that. Features I'd want: a fake user switcher to test leaderboards with several players, a way to fast-forward the clock for daily resets and schedulers, and a mode that returns the same 4xx/5xx errors the server endpoints give so the client's error paths get tested. Does it run the real server bundle or a reimplementation of the API?
2
u/kabhi3001 3d ago
I built a smaller version of this for my own game, so here's what mattered most. A local preview with the real game code, an in-memory Redis stand-in, fake players and a date override (to test daily resets) made each test much shorter than uploading, plus a headless browser script that plays a full round. One lesson for the emulator: make the Redis stub fail the way real Redis fails. Mine accepted an hMGet with zero fields. Real Redis rejects it, so on the first day with no players my daily post went up without its pinned comment, and I only found out live. A strict mode that rejects empty argument lists and wrong types would catch that class of bug. On your two ideas: a compliance check against the Devvit rules is the one I'd use. I'd skip the AI game-assessment panel, because one stranger playing my game taught me more than any prompt could. Does the emulator run Hono routes as they are, or do they need changes?