Kero Kero Keroppi 2 is a game released in Japan only. It features a frog who seems to have a really bad day: not only all his friends were kidnapped by some Wizard, but his dream of becoming a singer will never come true as he discovered that his singing skill kills. Literally. Thankfully he realised he can combine both of these problems into a single adventure by defeating Wizard's minions with his bad voice, saving his friends and becoming a local hero.
Made in FCEUX 2.2.3. This movie beats current publication by 2723 frames.
FCEUX was used instead of BizHawk due to much better performance of FCEUX in general and TASeditor in particular. While emulation accuracy is usually the main criteria when choosing an emulator, this game behaves almost the same on both emulators. BizHawk adds 3 lag frames on one of the loading screens and also times movie length on the frame next to the one with last input, while FCEUX counts the last frame the frame with the last input. This allows the run to be portable between emulators so the one with much better performance was chosen.
EZGames69 kindly provided BizHawk version 15 seconds after the movie was submitted. It can be found here.

Tricks

Boosting

The character starts to accelerate when you press right or left and reaches a peak speed of 1.5 pixels per frames. The game tracks your position in both pixel position and subpixel fraction. There are 3 bytes total: 2 for position and 1 for fraction. When the button is released, the character decelerates and comes to a halt.
The sole reason this TAS was made is the bug with deceleration midair: when move button is released midair, it sometimes causes you to move for a speed of 2 pixels per frame for a short time. In casual play, this results in many frustrating deaths because the game has many small platforms which are hard to land on and it is natural to let go of the button to avoid overshooting... and overshoot only more.
Under TASing condition this is however easily overlooked since in a TAS you usually never let go of movement buttons.
Now, I said that releasing the button _sometimes_ increases your speed. This is where things get funny... or messy, depends on how you look at it. The boost can only happen if the lesser byte of your position has value that is between 0x00 and 0x7F. When jumping and releasing movement button, the subpixel byte gets messed up and is assigned some strange values. Furthermore, the speed has absolutely nothing to do with the boost. You can have the speed of 0.5 pixels per second but move 2 pixel per second anyway. Between the aforementioned values subpixel byte is assigned a value below 0x7F and it then ticks down by 4 every frame. When it underflows, the boost ends.
When the underflow happens, you can tap right for a frame to reset this byte above zero again and keep boosting. When the button is pressed, you move 1 pixel for that frame since 1.5 pixels per second is moving 1-2-1-2 pixels on consecutive frames.
Logically you would want to perform the boost on the earliest frame - the one with 0x00 X byte value. But the subpixel is assigned in some odd way. On my tests, it turned out that starting the boost too early causes the byte to misalign next button presses and the totaly amount of right being pressed will negate the gain of early start since frame with R pressed is at speed of 1. Of course you cannot start way too late too since you want the boost to be long.
The optimal starting frames seems to be around when X byte is 0x20. Since the boost is not set in stone, it is possible to slightly delay or start the boost earlier without losing frames, but that does not always works.
Another thing to mind is that the game is not just about boosting - we still have platforms to jump on. but since the boost is limited to airtime, we want to time the presses in such a way, so that when we can't make the boost for the duration of a single jump, we should time any landings on a frame before we underflow fraction byte and apply right button 2 frames before and a jump button on 1 frame before. That causes us to lose no frames at all.
The same is also possible to do with jumping on enemies, though one must carefully monitor the speed: when it sharply drops, it should be considered as landing and the same technique must be applied.

Impossible jumps

Now that we can move a bit faster for a lot of places, certain jumps that would need some waiting for platforms or enemies to jump onto can be made without waiting at all. This saves even more time.

Card games luck

The card games (which are basically boss stages) are challenges of pure luck during casual play. Of course since we are TASing this is something we can control.
The cards are generated when the level is started and do not change after that. So luck manipulation allows one to change layout of cards but only before the card level is actually reached.
Card games have 4 tasks:
First one requires you to find 5 chicken cards. No luck is involved since the few layouts that are present can be all cleared within minimal time.
Second one is Lucky Seven. You must find pairs of cards that are greater than the pair of cards the opponent finds. If your pair equals seven, you immediately win and get not 1, but 2 points. This is cleared really quick. This is also the only level in the game that is not faster that the current publication, although it is equally fast, not slower.
Third one is Rock-Paper-Scissors game. The cards always flip for fixed amount of flips and this amount increases by one every round. The only thing to manipulate is that if you need to select the lower card to win, it is slower by 2 frames than by selecting upper or middle one.
Fourth and final game is pair matching. You take turns with computer matching pairs. If the pair is matched, the winner keeps matching. Of course we match perfectly and never see the computer playing. This game is managed noticeably better than x2poet's publication due to much better layout with pairs being located right next to each other, allowing me to move the cursor and flip a card within a single frame.

