Submission Text Full Submission Page
This is a 3-frame TAS. And yet it took months to actually finish, with thousands of rerecords. Let me explain.
In this game, you have to quickly drag a hand towards a monkey to "spank the monkey" (for non-native speakers like me: this is a dirty joke). If you manage to spank it at more than 200mph, you get a nice music, showing that you succeeded. Besides the incredible music (excerpt of The Adventures Of Grandmaster Flash On The Wheels Of Steel), the main perk of the game back in the days is that you could very easily glitch it by dragging the cursor out of the screen or pausing the game, leading to incredible scores around 800-1000 mph. Some of these bugs are somewhat reproducible in Ruffle and can lead to scores within this range with some effort.
The game can be played for instance here and the .swf downloaded here.

Finding the maximum score

As a base of comparison, the maximum score you can get from going to the maximum right of the screen to the maximum left in one frame is a bit above 250 mph. But we have no reason to stop here, as we can enter mouse position values below those places.
Ruffle provides the ability to enter x;y mouse positions out of the screen window (labeled as a bug that I hope will never get fixed). We use this ability to enter arbitrarily high values. But if you think I just entered super high values and was then done with TASing this game, oh god you're wrong.
There are three meaningful frames in this TAS:
  • 384: positioning the mouse prior to grabbing the hand (preparation frame)
  • 385: grabbing the hand on the right position (pre-slap frame)
  • 386: moving the hand to the left position (adjustement frame) while remaining within the range accepted by the game
And hand is then released at frame 387 in an empty frame, ending the inputs.
After a first round of empirical search and a submission that got improved by current co-authors by fixing framerate and timing, I ended up using JPEXS to decompile the game and understand exactly what's going on. Basically, the game checks that the hand is in an acceptable range (between 10 and 350 pixels) at some point of the code, but only after some processing, which still allows us to enter extreme values beforehand, as long as we make sure some variable still ends within this range. With some computations, we can calculate the maximum value that gets the variable containing the hand x position as close to 10 as possible. (I kinda forgot all the details as I'm writing this after weeks of procrastination, but you can directly check the core logic handling this, as it's pretty short.)
Current mouse values are optimal because increasing them from even 1 makes some internal variable overflow.
Then we can get some additional extra score by abusing framerate, as one line in the code divides the result by some speed factor (see details here).

Results

The results are the following:
  • frame 384: -53686737 (preparation frame)
  • frame 385: 53686737 (pre-slap frame)
  • frame 386: -36085227 (adjustement frame)
Score: 214.748.340 miles per hour.
As a reminder, speed of light is 671.000.000 mph. Our score is 500 times faster than the fastest man-made object, the Parker Solar Probe (see this video to get an idea of what this speed actually represents). We therefore successfully managed to make our monkey the fastest man-made object, at 32% the speed of light.
Considering the size of my screen, that means putting the mouse roughly 15 kilometers (9 miles) left and right of the screen in one frame, which I challenge you to do in real time. Considering one frame is 1/100th of a second, that means moving the cursor at 3000 km/s, which is 15.7 times faster than the parker solar probe.

Category

Besides "High score", this movie could be published under the "mouse glitch" category made up for this movie, although there really isn't much more to the game. A normal run would be just as fast and within the 250-300 mph range, which is pretty boring.

Room for improvement

While the speed factor can theoretically allow us to get a maximal factor of 10 on the final score, I only managed to make a factor 2 work. perhaps the game just doesn't compute fast enough for more to work. I don't know, I just haven't managed to make something work while starting with a framerate of 1000. Making this work could finally make us exceed speed of light.
Also, while the x variable overflow, it's still a factor 10 off the maximum position for an object in Flash. It's *possible* that working with the game resolution might produce some better results.

Submission / encoding note

As I'm modifying the default framerate of the movie so I can get the internal timer to run at a different rate (while actually changing framerate of single frame only), this make libTAS laggy for frames that are not running at a framerate of 100 (since they're non-draw frames). For encoding convenience, I leave the .ltm file with frames up to the end of the song so they're set at 100 fps, but the movie does end at frame 386.

Versions

  • libTAS v1.4.7
  • ruffle-nightly-2025-09-22
  • monkey.swf md5sum: 23e550300d5ba036a994534eca0a8525

eien86: Claiming for judging.

eien86: Spank the Monkey (named "Slap the Monkey" in the .swf file, probably an earlier naming) is a game with the only objective of slapping an inflatable monkey as fast as possible using a quick sideways movement of the mouse. The game is only beaten if you get to exceed 200mph, which this movie does, and then some. The movie achieves the goal arguably in the least number of frames possible, but also with the highest speed (i.e., score) reaching something like 3% of the speed of light in doing so, exploiting a mouse glitch.
The "maximum score" and "fastest solution" goals here are intertwined and cannot be easily divorced. I'd argue maximizing the speed of the mouse is also an expectation of a standard movie and therefore clarifying "maximum score" as a goal is not necessary. Nor it is the fact that a mouse glitch, since this is an expectation of an any% approach, where everything goes. Therefore, I will remove all specification of goals and leave this as baseline. Any obsoleting movie should either (a) be faster, or (b) score more speed.
Accepting to Standard

