Tool-assisted game movies
When human skills are just not enough

Submission #6483: dart193's NES Panic Restaurant in 13:12.7

Console: Nintendo Entertainment System
Game name: Panic Restaurant
Game version: USA
ROM filename: Panic Restaurant (U) [!].nes
Emulator: BizHawk 2.3.2
Movie length: 13:12.7
FrameCount: 47640
Re-record count: 319768
Author's real name: Vitaly Sidorov
Author's nickname: dart193
Submitter: dart193
Submitted at: 2019-08-13 23:02:46
Text last edited at: 2019-08-26 17:40:18
Text last edited by: dart193
Download: Download (12603 bytes)
Status: published
Click to view the actual publication
Submission instructions
Discuss this submission (also rating / voting)
List all submissions by this submitter
List pages on this site that refer to this submission
View submission text history
Back to the submission list
Author's comments and explanations:
Panic Restaurant is a game about chief Cookie trying to take back his restaurant from evil Oh'Dove. Mutated food now runs all over the place so chief Cookie must fight it using various cooking tools.

Made in BizHawk 2.3.2, but should sync on 2.3.0. This movie beats current publication by 910 frames.
NOTE: due to the bug in the BizHawk 2.3.2's rerecord counting algorytm, the rerecord count is highly inflated and should be ignored.

BizHawk with NesHawk was used. Previous publication uses FCEUX. I tried to recreate the run in FCEUX up to level 5. It seems that there are more lags in FCEUX, but even with no edits, except inserting empty frame on every additional lag, this movie is still far ahead of current publication. Also, due to this, RNG cannot be synced, but it does not affect comparison at all, since RNG is easy to manipulate. The actual lag difference is noticeable in level 2. This level is 26 frames faster in BizHawk, but other levels are mostly of equal length, just with different lag placement.

Stages are numbered X-Y, where X is an in-game level number and Y means a section that is separated by a door.


Comparing to the currently published Aglar's run. Numbers in parentheses show total improvement over the course of the movie.
  • (002) Saved 2 frames on menu screen by better manipulating input.
  • (007) Saved 5 frames in 1-1 by completely avoiding lag.
  • (012) Saved 5 frames in 1-2 by better lag reduction.
  • (017) Saved 5 frames in 1-Boss: 2 by landing last 4 hits earlier and 3 by completely avoiding lag during coin drops.
  • (019) Saved 2 frames by more menu manipulation between stages.
  • (041) Saved 22 frames in 2-1 by reducing lag better and optimizing movement in vertical section.
  • (164) Saved 153 frames in 2-2 by reducing lag in general, optimizing ladder movement, killing additional enemy before the door which greatly reduced lag on that screen and ignoring one of the enemies completely.
  • (219) Saved 55 frames in 2-3 by skipping super weapon, killing more enemies and managing lag better in general.
  • (221) Saved 2 more frames by manipulation menu again.
  • (237) Saved 16 frames in 3-1: 7 by optimizing second ladder movement and 9 by lag reduction.
  • (307) Saved 70 frames in 3-2 by killing more enemies and picking up more coins.
  • (325) Saved 18 frames in 3-3 by managing lag better.
  • (390) Saved 65 frames in 3-4 by killing more enemies.
  • (396) Saved 6 frames between levels again.
  • (413) Saved 17 frames in 4-1 by better choice of which enemies to kill.
  • (424) Saved 11 frames in 4-2 by better lag reduction.
  • (487) Saved 63 frames in 4-3 by killing more enemies and collecting more coins for lag reduction and also performing additional jump off the table in the vertical section.
  • (506) Saved 19 frames in 4-4: 12 by lag reduction and 7 by movement optimization on last chain.
  • (514) Saved 8 frames in 4-5 by reducing lag.
  • (515) Saved 1 frame in 4-Boss by removing lag.
  • (518) Saved 3 frames in the menu for the fifth time.
  • (533) Saved 15 frames in 5-1 by skipping fork weapon.
  • (659) Saved 126 frames in 5-2 by reducing lag in general and particularly reducing lag before moving platforms by idling on certain frames to minimize waiting for them.
  • (693) Saved 34 frames in 5-3 by better plate throwing choices to kill enemies faster and reduce more lag as a result.
  • (743) Saved 50 frames in 5-4 by totally avoiding waiting at the moving platform and quicker kill of ice cream near freezing spikes.
  • (746) Saved 3 frames in 5-Boss: 2 by always hurting the boss on the first possible frame and 1 by removing lag completely.
  • (750) Saved 4 frames in the menu for the last time.
  • (757) Saved 7 frames in 6-1 by better fish manipulation.
  • (810) Saved 57 frames in 6-2 by changing enemy killing strategies.
  • (859) Saved 49 frames in 6-3 by lag reduction.
  • (884) Saved 25 frames in 6-4 by lag reduction again.
  • (903) Saved 19 frames in 6-5 by lad reduction for the last time in the TAS.
  • (910) Saved 7 frames in the Final Boss Oh'dove by landing fourth hit earlier.