Improvement comparison

Here is the table that compares my TAS to the current publication, x2poet's TAS. Note that x2poet's publication was done on a different version of emulator and does not syncs naturally due to different loading time in the beginning. About a hundred of empty frames in the beginning however is all it takes to sync. Other than that, I did not noticed any other differences.
The frame numbers represent the first frame after the level end when the screen totally fades to black, except the last level where the ending frame is the one with last input.
Levelx2poet's TASdart193SectionTotal
1-132322989-243-243
1-261275668-216-459
1-390238347-217-676
1-B1149010782-32-708
2-11439713461-228-936
2-21729216144-212-1148
2-32020018823-229-1377
2-B2240621029 0-1377
3-12531323724-212-1589
3-22821026419-202-1791
3-33111929102-226-2017
3-B3584533821-7-2024
4-13876036500-236-2260
4-24165639179-217-2477
4-34466741958-232-2709
4-B4572042997-14-2723
I used a small LUA script that helped me to boost at appropriate times for enough frames. It is located in my user files

Future improvements

I was pointed out by Blazephlozard that if subpixels are carefully managed, it is possible to boost earlier and save much more time. He did a playthrough of the first level and managed to save about 45 frames but found the task to be far from trivial. I, on the other hand, was not able so understand what exactly happens there: all my tries steal a frame or two instead of gaining any.
With a lot of free time and a huge patience it is possible to manually improve every level but only with a better understanding of boost mechanics. Furthermore, LUA scripting assistance is needed and even then a careful analysis is needed.

Special thanks and mentions:

  • Thanks to Spikestuff for temporary encode.
  • Thanks to EZGames69 for BizHawk conversion.
  • Thanks to Blazephlozard for pointing out possible improvements.

ThunderAxe31: Judging.
ThunderAxe31: This is the kind of game that appears bland, but actually has a lot going on under the hood regarding its mechanics.
Some new improvements have been found, however this won't be an issue for this movie for two reasons: first, because those were found after that this movie was already submitted, and second, because those improvements didn't prove this submission to be suboptimal anyhow. Additionally, I want to note that this submission aims to improve an already published movie, which was up to date with the known game knowledge available at the time.
The audience response wasn't very enthusiastic, so it's going in Vault like its precedessor. Accepting for obsoleting the previous movie.
fsvgm777: Processing. Zinfidel is handling the encodes for this one.


