(Link to video)
Mari0 is Super Mario Bros. but with portals. It turns out the placed warp pipes weren't enough, so Mario grabs his portal gun and creates his own path through the levels.

Game objectives

  • Aims to complete the game as fast as possible
  • Pauses the game to save time
  • Uses gravity to go fast
  • Thanks gravity

Comments

Doing a normal SMB run of this game was long overdue, but optimization in this game turns out to be more difficult than expected. There was a previous (unsubmitted) attempt clearing the game in 01:11.92 or 4315 frames. This movie saves another 280 frames on top of that.

Route

The route is pretty simple: Enter the 1-2 pipes before they have fully loaded. This brings you to the minus world -1. Quit and continue the game from there, bringing you to 8-4 to finish the game.

Game mechanics

Portals

Portals can only be placed if there are two solid tiles next to each other. Once you shoot a portal, there is a 12 or 13 frame delay until you can shoot the next one.

Physics

Your running speed is capped at 9 tiles per second (the game runs at 60 FPS). The vertical falling speed is capped at 100 tiles per second. Using portals you can exchange X and Y speeds giving you up to 100 tiles per second horizontal speed (for reference, 1-1 is about 200 tiles long).

Optimizing this game

The most important part is preserving momentum. Getting high speeds but crashing into walls is pretty much always slower than lower speeds but smooth maneuvering (8-4 example). This is why optimizing this game can be difficult and, most importantly, unintuitive. A great challenge for a TASer.

Stage by stage comments

1-1

Obviously, using the pipe or any normal route would be too slow. So the basic strategy is to use a vertical portal loop to then shoot yourself out at high horizontal speed. This went through many iterations due to the amount of pipes at the beginning, limiting the horizontal speed to avoid bumping against them. The first attempt (video) intentionally slowed down to make the jump over the pipes. It gives you a speed of around 30, but it was no good considering the maximum speed of 100.
A way to get maximum horizontal speed would be to somehow get past the initial pipes while preserving high Yspeeds. Since maximum Xspeed is quite slow, doing it normally wastes too much time.
So the solution we found was converting jump Yspeed (~17) to Xspeed, preserving this Xspeed while doing the portal loop (which is very difficult with the 12-13 frame delay of portal shooting), and then jumping over the pipes with a single jump. This barely makes it over the pipes, and then barely makes it in time before the level timer turns to 386 giving you fireworks (~2 frames).

1-2

The goal in this level is to get into the warp zone pipes without them being fully loaded, meaning the camera is not allowed to scroll all the way to the right.
The first problem, again, is gaining Xspeed to get to the end of the room. Spawning in the air and dropping down immediately is helpful in gaining speed. Going through the level at a high Xspeed is the biggest challenge. We tried getting both a high X and Yspeed and clipping through the ceiling. But it turns out that gaining Yspeed with a very high Xspeed is basically impossible.
That route was quickly obsoleted by a simpler strategy of going through the level normally at a slightly higher Xspeed. The koopa limits the speed since we have to let him fall through a portal so he doesn't get the way. We didn't find any faster strategies, so this is what we ended up with.
The second problem was to somehow quickly clip into the warp zone room without the camera moving too far to the right.
It was time to blindy try out a lot of things.
It's kind of expected that high Yspeeds tend to make you clip into the ground. This way we can get into the ground in front of the pipe before the warp zone. Getting into the warp zone room this way is very slow due to the distance.
However, being able to clip into the ground opens up the possibility of simply clipping through the ceiling above the warp zone. Except clipping is not possible on one-block ceilings. In other words, you can only clip if you have a "ground" to land on underneath the blocks. This means you can clip into the ceiling to the left of the warp zone room. The problem is the sophisticated setup. It was the route in the previous movie mentioned above. Getting enough downwards Yspeed (and proper positioning) while having at least some Xspeed takes a lot of portals and a lot of time.
At the top of the exit pipe, a tile is missing. You can get a mushroom and squeeze into the missing tile, decreasing the distance you need to move compared to the clip under the pipe. But redoing 1-1 to get a mushroom and then clipping is a few frames faster than the method in the previous movie, but comes with problems of being big in 8-4, possibly losing more frames than it saves (getting hit already wastes too many frames).
This movie ended up with the stategy of tricking the camera to scroll towards the beginning of the level and then use portals to get into the warp zone room offscreen. We are just barely able to place a portal on the rightmost wall without the warp zone activating. We need to move quite a distance back because the camera catches up at a speed of 100, which is quite fast.
The final solution is making the piranha plant spawn as soon as possible, and then use the camera scroll trick to get into the pipe.

-1

Entering the warp zone before it is activated brings you to the minus world. Suspending the game from here and continuing from the menu will put you into 8-4 (through an intended easter egg!). The most interesting part here is that the menuing input is all done on a single frame:
esc down return kp_enter up space
Pressing keys in this order will pause the game, put the cursor on the Suspend option, activate the option, put the cursor on the Continue option, and activate the option... all on the same frame.

8-4