eien86: Oops, jumped the gun there -- seems like the authors are working on an improvement still: https://tasvideos.org/Forum/Posts/540682

Samsara: Resetting to New.


Editor, Player (41)
Joined: 7/10/2022
Posts: 34
Yea sorry all, I've been way too caught up with a much, much bigger TAS to properly finish this one, but it's definitely on my todo list (and couldn't respond in here in the previous days because I was travelling)
Editor, Player (41)
Joined: 7/10/2022
Posts: 34
So... After HOURS of reverse-engineering this, I just figured out that 2^30 = 1073741824 So, yea, basically, we're overflowing and that's why we can't beat it. I'll still try to get closer to that limit Edit: Eh. (still trying to understand the factor 10 difference though)
Editor, Player (41)
Joined: 7/10/2022
Posts: 34
A few updates after a lot of code digging and various attempts: - we indeed have some value that overflows, which indicate we have the max possible difference in terms of mouse position. It's still a 10 factor off 107374182 though. It might be possible to do something by varying game width (I haven't tried) - The final result is computed this way:
vNew = (xOld - xNew) / fps.speedFactor;
where:
currentTicks = getTimer();
frameDelay = currentTicks - oldTicks;
speedFactor = frameDelay / 10;
speedFactor is 1 by default, and can go as down as 0.1. In other words, there's an additional factor 10 to be gained there. I managed to double the score using variable framerate in libTAS, see https://tasvideos.org/UserFiles/Info/639069458201263162 . However, for this, I have to modify the default framerate, and I'm not sure this still counts as a valid submission (even though I turned all frames except the relevant one back to 100fps). I had no chance making that work with default fps, and I guess the reason is timer is initialized before frame 1. I did not manage to get that working with a factor 10 (a.k.a with fps of 1000), I don't know why. I suppose you need to manage to get frame properly in line with rendering or something. I feel I spent too much time on this and kindly request help from other on contributors or anyone knowing how to properly manage variable framerate. Game patched with relevant debug traces.
ikuyo
She/Her
Senior Judge, Experienced player (582)
Joined: 7/8/2021
Posts: 178
Hi! Should I set this submission as Delayed given the current improvement work?
GuanlongX wrote:
auuuugh my face when games are creative and cool and don't fit arbitrary rulesets
Editor, Player (41)
Joined: 7/10/2022
Posts: 34
ikuyo wrote:
Hi! Should I set this submission as Delayed given the current improvement work?
Hmm, I guess so? What's the rule on this?
However, for this, I have to modify the default framerate, and I'm not sure this still counts as a valid submission (even though I turned all frames except the relevant one back to 100fps).
Emulator Coder, Site Admin, Skilled player (1272)
Joined: 4/17/2010
Posts: 11850
The way libTAS forces updates doesn't internally change how the game (or emulator) works, it just fetches whatever data at a different time, see Post #525953. So there's no substantial harm in using different framerates. But it's still better to avoid completely arbitrary values if they affect gameplay in uncertain ways.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Editor, Player (41)
Joined: 7/10/2022
Posts: 34
Not sure how to move on with this as I'm kinda stuck with making variable framerate work properly (I reiterate that any help is appreciated). I could rework the submission with the latest highscore gained using a normal rate, and later make another submission if we make that work properly. Or I could submit current highscore, which is using unoptimized variable framerate but twice better than fixed framerate score. What do you think?
Emulator Coder, Site Admin, Skilled player (1272)
Joined: 4/17/2010
Posts: 11850
Matching internal rate is the sanest default, so a movie using that is valid. If you base your improvement on changing the framerate, the value(s) you use should be non-arbitrary and based on something objective. Right now it feels like the former is a better option.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Editor, Player (41)
Joined: 7/10/2022
Posts: 34
OK after a final (failed) attempt at making a better framerate work, I updated the submission text and uploaded the final movie. I'm requesting movie to be replaced with this one, and this can be judged again (apologies for the multiple-month-long delay!) See the note I put there (and in the submission text): I don't cut on last input for encoding convenience, it's normal.
Emulator Coder, Site Admin, Skilled player (1272)
Joined: 4/17/2010
Posts: 11850
zapkt wrote:
I don't cut on last input for encoding convenience, it's normal.
Encoding is not affected by it, dumping video runs after the movie ends just fine. But ending on last input matters for the site that aims to show accurate movie durations.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Editor, Player (41)
Joined: 7/10/2022
Posts: 34
feos wrote:
zapkt wrote:
I don't cut on last input for encoding convenience, it's normal.
Encoding is not affected by it, dumping video runs after the movie ends just fine. But ending on last input matters for the site that aims to show accurate movie durations.
OK, replacing with this file then

1772831115