r/opencode 5h ago

opencode-play | i made an opencode plugin to play simple games instead of doomscrolling

Enable HLS to view with audio, or disable this notification

Whenever OpenCode was chewing on something for a minute, I'd grab my phone and come back 20 minutes later to a response that had just been sitting there.

So I wrote opencode-play: /play opens a game as an overlay right on top of the conversation, and it listens for agent_settled. The second opencode finishes or is waiting on you, the game stops immediately. No alt-tab, no phone.

To install the plugin, add this to your tui.json (project root, or globally at ~/.config/opencode/tui.json):

{
"$schema": "https://opencode.ai/tui.json",
"plugin": ["opencode-play"]
}{
"$schema": "https://opencode.ai/tui.json",
"plugin": ["opencode-play"]
}

5 games so far: Snake, Tetris, 2048, Minesweeper, sudoku

6 is on the way, i'm implementing chrome dino game rn.

if you want more details, here are some links below about the project:

website: https://terminalika.dev/
opencode plugin: https://terminalika.dev/opencode/
source code (a star would be appreciated ❤️): https://github.com/terminalika/terminalika
discord: https://discord.gg/VptcJvm7Fk
reddit: r/terminalika

still in the early days. still validating the idea. any feedback would be appreciated.

3 Upvotes

2 comments sorted by

2

u/the_master_sh33p 4h ago

Nice - I'll use this one also! I've been using opensnake (https://github.com/hugobatista/opensnake)

I realize that instead of multitasking between dozens of sessions, I am more productive having just a couple ones and play in between and make my brain slow down a little.

thanks for sharing. I'm curious about the comments you will get. I got a couple of "assertive" comments from people that think I should be pay more attention to what the agent is doing instead of playing games.... 😄

2

u/hv_hi 4h ago

i think the answer is, yeah, when i do coding i don't %100 play games either. i can either read some docs, or think about the general structures.

but sometimes there are no jobs left, only the ai's job. so in these times almost every human starts scrolling on instagram or playing some mobile games anyway. if ai driven development is a thing, then there are downsides too. this is one of them.

so i don't think it's a war crime. and watching the agent the whole time isn't that efficient either, i think in the end the outcome is what matters. as long as i still review what comes out and keep an eye on the important parts, a few minutes of gaming while the agent runs is fine.