This code is in a pre-pre-pre-alpha experimental state.
This is a library to automate the abandonware game Simpsons: Hit &Run with JavaScript. It uses frida to access internal state,and exposes JavaScript classes that can be used to query and control the game.
New The Simpsons Hit and Run Guide Android 1.0 APK Download and Install. If you like The Simpsons Hit and Run game, this app is for you. . 3) About The Game. The Simpsons Hit and Run has all your favourite Simpson characters. This game is a copy of the Grand Theft Auto games but dont worry its not as gruesome hehe. Your objective is to find out whats happening with the Buzz Cola being supplied at the Kwiki Mart by Apu and as you go through 7 levels you get to control.
The intention is to allow easy scriptable access to state, in a similar way tohow pysc2 enabled deepmind to learn how toplay Starcraft II. Eventually I'd like to be able to automate finding glitches,crashes, strategies, routes and so on forspeedrunning.
This is a solo hobby project, I'm a long way off from that point.
Want to see it in action? Here is an early demo video using the debuggingconsole.
Want to see an example script? Here is a simple script that just finds objectsand tries to break them!
If you let this script run long enough (e.g. overnight), it will literally tryto kick every object on the map!
Update: here is another video.
Like this idea and want to help? Let me know!
You need frida intalled, if you already have python itcouldn't be easier, something like:
The full frida install documentation ishere if you need it.
Note: You must be using python for Windows, not WSL python.
You can use a pre-built version if you just want to write a JavaScript scriptand dont want to make any changes to sharapi.
This project mostly uses TypeScript, a language that transpiles to JavaScriptbut adds strong typing. I find this useful for avoiding bugs during development,but the output can be used with JavaScript or TypeScript, whichever you prefer.
You need
typescript
and rollup
to build the script, or you can just use aprebuilt version. tsc
is the typescript compiler, rollup
takes all of theindividual files, figures out the module dependencies and produces a singlefile to give to frida.I use
WSL
, and just type make
to build the final output files with GNU make,because I'm more familiar with Makefiles. In future I'll figure out how to usetsconfig.json
.Run the game
Simpsons.exe
, you can use the launcher if you like, and type this:If you don't get any error messages, then frida was started and was injectedinto the game. To interact with it, open chrome and go to
chrome://inspect
and click the Open dedicated DevTools for Node
link.You should now have a JavaScript console connected.
Try it out!
Type this:
Some coins should fly towards you.
Get into a car, and type this:
Simpsons Hit And Run Update Orland Park
Simpsons Hit And Run Update 2017
Your car should jump 100 ft in the air.
Scripts
If yout want to run a script, try one of the examples in theexamples directory.
Hit And Run Simpsons
I'm using the binary with md5
9009afe5ab6c2daf8605d8b613951902
.