TASVideoAgent
They/Them
Moderator
Joined: 8/3/2004
Posts: 15601
Location: 127.0.0.1
EZGames69
He/They
Publisher, Reviewer, Expert player (4464)
Joined: 5/29/2017
Posts: 2762
Here is a bizhawk version of the movie: http://tasvideos.org/userfiles/info/64162581020056144
[14:15] <feos> WinDOES what DOSn't 12:33:44 PM <Mothrayas> "I got an oof with my game!" Mothrayas Today at 12:22: <Colin> thank you for supporting noble causes such as my feet MemoryTAS Today at 11:55 AM: you wouldn't know beauty if it slapped you in the face with a giant fish [Today at 4:51 PM] Mothrayas: although if you like your own tweets that's the online equivalent of sniffing your own farts and probably tells a lot about you as a person MemoryTAS Today at 7:01 PM: But I exert big staff energy honestly lol Samsara Today at 1:20 PM: wouldn't ACE in a real life TAS just stand for Actually Cease Existing
CoolHandMike
He/Him
Editor, Judge, Experienced player (896)
Joined: 3/9/2019
Posts: 701
Meh borderline No on entertainment. It is a barebones platformer for younger kids with long minigames in between levels. Good improvement though.
discord: CoolHandMike#0352
dart193
He/Him
Player (35)
Joined: 1/20/2013
Posts: 63
This was not supposed to go anywhere beyond vault tier anyway, so I do not expect anyone to actually find this entertaining. It was that the improvement found during casual gameplay was too tempting not to try in TAS. Did not expect initially to actually shave off that much.
Blazephlozard
He/Him
Banned User
Joined: 2/27/2013
Posts: 175
Location: Ohio
I love to see a seemingly simple game end up having interesting movement quirks. I have to get to bed, but, there is a little more to optimizing the movement here. Your lua is nice but I found something it's lacking is a "diff" display, as in, the amount that your X position has changed from the previous frame. Normally that would be your x speed, but during the glitchy boosts, your x speed doesn't properly reflect how far you go. Adding a diff made it easier to tell the maximum length of the boosts, and also if I was dipping below 1.5 when starting them. (I also changed to decimals instead of it being out of 256, "1.128" meaning 1.5 isn't my style) I did have the character sprite disappearing 2 frames earlier in level 1, yet it didn't save any frames on the Start press to go to level 2; possible frame rule? But I had only applied these techniques to the last few jumps of level 1, so there's potential if it's applied from the start. As an example, here when starting this boost, your movie has a frame of 1.164 difference, in between a 1.5 and a 1.984: If I just add an extra Right input the frame the jump starts, instead of 1.5, 1.164, 1.984... it's 1.5, 1.5, 1.672, 1.984... This ends up being .023 subpixels better. A small amount to be sure, but it adds up, and this happened to be a weak jump; in a different spot, when on the second jump of a boost section, I had a diff of 2.277 for one frame in place of the 1.672. (It's possible chaining as many small jumps as possible during the boost section could be valuable, if these 2+ diffs happen only then) I also tested letting go of R outside of the 20-80 area. If you oscillate R, you get very very slight subpixel increases in the diff from fd->20. I'm using Bizhawk so I changed your Lua to use read_s8 for signed bytes so this won't work in fceux but here https://pastebin.com/pZH2SSb6 this is the important bit:
XDiff = (X + (XSub/256)) - PrevX;
	PrevX = (X + (XSub/256));