When the menu, which shows progress through the game, starts to appear, alternating A and B allows to skip it much quicker than if one would just press start twice when it has visible effects.

By manipulating the Y subpixel position, it is possible to make the character jump 1 pixel higher. Used on elevators to jump off 1 frame earlier.

When the character attacks on the ground, he isn't moving. But when he is airborne, he keeps moving without losing a single frame. This is used everywhere.

Killing enemies decreases lag, but the character hitting animation creates lag. As such, it is important to determine on which frame to attack to have minimal lag or to attack at all.

Jumping at certain frames decreases lag.

Holding up and down at the same time after the character crouches glitches the character sprite with no other effects. Used for entertainment only, as it does not waste time, although it can affect RNG and cause later lag if not monitored.

Dead enemies create less lag than alive ones, but attacking creates lag. So when killing enemies, the attack should be started at the last possible moment to minimize lag. If it is a plate weapon, it is the other way around (first possible moment).

Stopping for a frame before a lag frame usually just delays that lag frame. However, sometimes it deletes it completely (and sometimes even more than one), so the net gain is 0 frames (or 1, if lucky). But as the frame is not lag, it processes enemies and animations. In the case of dead enemies that are still onscreen, this allows them to die quicker and possibly save more lag frames. On levels with entities based on global timer where you have to wait for them, such lag frame exchange always gains frames as long as you are able to make it in time for the current cycle.

Moving back for a frame sometimes clears lots of lags. Discovered that purely by accident when I misclicked on the piano roll in TAStudio and saved 5 frames.

Taking items reduces lag because items are sprites.

Different amount of coins at the end creates different lag at slots machine before it can be skipped.

On lag heavy sections, it may be better to wait a few frames to pick up a coin than to just run forward and leave the coin behind.

The game lags when the screen scrolls horizontally. The game lags even more when it scrolls vertically. While the former is not a problem, due to the latter, jumps in vertical sections are optimized to minimize unnecessary screen scrolling. But sometimes more scrolling is performed to allow certain enemies to spawn early so that no waiting is needed when they are encountered.

Touching ice floor forces the game process X subpixels, increasing lag. When not sliding downward, it is less laggy to jump continuously.

It is actually possible to jump from spike floor if you jump 2 frames before the character touches the spikes and dies.


It took me 81 hours to create this TAS.
  • 2 hours for getting used to BizHawk's TAStudio and making it past the title screen and menu.
  • 6 hours to complete the 1st stage.
  • 30 hours to complete the 2nd stage. Of them, 6 hours was spent on a small 300 frame fragment which was an extremely laggy section. Several hours were also spent in trying to incorporate an improvement that was found later in the run, but it did not work due to heavy lag going completely off-sync eventually nullifying gains.
  • 12 hours to complete the 3rd stage.
  • 12 hours to complete the 4th stage.
  • 13 hours to complete the 5th stage.
  • 6 hours to complete the 6th stage.

Memory addresses

Address Name Type
006E Character X Signed word
006D Character X subpixel Byte
007B Character X speed Signed byte
007A Character X subpixel speed Byte
0071 Character Y Signed word
0070 Character Y subpixel Byte
0078 Character Y speed Signed byte
0077 Character Y subpixel speed Byte
00AD Boss health Byte
00B4 Boss invincibility timer (location 1) Byte
00B6 Boss invincibility timer (location 2) Byte

