Submission Text Full Submission Page

Introduction

After my recent Dragster submission, it was suggested that Barnstorming is another game that merits a closer look. It has a more confusing but equally dubious history of records around it featuring everybody's favorite Todd Rogers. Alyosha wrote down the short version of this story, or you can read a way more detailed write-up on reddit.
So I started to look into it. As for many Atari 2600 games, they are small and simple, so a disassembly was fairly easy to create. Also, the code structure had a lot of similarities to the code of Dragster, which helped a lot in understanding it. Steve Cartwright, the creator of this game, mentions in the game's manual: "... I'd particularly like to thank David Crane for his help in 'getting me off the ground'", and David Crane is the creator of Dragster. That's probably where the similarities come from. All further explanations and discoveries are based on this disassembly.
Note: This movie contains two runs as a showcase of different ways to beat the game. I figured this game doesn't merit branches so I bundled them this way, but if you think otherwise I can trivially split them into separate movies, or drop one of them.

Game mechanics

The game as a whole is very simple: fly through the barns in the shortest amount of time.

Game modes

The game features 4 game modes, which differ in the amount of barns you need to fly through and the pattern of buildings and geese on the map. Game mode 4 is supposed to be random, but all it randomizes is the starting position in the pattern, the patters themselves are still fixed.
This run only considers game mode 1, which requires the least amount of barns and can be completed the fastest.

Movement

The movement looks like a simple auto-scroller, but has quite some oddities to it which make it hard to optimize. The plane moves forward at 1.5 pixels/frame by default, and up to 2.3125 pixels/frame when pressing B. However, when pressing up or down, it only moves at 15/16 its normal speed, so you want to fly straight as much as possible.
Vertically, the plane moves up to 1.4375 pixels/frame up or down. The vertical speed gradually builds up and resets to 0 immediately once you stop the input.
Fractional movement amounts are stored in subpixel variables. However, the fractional amounts don't have any direction, it's easier to think of them as movement potential: potential build up moving upwards can also be used to accelerate moving downwards. One of the quirks is that the speeds are only updated every second frame, but they are applied to your movement every frame. This, in combination with the fractional movement buffers, means that it's not optimal to hold up or down to move vertically. It's better to only press up every second frame to keep the speed up, and use the in-between frames only if you have enough fractional potential stored up to move 2 pixels instead of one. That way, for each frame you press up or down and therefore lose out on horizontal distance, you get more vertical distance on average.

Buildings

Another quirk is that the barns and windmills don't have a fixed distance between them. They're not laid out on a fixed track, instead the next building spawns as soon as the last building left the screen (there are "blank" buildings which sometimes create gaps, but they follow the same rules). The new building always spawns at the same relative position to you at the right edge of the screen, independent of how much you were moving. That means it's possible to overshoot and waste a pixel of distance during this transition, depending on how your position aligns with the one of the current building. To avoid that, you can intentionally slow down, using the extra slack to start moving vertically early for free, or aligning your subpixels better.

Collisions

Collisions in this game are kind of painful to predict, because it is based on the hardware collision detection of the Atari 2600 console, which does pixel-perfect collision detection. That means you collide if and only if your pixels overlap. And this is affected by the animation cycles of the different objects, so you may or may not hit a windmill at a certain height depending on where it is in its animation when you pass over. But it also means you can thread the needle through objects in some instances, and this runs shows some instances of that.

Geese

Whenever you are moving at more than 2 pixels/frame, geese spawn at the top of the screen. Their patterns are based on a fixed cycle, hitting them costs a lot of time, and avoiding them also costs time since you need to move up and down around them, costing you horizontal distance. So the best situation is when they don't get in your way at all. There are two ways to manipulate the geese. The first one is slowing down to avoid spawning them, but this is not practical for obvious reasons. The second, way more effective method shown in this run is using the difficulty switch. The right difficulty switch controls the number of geese that spawn, when switched it doubles the rate at which the game cycles through the geese patterns. So toggling it mid-game can be used to speed up or slow down where you are in the pattern cycle, making the geese spawn earlier or later. By using this strategically, you can avoid the geese ever getting in your way without slowing down.

Glitches

During my investigation, I not only found the described movement tech that allows you to move faster compared to the naive way, but also looked for ways to beat the game faster altogether.
As it turns out, it is actually possible to clip into a barn in such a way to both count them for your score and have it repel you backwards so you can score it again.
The setup is fairly simple: whether you score or hit the barn only depends on your vertical position, and which direction you are repelled in only depends on your horizontal position. By entering the barn at the top-most valid height in the first frame, it scores the barn, and by then moving up to collide with it on the second frame while not moving into the barn too much, it repels you backwards. The balance it tricky to get right, and it's not possible while going full speed, but it can be repeated with the same barn multiple times.
In order to make the second frame collision easier without needing to move vertically inside the barn, you can actually use the difficulty switches yet again. The left difficulty switch lowers the clearance of the barns, so doing that at the second frame inside the barn guarantees a collision without needing to move vertically.
Doing this 9 times on the first barn of the stage allows beating the game significantly faster than otherwise possible.