I hope you're excited about this new movement development!!! I have a crazy idea for a Lua to help with keeping track of the best results for these jumps, since it's so SO tedious to compare "2822.996" to "2822.984" and what not. A table the size of the movie that keeps the highest X position it's ever seen on that frame, and colors your X position accordingly. (like green = new best, white = tie, red = slower than its seen before) And then you could try different patterns of Right inputs or jump heights and what not, then go to like, the 80+ area where the boost is done, and make sure what you just did is actually a better position just by seeing if the X is green. Would you be interested in that?
dart193
He/Him
Player (35)
Joined: 1/20/2013
Posts: 63
I have been playing with "subpixels", but when you jump and release move button, the value seem to be set to some completely unrelated value. I can even hardly call it a subpixel. For possible frame rule, I was unable to get any frames by jump boosting when the character can boost the last time behind the screen. For starting outside, I could probably have mistested something, but I mainly lose lots of frames by starting any earlier or later. The value that is assigned to subpixels seems to have nothing to do with actual subpixels. It just does not matters what the value is before, but the moment the right button is released, subpixel value seems to be set to some value that is exact same for any given X%256 coordinate, so I was not able to get any additional frames by optimising those. Furthermore, sometimes better subpixels seemed to cause frame loss on many jumps which require precise landing. When you jump, but need to land on the ground during boost period, you seem to get the most benefit of the boost ifyou time your landing so that it corresponds in certain way to R button press that you would normally do. This is usually done by holding A for 4 frames. Touching the ground screws up subpixels by setting them to a certain oscillating value, which seems to lose them. For what X%256 corresponds to which subpixel value set when jumping, it looks like it is X%256 itself with some variation depending on previous airtime. When boosting, if subpixel is less than 80, the speed seems to wrap around and cause character to move 2px per frame. If it is more than that, then its 1px per frame. When the value goes like 08-04-00-FD, underflow makes you lose that boost. When the ground is touched, if R is not held, major speed loss occurs. In 3-1, there is a single noticeable "bump" (actually slowdown, not complete halt). You can avoid that bump by trying to manage subpixels - and arrive to the exit one frame later. Moon logic. I was not able to improve the movie so far - some more testing of X subpixel is needed to better understand that, but in my opinion it needs asm debugging of movement segment. Unless I miss something totally obvious.
Blazephlozard
He/Him
Banned User
Joined: 2/27/2013
Posts: 175
Location: Ohio
Don't worry, I'll apply my idea to 1-1 and we'll see how much it saves. It'll take a few hours probably, and this isn't even a complex stage, so full application can wait for a future submission, subpixel optimization is not reject worthy if its too much trouble. Your work here is great and I'm glad you could improve this game that much!
Blazephlozard
He/Him
Banned User
Joined: 2/27/2013
Posts: 175
Location: Ohio
I managed to save 48 frames on Level 1 (it's for BizHawk, sorry...): http://tasvideos.org/userfiles/info/64225007208212901 Here's an updated version of the Lua with the "best ever xpos" idea implemented, it and the xdiff helped a lot in finding the best movement patterns: https://pastebin.com/5TRJvmwt One small save was actually at the very start of the level; pressing Right before the lag frames at the start of the level does get read, and begins your initial acceleration a frame earlier. The oscillation idea wasn't needed, because it seems like the distance you gain from it accumulates if you don't do it (like oscillating gets you 1.512 instead of 1.5, but if you hold off, you'd get 1.524, hold off again 1.536, etc). So the first frame you let go in midair, you get all of that accumulated distance regardless. I also didn't get anything out of extra Right presses after the jump. I mainly improved the distance just by starting the boosting at 0x08 instead of 0x20. It does take more Right presses, but any frames where you can move at higher than 1.5 is worth it. This saved a few frames on every boost section. But I think this would fall under "laboursome optimizations that can't actually be noticed under normal viewing conditions". I certainly felt laboured going at this first level for a few hours. For the strategy used, the play is not sloppy at all, and I would say it should still be published. (Though if you're not interested, a V2 is going on my eventual projects list...) My advice for the future is to have a very readable way (through Lua) of telling how much distance you're traveling if 'xspeed' is unreliable, and when it comes to moving at speeds higher than a speed cap, don't dismiss brief bursts in favor of longer stretches, any speed increase can be useful.
dart193
He/Him
Player (35)
Joined: 1/20/2013
Posts: 63
Strange. When I tried to apply boost earlier, I got much more presses after 0x20 so that it turned out slower by 1-3 frames. That was mainly due to different subpix values being stored when boosting. Right now, I am in the middle of low level computer programming learning. After this is finished, I plan to check source code of how exactly this value works. Right now I plan to leave the movie as it is, also because I have problems with TAStudio in Biz which I initially planned to do. Also sudden lack of time. If you want to improve the TAS by making movie of your own, that is not a bad idea at all, you definitely inderstand what happens under the hood of this game better.
Blazephlozard
He/Him
Banned User
Joined: 2/27/2013
Posts: 175
Location: Ohio
Whenever you're free months from now, I would love to co-op an improvement with you, so you can understand my input too! You have a much better understanding of what's actually happening 'under the hood', I just thought of a better way to view x distance really. For instance, I totally see what you mean about the boost ending once the subpixels roll over. The frame that subpixels go from say, .012 to .996 is the frame you need to press Right again. I didn't pick up on that at all, and I wonder if an even better boost pattern is possible if those nuances are fully understood, possibly by reducing movement on the ground to speeds lower than 1.5.
Editor, Reviewer, Skilled player (1360)
Joined: 9/12/2016
Posts: 1646
Location: Italy
Are there any news about improving this submission? Shall I set the status to Delayed?
my personal page - my YouTube channel - my GitHub - my Discord: thunderaxe31 <Masterjun> if you look at the "NES" in a weird angle, it actually clearly says "GBA"
Blazephlozard
He/Him
Banned User
Joined: 2/27/2013
Posts: 175
Location: Ohio
I'm not actively interested in improving it right now and dart's said he's busy for a few months. I suppose delayed is better than having a new submission later. It's definitely on my shortlist and it's only a 12 level game, though it'd likely take a good week or two working on it to try to squeeze as many pixels out as possible.
dart193
He/Him
Player (35)
Joined: 1/20/2013
Posts: 63
I still do not expect good deal of free time anytime soon nor I properly understand what exactly happens there to improve this.
Zinfidel
He/Him
Player (206)
Joined: 11/21/2019
Posts: 247
Location: Washington
Post subject: Movie published
TASVideoAgent
They/Them
Moderator
Joined: 8/3/2004
Posts: 15601
Location: 127.0.0.1
This movie has been published. The posts before this message apply to the submission, and posts after this message apply to the published movie. ---- [4235] NES Kero Kero Keroppi no Daibouken 2: Donuts Ike ha Oosawagi! by dart193 in 11:55.46