r/ClaudeCode • • 4d ago

Help/Question Game dev. - Want Claude autonomously testing in-game + viewing video research material

I'm developing a complex 3D game. So far, any fixes or changes Claude does for me, I need to verify by testing myself (but Claude gives step-by-step instructions and reads hooks/logs). Furthermore, video material research needs to be viewed by me, because Claude Code can't watch videos or e.g. Youtube videos (at least with Opus 5.5).

There was a short instance where I specifically asked, and Claude instead took control of my mouse and took screenshots (as its eyes) while testing fixes in-game. That was just stationary things like menus. It also leaves my computer unusable during that time, because I can't even take the game window out of focus.

What I'm getting at is that I'd like it to work autonomously as an iterative loop: video research, adjust code accordingly, verify by a short playtest - rinse and repeat. While I can do something else for like an hour or two.

As it stands, I'm still working hard even when vibe coding.

Furthermore, it is often the case for my game that many design decisions are inspired by other games. I want Claude to be able to look at Youtube videos and make design decisions based on what I describe to look out for (e.g. this type of attack moveset, that sort of animation). Claude tells me it can't look at videos.

As a disclaimer: my game will never be commercial. It's a personal project. A what-if type of personal dream game. I thought that may be good to state, since mentioned taking inspiration from existing games.

My only idea right now is to tell Claude to take as many screenshots per second as possible, and build like a "mental video", and then to leave my computer while Claude has complete control over my computer. I'd prefer if it did things safely in its own container instead though!

I use Claude Code via the VSCode plugin, with Opus 5.5 on High. I don't mind adding a couple more paid A.I. models (Claude or otherwise) if it helps my use case. I understand Claude can spawn agents that use other paid A.I. models not from Anthropic.

Thanks in advance, and sorry for the long post. I find it hard to not be misunderstood when being brief.

1 Upvotes

18 comments sorted by

•

u/AutoModerator 4d ago

Hey! Thanks for posting to r/ClaudeCode

While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.

For help, project discussions, tips, and general chat, join the ClaudeCode Discord.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/deknis 4d ago

Can Fable 5.1 do any of the things I want as plug-and-play?

1

u/PocketStudio 4d ago

For the playtest loop, stop letting it drive your real mouse. Run the game on a separate machine or headless, feed it scripted inputs, and have it write state to a log it can assert on. Then it checks exit codes and log lines, and your desktop stays free. For video, it can't watch, but it can read stills: cut frames with ffmpeg at fixed intervals (fps=1/10 lands about 5 seconds after the label time) and pair them with a transcript.

1

u/deknis 4d ago edited 4d ago

I don't know what headless is, but... Is it possible to have Claude inspect the gameplay while it's playing on its own by recording it via frames, similar to the solution for video? And in a safe way that does not interfere with me using my computer at the same time?

My game is not written in or uses Godot.

1

u/ksehili 3d ago

Yes. What keeps your computer usable is where the game runs, not how Claude watches it.

"Headless" means running without a visible window. The engine has to support that, so with binaries you can't change it probably won't work. The simpler route is a second computer, a spare PC or a virtual machine, with its own screen. Run Claude Code on that one too, so the mouse it takes and the screenshots it makes are that machine's, and your desktop stays yours. It can save its playtests there as frames as well, the same way as the videos.

One catch for a 3D game: a virtual machine without its own graphics card will run it slowly, maybe too slowly to judge an animation. A spare PC with a real GPU avoids that.

1

u/PocketStudio 2d ago

Headless just means running with no window on screen. To keep your own PC free, run the game on a second machine or a virtual display, let a script or bot play it, save a screenshot every few seconds, and have Claude read those images. One catch: some engines draw nothing in headless mode, so check the saved frames aren't blank before trusting any verdict.

1

u/mettavestor 4d ago • Heartwarming

Stop letting it drive your mouse. Give the game a test mode Claude can run from the terminal:

  • a flag that loads a scene, plays back a scripted (or recorded) input file, and quits
  • every N frames, dump a screenshot to a folder plus one JSON line of state (position, anim state, hp)
  • Claude runs it, reads the PNGs and the log, edits, reruns. Your desktop stays yours.

If you're on Godot, --write-movie frames/out.png already dumps every frame. Unity and Unreal both do scripted batch runs.

For videos: yt-dlp then ffmpeg -vf fps=2 gives Claude frames it can actually look at, and --write-auto-subs grabs the narration. Or hand the YouTube URL to Gemini, which takes video directly, and have it write up the moveset with timestamps.

These tricks come in handy for all sort of things, not just game development. Chrome DevTools MCP is a godsend for wanting to control the browser for any reason.

1

u/deknis 4d ago edited 4d ago

Give the game a test mode Claude can run from the terminal:

* a flag that loads a scene, plays back a scripted (or recorded) input file, and quits