The first room is very straightforward.
The second room went through several iterations, an example shown above [dead link removed]. The biggest problem here was how fast the piranha plant spawns once it's onscreen. The previous movie makes a loop to despawn the plant and have enough speed to make it the second time. This movie skips making a complete loop by slowing down enough to make the jump. It ends up looking very simple, but being slow enough to actually land on the pipe instead of flying over is easier said than done.
The third room is interesting. The delay before being able to shoot another portal is 12 or 13 frames. The actual value is 0.2 seconds: a floating point value. The game subtracts the frame durations from the delay variable, and 12 frames of 1/60th of a second can result in the subtractions passing 0, or not passing 0. It's simply floating point errors. However, sometimes it's necessary to place another portal in only 12 frames, so a 1 frame pause was used to make the game use a different frame duration value to subtract.
The fourth room, a water room. The initial idea was doing another portal loop to speed through the room. But the gravity is so low that it actually takes a while to speed up. The room has a small size where speeding up too high actually loses time. For example, speeding up to 15 speed makes the room slower than speeding up to 20. All good, makes sense. But it's not worth it to speed up to, say, 40 when you're already at 30. It simply doesn't save enough frames at the end.
The sweet spot is somewhere at 24 speed.
But of course, swimming along the ceiling and using portals to quickly get through the room is just way faster.
The fifth and final room uses a quick setup to end input as soon as possible. The hammers of the Hammer Bro and the fire of Bowser are based on a global RNG, but it can be manipulated in other rooms with the portal particles.

Comments by the authors

Masterjun

Mari0 is a cool game to optimize! I like the resulting movie.

lexikiq

Thanks Mari0 for introducing me to TASing :) Was a lot of fun to work through the puzzles of every room (then getting my times optimized by Masterjun)

dwangoAC

I kicked off the process of seeing if it was possible to get libTAS working with this game as part of getting it at GDQ but I admit that lexikiq and Masterjun took the ball and ran with it after that. I probably only have a few frames of input left at the very beginning of the run but I'm honored to be listed as a co-author. Thanks to everyone else who helped make this possible, including the devs on both the libTAS and the Mari0 side!

Suggested screenshot


feos: Judging...
feos: Replaced with a movie that has reproducible instructions. Input is the same.
feos: Replacing with a faster movie. It looks better now, and the feedback is good. Overall I admit that watching it frame by frame is way more entertaining than in real-time. Still overall enjoyable, accepting to Moons.
fsvgm777: Processing.

TASVideoAgent
They/Them
Moderator
Joined: 8/3/2004
Posts: 14776
Location: 127.0.0.1
adelikat
He/Him
Emulator Coder, Expert player, Site Developer, Site Owner (3581)
Joined: 11/3/2004
Posts: 4736
Location: Tennessee
Was entertaining to I vote yes. This game is complicated to optimize, wow.
It's hard to look this good. My TAS projects
Challenger
He/Him
Skilled player (1634)
Joined: 2/23/2016
Posts: 1033
Another incredible run for this week! Yes vote. Very very speeeeedy game. More complicated than normal, wow.
My homepage --Currently not much motived for TASing as before...-- But I'm still working.
TiKevin83
He/Him
Ambassador, Moderator, Player, Site Developer (119)
Joined: 3/17/2018
Posts: 348
Location: Holland, MI
It's interesting to watch the development of the libTAS scene, and this game is certainly prime for TASing. Big yes from me
EZGames69
He/They
Expert player, Publisher, Reviewer (3942)
Joined: 5/29/2017
Posts: 2701
Location: Michigan
What’s this? dwangoAC actually TASing somthing?
[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
Skilled player (1530)
Joined: 7/25/2007
Posts: 299
Location: UK
|ed yes.
I vot|
Site Admin, Skilled player (1234)
Joined: 4/17/2010
Posts: 11251
Location: RU
Why can't you jump up right away here?
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.
Masterjun
He/Him
Site Developer, Skilled player (1968)
Joined: 10/12/2010
Posts: 1179
Location: Germany
Because we're landing on the Hammer Bro! (The previous right-movement turns into upwards-movement making it impossible to land soon enough to jump before reaching him)
Warning: Might glitch to credits I will finish this ACE soon as possible (or will I?)
Site Admin, Skilled player (1234)
Joined: 4/17/2010
Posts: 11251
Location: RU
And if you just run right from here (or shoot portals to the right) you will reach the end later than in the movie?
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.
Masterjun
He/Him
Site Developer, Skilled player (1968)
Joined: 10/12/2010
Posts: 1179
Location: Germany
Just running right makes you just reach bowser at the time this movie finishes. Going around the fire and hammers to end input early like in this movie seems to end up about the same timewise.
Warning: Might glitch to credits I will finish this ACE soon as possible (or will I?)
lexikiq
She/Her
Active player (392)
Joined: 8/13/2018
Posts: 106
Location: United States of America
...portalling straight to bowser, on the other hand, is about a quarter second faster. less fancy looking, but faster. (rip the work masterjun put in to making all the rng sync)
Post subject: Movie published
TASVideoAgent
They/Them
Moderator
Joined: 8/3/2004
Posts: 14776
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. ---- [3998] Linux Mari0 "warps" by Masterjun, lexikiq, dwangoAC in 01:06.93
Joined: 2/21/2008
Posts: 255
I like that there's a second slower YT video encode just in case the use can't access YT's speed controls or YT decides to delete that feature.
"The guy was fatally injured and wants to be covered by God's tears (rain) before he dies. God is too busy to bother because it wastes frames." Frames 16:26