Submission Text Full Submission Page
SHA1 of the swf: 4690deacf09b9a86e6c028c61800bdb38134d2b1
Created on Ubuntu 22.04.3
NOTE: In order for this movie file to sync, the user’s internet connection must be disabled. Additionally, --no-gui must be entered in Ruffle's launch parameters.

Game Objectives

  • Levels up to Rank 5 as fast as possible
  • Heavy luck manipulation
  • Contains speed/entertainment tradeoff
  • Genre: Simulation
  • Genre: Strategy

Game and Category Overview

Papa's Donuteria is an Adobe Flash game created by Flipline Studios and released on the 16th of June, 2014. It is the 10th entry in the series of Papa Louie restaurant management games (14th if you include the remakes for mobile devices). This TAS aims to level up to Rank 5 as quickly as possible - the most popular category to speedrun among the RTA community.
Originally, I hadn’t planned on submitting this to TASVideos - after all, this doesn’t actually finish the game (that happens upon reaching Rank 61), so I assumed that it wouldn’t be acceptable. However, amongst discussions about the merging of Playground and Alternative runs today, Samsara said this:
And so here we are.

The Strategy

Getting to Rank 5 in this game requires the player to get 1680 points. Points are earned by serving orders to customers, where they’ll receive a certain number of points ranging from 0 to 100 per customer depending on how well the order was made. The number of customers the player receives a day varies depending on their current rank: Days 1 and 2 will only have 2 and 3 customers respectively, but Ranks 2 through 5 will give the player 4 customers. This makes it barely possible to reach Rank 5 after 5 days, with only 20 points of wiggle room. However, there’s another mechanic to help us here: customer medals.
If the player gives a customer an order with 80 points or more, they’ll earn a star for that customer. Upon earning 5 stars, they’ll receive a customer medal, allowing them to earn more points per order. Notably, the number of points they receive upon earning that 5th star will be tripled, allowing for a maximum of 300 points to be earned from a single order. Hence, by manipulating one of the Day 1 tutorial customers (in this case, James) to come in every single day, we can earn a customer medal on Day 5, allowing us to sacrifice 220 points for speed throughout the TAS instead.
The first and last customers on each day are fixed, so it’s not possible to get a medal on any other customers after 5 days. For the other customer I was able to manipulate on Days 3 through 5, I chose customers whose orders could be prepared fastest: Maggie on Days 3 and 4, and Prudence on Day 5. I also sacrificed 2 frames at the start of the run to choose Scooter as the worker rather than Tony, because I like playing as female characters and it was such a negligible time difference as to not bother me.

The RNG Manipulation

The vast majority of RNG events in this game are decided via the same stock ActionScript function: Math.random(). This makes getting different outcomes reasonably simple: All we need to do is make extra calls to the RNG, which can be very easily done here by swapping which order ticket is on the side hook. Additionally, in ruffle, we can change the starting system date and time to get different seeds for the RNG. Despite this, it would still be very time consuming to do this RNG manipulation manually, adding in another RNG call and waiting for the TAS to play out until the next day so that we could see what the result was (which was how I did this when I made a Rank 5 TAS of Papa’s Pizzeria)! Fortunately, I was able to automate the process a bit.
First of all, Randomno built a modified version of Ruffle for me that outputs the value of the RNG into the console whenever it gets called. This was useful for tracking when, how many times and how frequently Math.random() was getting called throughout the TAS, which wasn't transparent before. Using this information, and referring against the decompiled code of the game, I created a custom swf that simulated the game’s RNG as it unfolded throughout the TAS, making adjustments as necessary as I finished each day. This outputted the first 300 outcomes for which customers would appear, allowing me to quickly know how many extra RNG calls I needed to insert on the previous day. Thanks to this, I was easily able to deal with what threatened to be the most tedious and annoying part of the run.

Tricks used throughout the run

  • Customer glitch: Technically not a glitch, this refers to a technique that allows the player to spawn subsequent customers very quickly. If the Order Station button is clicked twice while in another station, no-one is currently waiting to give their order, and the line of customers waiting to receive orders is 2 or less, the game will spawn the next customer after a few seconds. By doing this while the game is in the middle of a screen transition, we can spawn the new customer without actually going back to the Order Station, letting us spend more time on food prep.
  • Dough Station cutter order: For some reason, cutting out the donut shapes from right to left can sometimes save a frame over cutting them out from left to right. I don’t really understand why this happens, but where it does I take advantage of it.
  • Delayed donut fillings: The player is normally expected to put the fillings in the necessary donuts before dipping them in icing. By dipping the donuts in icing and waiting until the last few possible frames to insert the last filling, we can transition to the next area of the Build Station faster while still getting the desired points. This causes the toppings to look a bit strange, appearing slightly higher above the donut than they should after landing.
  • Absent donut fillings: If all 3 donuts are currently being iced, the filling nozzle will still attach to one of them at the bottom despite it not being there. This can save a bit of time in cases where we need to fill 2 donuts.
  • Equalised frying: When judging how well the player fried their donuts, the game prioritises having both sides of the donut cooked to an equal colour, and will deduct points if they aren't. To achieve this, sometimes I flip a set of donuts twice to avoid one side getting cooked enough to change colour. This loses about 11 frames of cooking time, but the score payoff is worth it.

Potential Improvements + Other Notes

The distribution of points is a little bit uneven throughout the run, with more points being allocated to customers on Days 2 and 3 than on Days 1, 4 and 5. It’s possible that a slightly more uniform point distribution might have resulted in a faster run. Overall though, I’m very happy with the end result after almost a year of working on it on and off.
Additionally, there are a number of graphical glitches throughout the TAS. Most notable are the jerky playback of the Papa Louie Arcade splash screen at the start, the slightly shaky Flipline Studios logo at the start, and the misaligned text in menus and the end-of-day cutscenes. As far as I know, there are no glitches affecting gameplay in this movie that can’t be done on the regular Flash Player.

Suggested Screenshots

(VI 11580)
(VI 17693)

Special thanks

Thanks to:
  • Randomno for making the modified version of Ruffle for me
  • Samsara for encouraging me to submit this
  • dolphindrewgames for his RTA world record of this category and general encouragement
  • Ruffle developers for getting more Papa’s games working in the emulator
  • TASVideos staff for always working to make the site a better place
  • AusSpeedruns and the8bitbeast for helping me showcase this to a wider audience earlier this year, and giving me the push I needed to actually finish this project
  • My high school IT Teacher for teaching us how to code in ActionScript 3. If I’d known it would prove useful for my TASing, I would have appreciated it more at the time.

Samsara: Claiming for judging.


TASVideoAgent
They/Them
Moderator
Joined: 8/3/2004
Posts: 15373
Location: 127.0.0.1
This topic is for the purpose of discussing #9270: InputEvelution's Flash Papa's Donuteria "Rank 5" in 10:56.27

1726513012