by kadoban · 4y ago · 0 comments
Strategy games may be harder, but still not going to take too long before those exist.
https://coral.ai/models/object-detection/
Which you can buy as a USB stick for $59:
https://coral.ai/products/accelerator/
Sure, it's a little more complex if you want to train on specific heads as opposed to a generic model, but not hugely so. The biggest challenge would likely be downsampling the video stream into something the model can process quickly enough.
This sounds exactly like the old “Twitter would be easy to implement give me a month” naivety.
Development is hard, even small projects aren’t usually finished in a weekend, let alone something there’s no reference implementation for and that we’re merely speculating about.
If such a project was built in a weekend to work reliably enough others could use it successfully in gameplay, it would be highly impressive. Maybe we’d call it an extraordinary effort, if for no other reason “because software”.
A weekend project were you have to design an ultra low-latency software + hardware stack, a custom mouse and train a custom AI. I would be incredible if anyone manages this in a weekend.
I agree it's still tough though, most I/O paths on generic hardware will have buffers at every step that you'll have to fight to eliminate.
Latency _could_ make it a lot more difficult, but beating a human I don't expect would be hard.
You don't need to do hundreds of fps. Just grab the newest frame, process it, repeat. Missing frames at most increases effective latency or means your cheat isn't 100% effective if you miss a head. It's a sliding scale of improvements, not a deal breaker.
You also don't even necessarily have to process the whole frame. Just the bit actually _at_ the crosshairs is probably going to be enough for a crappy version.
And a fake mouse is just usb-hid, usb gadget whatever search terms, not like you'd have to break any new ground there.
I consider it a "weekend project" because it's just throwing together a couple of existing libraries in a fairly standard way. Like most things, cleaning it up enough to be perfect could/would take far longer.
I can do the code and place the esp32 in a mouse on a Saturday (my C is always rusty, not using it professionally). And I am a hobbyist at best. So the original serial mouse/keyboard are connected to ESP32 that normally proxies the signal of the hand movement to the PC.
If I press a pedal (w/ foot) the second computer would receive a signal, calculate a human alike trajectory to move the mouse and send it to the ES32. The latter will execute it along with the left click to shoot.
Like I said - trivial. The same can be done with the USB port as well, and it's not harder. Just that for PS/2 I have the tools laying around.
(Very similar to how you might detect chess cheaters, actually.)