News for hackers. Stuff that matters.
Re:Retrobot: A Discord bot that plays emulated games with fr... by ross-squires on Friday September 16, 2022 @07:57PM (#32873518)
I spent a few weeks building a Discord bot that allows you to play NES/SNES/GB/GBA games over chat. Think “TwitchPlaysPokemon”, but with GIFs. It accepts button presses, emulates the result, and encodes a GIF to view!
Re:Retrobot: A Discord bot that plays emulated games with fr... by metadat on Saturday September 17, 2022 @11:15AM (#32878171)
Really great work, thank you for sharing and making it open source!

Edit: Erm, have you decided on a license yet? I don't see one in the repo. Personally I'm a fan of the permissive MIT license.

https://github.com/git/git-scm.com/blob/main/MIT-LICENSE.txt

Re:Retrobot: A Discord bot that plays emulated games with fr... by ross-squires on Sunday September 18, 2022 @07:54AM (#32886771)
Added!
Re:Retrobot: A Discord bot that plays emulated games with fr... by hyperhopper on Friday September 16, 2022 @11:51PM (#32874607)
> Retrobot simplifies control by auto-forwarding through idle parts of games, such as conversations or battle animations.

How is this possible? Isn't this the halting problem?

Re:Retrobot: A Discord bot that plays emulated games with fr... by soulofmischief on Friday September 16, 2022 @11:52PM (#32874614)
I assume memory hacking, most of these memory tables for popular old games are well known.
Re:Retrobot: A Discord bot that plays emulated games with fr... by hyperhopper on Saturday September 17, 2022 @03:59PM (#32880986)
"popular" isn't what the site claims. It claims this is at the emulation level, not game level. If I can't make my own rom and have it work, what it advertised is a lie.
Re:Retrobot: A Discord bot that plays emulated games with fr... by soulofmischief on Sunday September 18, 2022 @11:47PM (#32894072)
It's an open source project, they aren't selling you anything. If you find it doesn't work as intended for a given ROM, you roll up your sleeves and fix it, ensuring the intended feature remains complete.

Or I guess one could just complain and nitpick on Hacker News.

Re:Retrobot: A Discord bot that plays emulated games with fr... by ross-squires on Sunday September 18, 2022 @07:57AM (#32886783)
@kevincox and @g_hn_liaison have it right. There's a set of parallel workers that test different button inputs. The "output" is the last frame rendered to the screen after extra few frames to let the game respond. Those button outputs are compared with an "idle" output to determine if pressing any input could change the output. If not, then continue to autoplay until an input matters.
Re:Retrobot: A Discord bot that plays emulated games with fr... by kevincox on Saturday September 17, 2022 @05:02PM (#32881546)
Maybe it tries to emulate extra frames with different buttons pressed and if it doesn't make a difference it plays those frames for you?

Of course detecting "doesn't make a difference" is very difficult because most games will keep at least the current and last frame of input in memory somewhere. So you would need to be careful enough to ignore that.

Re:Retrobot: A Discord bot that plays emulated games with fr... by g_hn_liaison on Saturday September 17, 2022 @06:29PM (#32882234)
Looks to me like that's exactly what it does. This line seems to check for a divergence of possibilities: https://github.com/rossimo/retrobot/blob/master/src/emulate....
Re:Retrobot: A Discord bot that plays emulated games with fr... by kenerwin88 on Friday September 16, 2022 @11:40PM (#32874555)
Super cool, ty for sharing! Will definitely be trying this asap.