r/perchance • u/Grawprog • 13h ago
AI Ai Helper Playing Final Fantasy V
Final Fantasy V is one of my favorite games so about two months ago I set out on the incredibly stupid journey of trying to port the game as a Perchance generator in Javascript. It's been quite the process and it's still far from ready to be public, but I've reached the point where all the static port work is done. But because this is a SNES game, there are many things that only exist at runtime, which means, it needs live playthrough testing.
I don't really want to play and replay a 20+ hour game over and over again otherwise I'm going to end up hating it but I figured the ai helper might like a break from making things so I set it on the quest to A/B test the game from boot to end on both an embedded Mesen-S core and the JavaScript port, while capturing RAM and game state and all that fun stuff.
I tried this before with Blaster Master but it struggled with the tight platforming so I switched to replay files and played it myself and found tas videos for that project. That doesn't really work for FFV because of the RNG in the game so, the only real option, Ai helper plays it and uses save states.
It's actually doing a lot better at FFV. Sorry these pictures are less exciting. I had it kill the live preview and work headlessly because I didn't feel like listening to the game running on my phone constantly. But basically we've been breaking the game into milestones. The first was boot through the Wind Shrine. It managed to rock that out in about a day and even decided to take a random detour to explore Tule before heading to the Wind Shrine. The next milestone is making it through the canal and reaching Karnak.
Essentially it's been following walkthroughs and guides with labelled maps. I had to explain how the chocobo jumps in the intro section worked because I guess in code there's no jumping or anything happening so it got confused, but otherwise so far it's been pretty smooth sailing.
As for the picture showing the ai's update, there are actual graphics in the game implemented but the ai helper is using the raw map data for its actual playthrough and comparing VRAM states directly for graphics comparisons so not much to show off for the playthrough.
I have no idea if it'll be able to make it through the whole game. The beginning's pretty linear and straightforward and overall the game's pretty linear but it's pretty big for a SNES game and there's a lot of stuff in it and it also has to fix bugs and missing things in the port along the way so this could be a slow long process but it's super cool seeing it play through FFV and actually make progress.