Stage by stage comments:


The title screen and the cutscene can be skipped by pressing start for a frame. No other additional buttons change the time it takes for the game to reach the level menu.

On the level menu, you can press A or B instead of start for skipping. You can press one of those buttons when menu starts scrolling to scroll it to the right immediately, and then another press to proceed to the game.

However, if those buttons are pressed alternatively from the frame the menu fades in up to the moment it fades out, it can be skipped about a second faster. The current publication only holds start button. Using A then B for the duration of the menu allowed to save few frames on every menu screen.

Level 1 - Appetizer

In the first section, all lag was avoided. I tested if it is faster to finish the level with the default weapon, but in the end I was able to save 4 more frames with the spoon from lag management, so the spoon is taken.

In the second section, I wasn't able to avoid the last frame of lag, but otherwise it went smooth.

The boss was killed a few frames earlier. After the first two hits, the boss goes out of reach. Instead of hitting the boss on the first frame possible, I delay damage by 2 frames since the boss freezes midair after the third hit. This allows last three hits to be landed as fast as possible. Otherwise, it takes too long for character to jump again and attack the boss. I also show off the glitched sprite a bit after killing the boss.

Level 2 - Soup

In the first section, there are many places with 3 or more enemies on-screen. They create lots of lag. Some lag was reduced by hitting enemies and jumping at certain frames, and some by attacking sooner or later. A few lag frames were removed by not moving right for a frame, but it did not reduce the frame count in general. In the elevator, I try to avoid doing anything that creates a frame of lag, so I could not entertain while waiting. I jump in the elevator in the end to get off it as quickly as possible. The same is true when moving onto the ladder. This is where subpixels come into play: having the correct value makes it possible to exit the elevator and enter the ladder 1 frame earlier. I skip the bonus since it takes about 1000 frames, but it puts the player literally next door, which is just much faster to walk through.

In the second section, in the part with shelf, it is less laggy to take the lower path, especially if candy is taken, but bumping tables results in being about 1 frame slower overall. The upper part must be done frame perfect: when jumping on the shelf, if you are 1 frame slower, an apple piece will hit the character and this piece cannot be killed without stopping for too many frames; I was able to get past the apple unhurt. The second apple cannot be hit no matter how hard I tried, but the apple would not hurt when jumping. Since I could not kill it, I had to move past it. Before those apples, when killing a monster, I hold left instead of right for a frame. It greatly decreases lag here for some reason. I jump madly before elevator to adjust subpixels. It allows me to enter the ladder a frame or two faster than Aglar's run. Then, there is the first unskippable obstacle: chandeliers which shoot electricity. You have to not to move right for 13 frames and make a high jump to get past it the fastest. Also, it is possible to move under some apples unhurt, which is faster than trying to kill them. In the last vertical segment, since the candy is a sprite object, I take it and decrease lag. Then comes the big time saver: initially, I turned left for a frame while attacking to kill a second onion enemy which saved about half a second. Since I must kill a third onion or it would hurt me as I try to get to the door before he loses his stun, I need to wait a few frames for my second attack to land on him instead of the other way around. As such, turning left to kill the onion did not waste a single frame at all. After that, I found out that it is possible to simply jump over third onion and reach the door without hitting it. It saved 5 more frames. Killing the second onion and then jumping over third one saved 2 more frames.

In the third section, I skip the spinning pan weapon since it is active constantly and generates lag all the times. Managing lag with normal pan is easier. I kill two additional puddings in vertical sections: combined with a jump that minimizes scrolling while it dies, the first pudding there creates almost no lag. The first pudding in the group of three contributes more lag if left alive, so I kill it too. On the shelf, the lower route with a spoon is slower by 5 frames: some frames must be wasted bumping the shelf because even using highest jump, the character does not have enough speed to avoid stopping for a few frames. Killing pizzas also adds some lag. As such, it is just a bit slower than the upper route. The spoon weapon was initially thought useful to kill the boss faster. Indeed, it is possible to land a first hit 7 frames earlier than with a pan, but the oven jumps out of reach and gets back in after its invincibility wears off. Since pan and spoon attack on same heights, the only thing to speed up the battle is to enter it earlier. So I take an upper route.