Applications to RTA

Most of the movement tech requires rapidly changing precise inputs and are likely infeasible for RTA. The Goose manipulation on the other hand is not at that precise, the time window is ~1 second for each flip of the difficulty switch, and should be feasible, if a bit awkward to execute.
As for the glitch scoring a barn multiple times, it's fairly precise and hard to set up, it's probably feasible in RTA but highly inconsistent. A realistic route probably aims to do it once or twice to cut down on the overall distance, but still does most of the course normally.

Verdict

So as it turns out, the claimed time of 32.67 and 32.50 are in fact technically possible. A time of 32.50 is virtually impossible to be achievable with human inputs though, and a time of 32.04 is clearly impossible without using glitches, and there's no indication they were known (or allowed) at that time.

feos: Judging...
feos: This is a very neat idea, it was really interesting to resolve, thanks for coming up with it! Perfect timing too.
Let's look into the least obvious option - accepting this as an unusual goal with a demonstration tag. It is theoretically possible, because this run got Moons feedback, and it does showcase something quite unconventional: completing the game twice in a row with slightly different rules.
The question though is, is this run a concept demonstration? What concept does it demonstrate? Strictly speaking, it doesn't demonstrate any concept. It just contains 2 separate and unrelated movies, stitched together for the sake of being compact and attracting all the attention at once, instead of posting two usual submissions. I can say that it worked out well.
But this is the goal of the submission itself, not of the movie it contains: completing the game twice with slightly different goals is unrelated to in-game conditions, and as a self-imposed goal it doesn't represent anything solid and unique, neither does it add any restrictions that would make gameplay more impressive and therefore Moons-worthy. And also the same effect can be achieved if one simply makes 2 different movies: watching them one after another will result in identical experience, and would also not be questionable in terms of legitimacy.
We can compare this "goal" with other examples of concept demos, like ring attack, walkathon, several games in one movie. We will see that all of them add some TAS challenge, make the runs harder to make, and make them stand out from gameplay we usually see here. Stitching 2 runs in one does neither.
Even if we try to treat this particular run as a concept demo in order to accept it, it doesn't actually demonstrate a unique impressive concept that we require from that category. Rejecting for goal choice.
MrWint, by all means make two separate submissions so we could judge them normally! This is the option a few people in the thread called for, and I agree with them.