I appreciate the advice, but I think that will be hard. The game is building on top of another existing game that is just binaries with no source code available. Most of what the player controls is done via those binaries. That is, imagine that only half the game is available as source code. I don't wanna bore you with the details of why it was set up like that. It's like a mod, but must more expansive, and via source code (the new part that I'm doing) instead of traditional modding.

Regardless, I think there will always be situations were it is more efficient to play freely (assuming it is possible). Think, late stage testing, high level or acceptance, etc, or just finding bugs that you didn't know about, by just trying things out (which the A.I. comes up with, as it observes what happens).

* every N frames, dump a screenshot to a folder plus one JSON line of state (position, anim state, hp)
* Claude runs it, reads the PNGs and the log, edits, reruns. Your desktop stays yours.

Very useful advice for my case - thank you!

For videos: yt-dlp then ffmpeg -vf fps=2 gives Claude frames it can actually look at, and --write-auto-subs grabs the narration.

When searching for yt-dlp on Google I find it on claudemarketplace (website). Is that the correct place for me to get it from if I use Claude via VScode? Or should I get it via an MCP or something along those lines?

Or hand the YouTube URL to Gemini, which takes video directly, and have it write up the moveset with timestamps.

Would you assume I could make Claude use Gemini itself to do that? Or are they not allowed to communicate?

These tricks come in handy for all sort of things, not just game development. Chrome DevTools MCP is a godsend for wanting to control the browser for any reason.

Do you know if there's an equally good MPC for Firefox? It's fine if you don't, and I'll look myself but, first hand information from someone experienced is invaluable.

Sorry for all the follow-up questions and my inexperience. Only answer what you want!

1

u/dota2nub 4d ago

Disassemble it and built it from scratch in something you can actually control. Building on top of existing binaries is no way to work in any reasonable way.

You can see it in enterprise software too. Lots of binaries around from ten years ago that are still essential to some stupid business process somewhere. It's a nightmare.

1

u/deknis 4d ago

I didn't realize that was a viable option. Should the disassembly be into pseudo code first, which is then used to guide writing of the real code? Or is there any tool that truly disassembles into actual source code?

1

u/dota2nub 4d ago

I mean once you disassemble you can port it to Javascript or whatever. Code is yours now, do whatever you want with it.

1

u/deknis 4d ago

Sorry, I got dissassemble and decompile mixed up. You mean to disassemble from binary to assembly code, and then port the assembly code into another higher level language. Do you think it's realistic, and that it won't break existing things in the game?

1

u/dota2nub 4d ago

I mean you'll have to test it and fix stuff and it'll take a while. I've done similar things but I don't know what your oroginal binaries are like.

1

u/mettavestor 4d ago • Heartwarming

No apology needed, happy to help.

  • yt-dlp: It's a free command-line tool, open source on GitHub (github.com/yt-dlp/yt-dlp). Install it with your package manager (winget install yt-dlp on Windows, brew install yt-dlp on Mac), plus ffmpeg. No MCP needed: Claude Code runs terminal commands from VS Code too, so just tell it yt-dlp is installed.
  • Gemini: yes. Install the Gemini CLI and Claude can call it like any other command (gemini -p "..."). Or have Claude write a small script against the Gemini API, which takes a YouTube URL directly.
  • Firefox: Playwright MCP runs Firefox with --browser firefox. It's not as deep as DevTools is for Chrome, but it's fine for clicking around and taking screenshots.

1

u/Saver411 4d ago

Claude seizing your mouse to click around a 3D engine is pure nightmare fuel.

For the video research side, don't try to make it watch raw playback. Have a local script rip out keyframes every few seconds and dump the audio transcript into markdown. Passing a batch of stills alongside the transcribed dialogue gives it plenty of visual context to break down mechanics without you having to sit through reference clips.

What kind of reference footage are you having it break down?

1

u/deknis 4d ago edited 4d ago

It was just a small test. It's not convenient to not be able to use the PC at the same time, so I never did it afterwards.

What kind of reference footage are you having it break down?

For example, gameplay of combat of another game as inspiration, to recreate e.g. a similar moveset, a similar VFX, a similar sound, and so on.

1

u/Subject-Cheetah-7061 4d ago

Bake in lua scripts and thank me later through coms, run the tests headless and using lua scripts commands

1

u/jayvpk 4d ago

For the videos, have it download them with yt-dlp and pull frames out with ffmpeg (a frame or two a second is plenty), then look at them in batches. It can't watch a video but it reads a strip of frames just fine, and grabbing the auto captions gets you the audio side too.

For playtesting, I'd rather have the game log everything it does and have Claude read the logs than let it drive my mouse. The stuff only your eyes catch (feel, animation timing) still needs you, so I just say what's wrong while I play and keep going. Also, check out earshot by Leon Lin, its an audio skill(?) that lets your AI hear. Pretty good for SFX.