The boss again jumps out of reach, but this time its movements are not affected by damage at all. There were no frames saved during the battle.

Level 3 - Salad

In the first section there is nothing much to mention except for one omelet that requires slowing down. Lag in the section was quite small after the lag heavy level 2; this was quite a breather.

In the second section things get more interesting. Most of the enemies are killed at different frames than Aglar's run. Sometimes this outright reduces lag, but many times it was done to spawn a coin closer to me so that I can pick it up instead of leaving it behind. Most notably is right after the first conveyor belt. I also killed more enemies. One VERY notable thing is that I moved so fast through the vertical section, there was a glitched enemy that was not supposed to be there with a glitched sprite. It had the AI of a sausage. Sadly, it created lag, so I had to manipulate input to avoid this enemy. Also, I get hurt trying to walk through the flame without waiting so much, but I still had to wait to be able to get hurt from the cup snail. If you touch the flame, you first get a long burning animation, and only after that you get your standard "hurt bounce".

In the third section, there is a ladder to the bonus that puts player in the beginning of 3-4. It is slower by about 40 frames, so I avoid it. I pick up the candy to replenish health because the pot lid is on a timer and it does not waste time doing so. I then damage boost again to skip a ladder. Taking the ladder is slower by about a second.

In the fourth section it is quite faster to avoid killing toasters, until they start spawning toasts, which lag heavily, so I kill every enemy and save lots of frames. I have to waste 2 frames on the bubbling section because I got there so fast that bubbles were 2 frames too late to make the last jump, but 2 frames too early to land on new bubble without slowing.

The boss is a lot easier to TAS since it is always in reach. The only thing I need to ensure is that I land first hit on the first frame possible and the rest of the battle is easy. I only need to adjust input to avoid enemies falling on my head. Also, since the area is not flat, you don't need to run to the right to start the fade out animation, which allows me to collect all coins to minimize lag. I got really lucky to have no lag frames during the slots fade in.

Level 4 - Fish

In the first section, flying skewers are a nuisance, but they don't create as much lag as enemies in 2-1. In the vertical section, I make sure to move up as fast as possible.

In the second section, there is really nothing much happening. On the vertical section, I thought of taking the second chain to kill more enemies to reduce lags, but as it prevents horizontal movement for several frames, it turned out to be about 10 frames slower in general, mostly because there is a long and a very fast drop which quickly makes enemies go offscreen.

The vertical segment in the third section was redone around 4 times, not counting branches. Initially I made a mistake jumping onto the first chain. As I tried to resync the rest of the segment, I noticed that it does not work because the enemies are a few pixels off. Then I realised why and how can I use this on remaining enemies and redid this from scratch. As I did, I accidentally was able to pick up one more coin, which reduced several lag frames. Redoing again, I was able to pick up even more coins reducing even more lag. On my "final" watch, I just noticed that table after the first chain. A new idea struck me: what if I jump onto the table and then to the chain instead of straight to the chain? Redoing the run once again, it turned out to save even more frames. As a result, I initially saved around 20 frames. After all redones were done, it is now more than a second of savings.

I had massive troubles beating Aglar on the fourth section. Initially, I thought that I will just copy his input, but it did not work at all. Then I realised why he was faster than me in the beginning and adjusted input to reflect that. I was able to save 6 frames right away. This led to enough motivation to save even more frames in the vertical segment. The vertical section was a real race. I seem to be slower than Aglar in one place then immediately gain more frames than lost in the next. The lag totally did not want to cooperate, but I was able to tame it enough to save 1/3rd of a second here.

The fifth section was brief, but there was enough laggy moments to find some optimizations.

The boss battle is a bit tricky: while bosses do not hurt chief Cookie when flashing, this boss' top and bottom parts always do, so some care is needed to avoid being damaged. Of course, under a TAS environment, this does not actually adds any challenge, so the battle is finished swiftly.

Level 5 - Meat