TASVideoAgent
They/Them
Moderator
Joined: 8/3/2004
Posts: 15619
Location: 127.0.0.1
This topic is for the purpose of discussing #5880: MrWint's A2600 Barnstorming in 00:53.15
DrD2k9
He/Him
Editor, Judge, Expert player (2221)
Joined: 8/21/2016
Posts: 1091
Location: US
Well done. Nice find on the collision glitch to get the barn score.
Site Admin, Skilled player (1255)
Joined: 4/17/2010
Posts: 11492
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
LOL I don't even mind having both goals combined like that :D Loved the second part, Yes vote.
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.
Alyosha
He/Him
Editor, Emulator Coder, Expert player (3826)
Joined: 11/30/2014
Posts: 2834
Location: US
That was fast. Nice work! Good to see another open end wrapped up. Edit: I noticed you used the difficulty switches to manipulate the geeese, but this isn’t allowed RTA, do you know what the best time is without switching ?
Challenger
He/Him
Skilled player (1702)
Joined: 2/23/2016
Posts: 1064
This was impressive how you managed to achieve another unreachable record after Dragster. And the second part, more impressive! Yes vote.
My homepage --Currently not much motived for TASing as before...-- But I'm still working.
GJTASer2018
He/Him
Joined: 1/24/2018
Posts: 306
Location: Stafford, NY
Aha! Very interesting, Yes vote and basically solid proof that Todd's previously claimed times would be impossible to get in a "legitimate" way, although I imagine that you could get a time to show up for an unedited screenshot with the barn glitch (particularly the 32.04 time). All this difficulty switch "cheesing" in the TAS actually has a precedent! It is known that times in Skiing (a similar style game programmed by Bob Whitehead, also of Activision) can be manipulated by using the difficulty switches. You can also cheat in Spider Fighter (another Activision game, this one by Larry Miller) to play in the hard difficulty while earning the easy difficulty points. Perhaps there's a running theme of this kind of difficulty switch exploit in Activision-made games that Todd (shamelessly) used to cheat his way into the record books?
c-square wrote:
Yes, standard runs are needed and very appreciated here too
Dylon Stejakoski wrote:
Me and the boys starting over our games of choice for the infinityieth time in a row because of just-found optimizations
^ Why I don't have any submissions despite being on the forums for years now...
Editor, Skilled player (1441)
Joined: 3/31/2010
Posts: 2112
The second run was pretty funny. I much prefer it to the first one. Voting yes for entertainment.
Patashu
He/Him
Joined: 10/2/2005
Posts: 4045
Way to destroy this game MrWint :D
My Chiptune music, made in Famitracker: http://soundcloud.com/patashu My twitch. I stream mostly shmups & rhythm games http://twitch.tv/patashu My youtube, again shmups and rhythm games and misc stuff: http://youtube.com/user/patashu
Player (37)
Joined: 2/16/2012
Posts: 282
I'm glad you found a way to manipulate the geese with current emulators. I briefly investigated the game some months ago, but noticed in this disassembly that it polls for input multiple times per frame. Through some testing I think I found that you could actually have motion without spawning any geese at all, so long as you weren't holding the button at a certain point in the frame. But that kind of manipulation isn't possible in current emulators, so I'm glad there's something else that works for the same purpose. Any thoughts on trying the other game modes? With this much understanding it's just more of the same, but I'm curious what the maxouts are for the other modes as well. Yes vote from me!
Player (13)
Joined: 6/17/2006
Posts: 510
Very cool, voting yes! By the way, I would personally prefer seeing different branches instead of a continuous movie. The second part looks like you're losing lives for a quick game over, which confused the hell outta me until I realized the counter was not representing lives.
Skilled player (1040)
Joined: 7/24/2013
Posts: 175
Alyosha wrote:
Edit: I noticed you used the difficulty switches to manipulate the geeese, but this isn’t allowed RTA, do you know what the best time is without switching ?
I don't know exactly. If I recall correctly, the best way I found without using the difficulty switches is slowing down right at the start to delay the first goose spawn, and then you only need to dodge two geese throughout the run. So that would likely be around 32.52 or 32.54, but I haven't done a full run to confirm.
Omnigamer wrote:
I'm glad you found a way to manipulate the geese with current emulators. I briefly investigated the game some months ago, but noticed in this disassembly that it polls for input multiple times per frame. Through some testing I think I found that you could actually have motion without spawning any geese at all, so long as you weren't holding the button at a certain point in the frame. But that kind of manipulation isn't possible in current emulators, so I'm glad there's something else that works for the same purpose.
You can have motion without spawning any geese, you just can't have fast motion. The geese spawn if you're moving too fast (code). If you never press B, you can complete the game and never spawn any geese. That said, I have complained before about the fact that most emulators only support one input per frame, unlike actual consoles. It's an arbitrary restriction that actually limits what you can do in some cases, but it seems few people care about this shortcoming. All hail lsnes I guess, for being one of the few emulators with a somewhat reasonable input format that allows for things like this.
Omnigamer wrote:
Any thoughts on trying the other game modes? With this much understanding it's just more of the same, but I'm curious what the maxouts are for the other modes as well.
I don't have any plans to try out the other game modes, as you said they'll not be much different from this one. And the result will probably be 0.99 x (RTA time) similar to this. But if you're curious, I won't stop you :)
Active player (378)
Joined: 9/25/2011
Posts: 652
Ha ha ha! Awesome. I agree with some that I'd prefer two branches as compared to the one combined.
Spikestuff
They/Them
Editor, Publisher, Expert player (2655)
Joined: 10/12/2011
Posts: 6446
Location: The land down under.
The first half which is the not abusing the collisions is there and it's Eh. Great improvement and all, but eh. The second half was the head scratcher and the shocker. Bloody smashing it out, and abusing the game. I'm more leaning towards the side of Voting Meh and not Yes, so I'll be doing that which is Meh.
WebNations/Sabih wrote:
+fsvgm777 never censoring anything.
Disables Comments and Ratings for the YouTube account. Something better for yourself and also others.
Personman
Other
Joined: 4/20/2008
Posts: 465
Extremely yes vote for the shorter, glitchier version! I don't totally understand why the first one is being submitted, as it seems like it's more a proof of concept than an attempt to get the fastest time, right? They both change difficulty switches mid-run, so it seems like we should just publish the faster one. I mean don't get me wrong it's awesome that you've done the research and presented that proof of concept! But unless I'm misunderstanding, only the shortest one should be published. It's also drastically more entertaining.
A warb degombs the brangy. Your gitch zanks and leils the warb.
InputEvelution
She/Her
Editor, Reviewer, Player (36)
Joined: 3/27/2018
Posts: 195
Location: Australia
Hahahaha, that second run. I think it would have been better as two separate runs, but with the entertainment that the second brings, I'd still be happy. Yes vote.
Editor, Active player (297)
Joined: 3/8/2004
Posts: 7469
Location: Arzareth
Short, concise, precise and well-researched. Good job!
TASVideosGrue
They/Them
Joined: 10/1/2008
Posts: 2791
Location: The dark corners of the TASVideos server
om, nom, nom