When I did 2-1, I thought that it was a total nightmare. But 5-1… It seems that in the past developers thought that a game must contain an ice level. And level 5 is an example of this. The level is quite hard in the normal gameplay, but TASing it… By some unknown reason this level lags critically much. In fact, the first section of the level contains more lag than the whole levels 1 and 2 combined together. The majority of the lag seems to come when chief Cookie touches the floor. The game is now actually forced to apply horizontal acceleration and it seems that NES can't keep up. Another difficulty is that there are a multitude of choices to do: different weapons, and for plate weapon - totally different timings for attacking. I have almost given up TASing this game due to this level, but I just could not let 8 seconds of accumulated savings go to waste.

In the first section, we start with the horizontal segment, as usual. But we are on ice right away. The beginning is not too bad, but after you jump 2 spike pits, the lag festival starts. Aglar's movie takes the fork that is located over one of the pits. It seems to have more sprites, but in this level it does not really add much lag. Since the fork always jumps, it avoids horizontal acceleration from ice, which actually saves lots of frames over walking with the pan. But after the ladder, before the plate is forced to be taken, it is a bit slower for a few reasons. The level is quite bad on lag but Aglar actually managed to fare pretty well here. I was unable to repeat him and resulted with fork being about 20 frames slower on the first segment, but I would still save some frames later and break even with him. But that would just not satisfy me. Then I realised that if you jump on the ice with pan/plate, the lag is decreased quite a bit. I redid the horizontal segment with it and my best for the pan was 15 frames faster than my best with the fork. It was still few frames slower than Aglar, but having pan, the first ladder and first slope in the vertical segment were much faster and I was ahead by about 5 frames, which was satisfying. I did everything I could to minimize lag here and in the end I was about 10 frames faster before taking a plate.

In the vertical segment you have a choice of taking the plate weapon or not. Plate is a ranged weapon and is quite good on reducing lag. I tried the pan route, but it turned out to be 40 frames slower, which would completely nullify any efforts. Also, with the plate, the boss could be hit much sooner and easier, so long-term predictions for pan were horrible. The drawback of the plate is that the actual attack does not happen the next frame you press B, but with a 10 frame delay which makes jump attacking in cramped space really difficult. But here comes a useful property of the ice: if you attack while sliding down on ice, you maintain your velocity. This is used several times. Generally when I have to use this mechanic, I build up as much speed as possible to slide faster, but when there is a lot of lag, it is faster to attack on the first possible frame where the plate would land on an enemy. The flying plate creates quite a bit of lag, but it always clears more lag than it creates. Another annoying thing is ice mist. It is created in small gaps and is very difficult to pass quickly. I have to wait a bit there, and I also need to jump, so I combine the two, but it is not so obvious. However I still manage some frames here and there. Also, it is normally faster to make a longer jump before falling down to maximize vertical speed, but since we have a vertical scroll in an ice level, the amount of lag created from longer jumps totally destroys any gains. After testing, I found out that the best way to jump is to jump on the first frame where you are no longer on the slope and hold jump for about 6 frames. As a treat for my work, the bottom of the section is a simple walking to the right. If only the whole level was like that… Well, this TAS would not exist then, so lets hold on and keep going.

In the second section, I seem to waste a lot of frames before moving platforms. This is done to decrease lag count to allow the timer, which controls platforms movement, to tick. Since we have to wait at those platforms, it ends up saving almost 2 seconds. After that, I make sure to kill all the ice creams on the spike ceiling part so that they drop coins to the right instead of on the first frame possible, as Aglar did. This allows me to collect coins and kills lots of lag as a result. In the vertical section, I kill legged ice creams on the first frame possible except for the second to last, which is faster to kill after jumping again instead of while falling on the ladder.

In the third section, it is important to kill enemies fast. Killing fishes produces several lag frames, but when left alone, it is actually quite "harmless". I delay killing the last skating ice cream because we have reached the end of the section, meaning that there is no more scrolling (which is the main reason of lag). Also, I kill it in the door frame so that it turns into coin as fast as possible, which avoids any lag related to its death completely.

In the fourth section, I was able to just barely (single frame precision) get on the moving platform and jump over the ice cream. This completely avoided waiting here. Otherwise, this section is actually quite easy since there are only 7 frames of lag (Aglar got 6, but I could not manipulate lag on the last 2 ice creams, so I got 7).

The boss would be quite troubling if we did not have throwing plates. Thankfully we do. We can hit the boss very early with them and the boss is always in reach.

Level 6 - Dessert

In the first section, the only segment that is somewhat nontrivial is the fish jumping from the waterfall. I manipulate RNG so that I don't have to kill any fishes, which reduces several frames worth of lag. Also, I optimize ladder movements.

In the second section, we meet the fried potato shooters. These guys have a somewhat difficult pattern, but worse than that - they shoot potato sticks, which makes it difficult to proceed forward without getting hurt. They get destroyed by plates, meaning that they effectively block the actual shooters and create lots of lag, especially when there are several shooters onscreen. I tried my best to destroy these guys as fast as possible with minimal lag, and it saved almost a full second.

In the third section, the horizontal part is quite trivial with only a few lag frames, but a vertical one is more difficult. We have to lose our plate weapon to spoon weapon, but this level is not too laggy, so this is not a big deal.

In the fourth section, there are quite a few fried potato shooters in the vertical segment. However, thanks to ladder placement, we are able to get through this section really quick.

In the fifth and final non-boss section of the game, there is mostly lag management. It was tough here, but level 5 and area 2-1 were tougher.

The cutscenes do not seem to be skippable.

The final boss is quite difficult to hit due to slippery controls, but I managed to hit it fast. It looks that this is the fastest one can do since the final egg cannot be thrown sooner - it is thrown from the highest position, and throwing it 1 frame earlier causes it to land on the boss from above while it is still invincible.

Potential improvements

It is possible to spawn a glitched enemy during the vertical section of 3-2 when moving too fast with certain lag. If causes of spawning are looked into, it may lead to heavy glitching, including jumping to credits. But it is only a theory, at this point of time, I don't have enough experience in TASing.

In 4-3, 3 frames are lost on the ladder, but it seems that this reduced lag more than by 3 frames. As such, it may still be possible to avoid more lag with no frames wasted on the ladder, or waste frames on other ladders and potentially save more lag. Slowing down in more places might decrease some lag too, but since the lag is hard to predict, this most likely will require a brute force script.

Elevators move on a global timer because they need to be able to move off-screen. So do a few other things. The timer ticks on normal frames but does not on lag frames. Reducing lag by standing still will advance the timer, reducing the waiting time at elevators, since you have to stand waiting for elevator anyway. By playing with this in lag-heavy level 2, it is possible to save up to 30 frames, but I discovered this at level 5. Trying to incorporate this improvement into the run, the rest of the level seemed to lag significantly more, nullifying the improvement. Future levels also completely desync. Deeper lag management is needed to properly maintain those savings and that requires redoing the whole run from scratch, which I did not have patience to do because the lag is even more random than the RNG. This can also probably be used in 3-2, but the flame sequence is too tight to get much savings. It seems that waiting the only creates lag. In 3-3 there is only a single frame of lag, so it can't be used there.

Special thanks and mentions:

  • Thanks to Aglar for advising me to try beating his TAS for my first TAS and for the TAS itself since I had something to compare my TAS to.
  • Thanks to Sidetrakkd from speedrun.com for his speedrun since it contained a few sections done quite unexpectedly which helped with making my TAS.
  • Thanks to people in TASVideos.org Official Discord Server for helping me to get through the run.
  • Thanks to dad infinitum for helping with proofreading.

Suggested screenshot: 3291

Maru: Judging.

Maru: Replaced file with a header change.

Maru: Good improvement to the published run. Different strategies came together nicely in the end. While there are some potential improvements to this TAS (some of which were pointed out by the author in the submission text), lag often seemed to nullify the improvements. Lag seems to be quite inconsistent and difficult to deal with in this game, but lag reduction still accounts for a solid portion of this improvement. There is always the possibility of being able to reduce more lag, but that would require very exhaustive testing.

This is a good effort for your first TAS. Accepting to Vault as an improvement to the published run.

fsvgm777: Processing.

Similar submissions (by title and categories where applicable):