Touhou Kaikidan ~ Mystic Square (東方怪綺談 ~ Mystic Square) is the fifth official installment of the Touhou Project series and is a 2D vertically-scrolling danmaku shooting game (shoot em up). It is the last game in the Touhou Project series for the Japanese PC-98. It is also the last game to have ever been officially released for the PC-98, released on December 30th, 1998.

Game objectives

  • Tool used: Hourglass r81
  • Emulator used: Neko Project 21 (version 201018)
  • Game version: 1.01
  • Plays on the highest difficulty
  • Aims for the highest score
  • Abuses programming errors in the game
  • Manipulates luck

Hourglass r81 settings

  • Multithreading and Wait Sync: Allow
  • Disable DirectSound Creation: Disabled
(any combination of these settings seem to work during playback)

Neko Project 21 settings:

Note: the version the TAS used has it's folder named "np2fmgen_201018". The newest version displayed on the site linked below is "np2fmgen_220505" (this version does sync). Version 2020/10/18 does not appear to be on the site. If preferred/needed, download it here: https://www.mediafire.com/file/j5tnmmr6m057tku/np2fmgen_201018.zip/file

Comments:

The final score is 284,581,040. The best known real time score is 202,717,620 by Miler, achieved on January 12th, 2022.

Verification movie

Verification files

Game progression

The game is played on the highest difficulty of the main mode and aims to clear the game without using continues. There are four playable characters: Reimu, Marisa, Mima and Yuuka. This TAS plays as Mima, for her highest movement speed and highest damage output. The main mode of the game consists of six stages. At the end of each stage, you encounter a boss. When the boss is defeated by depleting it's health bar, a Clear Bonus is added to your score and you advance to the next stage.

Game mechanics

For the basic mechanics, refer to the gameplay page on the Touhou Wiki and a page with additional info:
The information about the scoring system and other mechanics can also be found here. These are generally sufficient to understanding how the game works. There will be seperate explanations below to provide additional information however.
And since this doesn't really fit anywhere else in the submission, there will also be linked to a reverse-engineering project, which may be an interesting and useful resource for some of the more tech savvy people:

Scoring system/mechanics

Power

Each Power Item (the red "P" items) collected will give you 10 points. At Full Power, Power Items start to give more score after every item, until it maxes out at 12,800 points. Collecting a large Power item ("S") will award 25,600 points when the Power Item value has reached it's maximum.

Dream Gauge and Point Items

The Dream Gauge is the main system of Mystic Square. The Dream Gauge (夢) is displayed above the Power gauge. For this run, there are two main ways this gauge can be increased: having enemies on screen and collecting Point Items (the purple items) at the highest value.
When enemies are on screen, the Dream Gauge goes up very slightly. The more enemies are on screen, the faster the gauge will increase. This is how the Dream Gauge reaches it's maximum in this TAS.
Collecting Point Items at the highest value (51,200) can be observed from the item value being displayed in yellow text. The text would display in white if the value was not maxed. The text is in Japanese. In this case it would show up as "五一二〇〇". Collecting an item at this value will increase the Dream Gauge by a large amount. Every time the Dream Gauge changes color, the invisible line where the collected items will give 51,200 points goes down, meaning you can pick up these items gradually lower to gain 51,200 points from them. Once the Dream Gauge is maxed out, every item collected will give it's maximum value, regardless of where on the screen you picked up the item. In addition to this, the maximum value is increased to 200,000 when playing on Lunatic. This is displayed as "二〇〇〇〇〇" in Japanese. The goal is to reach Dream Bonus Max as soon as possible, so that more items will be collected at 200,000 points. The item count in the current stage is displayed on the right side of the screen next to the 点 symbol. The total number of Point Items collected throughout the game is being counted next to the blue 累計 text.

Dream Items

Dream Items are the round white items with a Dream (夢) symbol. These items can only be obtained from one enemy near the end of Stage 2, one enemy right before the Stage 3 midboss and two enemies at the end of Stage 4. Picking up a Dream Item instantly maxes out your Dream Gauge. Since the TAS picks up these items well after the Dream Gauge is maxed out, they will instead give 128,000 points.

Bullet Cancels

Cancels refer to any instance when bullets are being immediately cleared from the screen. In most cases, this will award you with 1,000 points for every bullet. If any bullet is being fired on the same frame that a bullet cancel occurs, these will give 100 points per bullet instead. These cancels can occur in the following ways:
  • Reaching Full Power
  • Maxing out your Dream Gauge
  • Collecting a multiple of 100 Point Items
  • Clearing a phase of a boss or midboss

Boss Phase Bonus

Whenever you clear a phase of a boss, you will be awarded with a fixed number of 10,000s that depend on the boss you fight. Typically the later in the game you are, the more you will get. When you defeat a midboss, you will instead be rewarded with a fixed number of 12,800s. This bonus is seperate from the score obtained from Bullet Cancels and Cancel Bonuses.

Cancel Bonus

The Cancel Bonus is what you are awarded with when you defeat a boss or midboss. After defeating either type of boss, the game will display a "Bonus" text with a value. This value is based on how many bullets were on screen when the boss was defeated. Every additional bullet will give more score per individual bullet, until it maxes out at a value of 12,800. Every additional bullet will then award you with 12,800 points each. The table used to calculate this bonus can be found here: https://en.touhouwiki.net/wiki/User:KirbyComment/Mystic_Square_Info#Boss_Bullet_Cancel_Bonus

Graze

Graze is the act of allowing a bullet to move very close to your hitbox. Grazing one bullet will increase the graze (弾) counter by 1 and you will be immediately awarded with 2,000 points on Lunatic. The graze counter will max out at 999. When this limit is reached, grazing bullets will no longer award you any points. After clearing a stage, the graze counter resets back to 0.

Tick Points

Tick Points is a general term for shoot em ups that refer to score that is obtained by letting your shots collide with an enemy. In this game, you will by default obtain 10 points per frame that you are hitting enemies with your shots. Depending on how many of your shots are colliding with an enemy, you can gain up to at least 50 points per frame. There is also a strange mechanic going on where the points you obtain are delayed and you can somewhat abuse this mechanic to get some extra points. The gains only add up to several 1,000s at most throughout a boss phase. Whenever a boss is invulnerable, the run is optimized to try to hit as many shots as possible during this invinciblity time. This is for example why after a boss appears you move up towards it from the bottom of the screen. This technique is may also be referred to as "Doppler Shooting".

Clear Bonus

A Clear Bonus is a score reward that is given for beating a stage. Is it calculated as follows:
  • Stage Bonus = Stage Number * 1,000 (10,000 for clearing Stage 6)
  • Dream Bonus = Dream Gauge value * 100 (12,800 at Dream Bonus Max)
  • Graze Bonus = Graze * 50
  • Life Bonus (Stage 6 only) = Lives left in stock * 10,000
  • Sum of the above * number of point items collected
  • No Miss Bonus = fixed value depending on the stage
  • No Bomb Bonus = fixed value depending on the stage
  • Item Bonus (Stage 6 only) = Total sum of Point Items collected * 2,500
  • Sum of the above * 1.4 (Lunatic difficulty)
The No Miss and No Bomb bonus refer to not losing a life or a bomb during the stage. If you lose a life however, you will lose both the No Miss and the No Bomb bonus. Across Stage 1 to 6, this bonus will be 100,000, 150,000, 200,000, 250,000, 300,000 and 500,000 respectively. If you time out the final phase of a boss, one additional multiplier will be added to the Clear Bonus. Your bonus would then be multiplied by 0.0, meaning you lose your Clear Bonus entirely.

Other mechanics

Boss Timers

Whenever you are fighting a boss, each phase is set up to have a limited timer. This timer is preset for each individual phase and is not visible during gameplay. This page includes what the timers roughly are: https://en.touhouwiki.net/wiki/User:KirbyComment/Mystic_Square_Info#Invisible_Timers
For most boss phases, they will be cleared as fast as possible, so long an optimized Bullet Cancel can be achieved without needlessly losing score. A few phases in the game will be timed down until near timeout to increase score. Normally when you clear a boss phase within the time limit, you will be awarded with five Power Items if you're not at Full Power or five Point Items if you are at Full Power. If you time out a boss phase however, you will be awarded no items and if this happens during a final phase of a boss, you also get no Cancel Bonus. If you time out the final phase of a boss, you will also lose your Clear Bonus entirely, as mentioned earlier.

Rank

Rank is a shoot em up term that refers to the difficulty level of the game. This is a component that is being applied in real-time and thus is an additional difficulty component for Mystic Square. In this game, rank mainly determines the speed that the bullets travel at. Generally the better you perform, the faster the bullets will go. Rank does have a finite limit however, so it will not increase throughout an entire run.

Extends

Extend is the term for extra lives obtained throughout the game. You will obtain two static Extend Items throughout the game that you receive for defeating the Stage 3 and Stage 5 midbosses. The other Extends are obtained by collecting 100 Point Items. Every 100 Point Items you collect, you will get a Bullet Cancel and "Extend!!" displayed at the top of the screen. It is quite crucial to get as many Extends as possible. Not only because getting more items in general gives more score, but you will also gain additional points on the Stage 6 Clear Bonus. For this TAS, every extra life gives an additional 1,400,000 points in the Stage 6 Clear Bonus.

Bullet limit

There is a limit for how many bullets can be on screen at the same time. This game keeps track of two seperate bullet counts. The first counter looks at how many bullets with an 8x8 sprite are on screen. These only consist of the small white pellet bullets and they have a limit of 200 bullets. The second counter looks at the bullets with a 16x16 sprite, which are almost every other bullet type. This counter has a limit of 220 bullets. For simplicity, the special bullets will not be mentioned, as they are irrelevant to a score run. The prescence of a bullet limit also means there is a hard limit to how much score you can obtain from Bullet Cancels and Cancel Bonuses.

Letter score

During gameplay, the score is displayed with eight digits. When you exceed 99,999,990 points, the first digit will turn into an "A". This letter is the same as the value "10". Every 10 million points, the current letter changes to the next letter. When you beat the game, a score with 100 million or higher will display normally in the results screen and scoreboard screen.

Routing

Resource Usage

This run will aim to clear the game without losing any lives or using any bombs (No Miss No Bomb). Using up any of these resources is bad for a scoring run, no matter where they would be used up. The following things would happen if you use a bomb:
  • You lose 1/4 of your max Dream Gauge during a stage or 1/8 during a boss, meaning you have to build your gauge back up and have to collect Point Items at 51,200 points (148,800 score lost per item until Dream Bonus is maxed). The 1/4 or 1/8 loss from bombing applies specifically to Mima, as the Dream Gauge loss is proportional of the character's bomb duration.
  • You lose the No Bomb Bonus when clearing the stage you bombed in.
  • Any enemies killed during a bomb will always drop Power Items. This also happens when you clear a boss phase during a bomb.
The following things would happen if you lost a life:
  • You lose 1/2 of your max Dream Gauge during a stage or 1/4 during a boss, meaning you have to build your gauge back up and have to collect Point Items at 51,200 points (148,800 score lost per item until Dream Bonus is maxed).
  • You lose the No Miss and No Bomb Bonus when clearing the stage you lost a life in.
  • You lose Power, meaning that if you had a Power Item value chain going, you will have to build it back up again.
  • You lose 10,000 * 100 * 1.4 = 1,400,000 points on the Stage 6 Clear Bonus for having one less life in stock.
In both cases you would also get a bullet cancel and reduce your rank, meaning that bullets will travel slower. While these things are beneficial to your score, you always end up losing more score than you gain.

Midbosses

Midbosses are almost always killed as fast as possible. This is because regular enemies will only continue spawning again when the midboss is defeated. The entire stage layout is also synced with the background music. This means that if you lose two seconds of time to kill the midboss for example, that will be two seconds of spawning enemies you will never get back. Somewhat an exception to the speedkilling rule is when fighting the Stage 4 midboss. By the time the midboss is killed, there is a noticable downtime before enemies are designed to start appearing again.

Item priority

In this run, it's not really possible to pick up every item in the game without losing score. For this reason, the run will put Point Items as a top priority. In this TAS, not a single Point Item that appears, is dropped offscreen. Whenever a Power and Point Item is dropping and one can't be collected without dropping the other, the Point Item always takes priority. There will also be priority to killing enemies, as killing more enemies means more opportunities for Point Items to be dropped. Whenever this TAS can't kill an enemy without dropping a Power Item, the enemy takes priority.

TAS-exclusive techniques/exploits

Advancing RNG

There's two main ways this TAS attempts to manipulate luck. The first is by grazing bullets. Every time you graze one or more bullets, it will change where enemies spawn (if they spawn at a random position - for example most of Stage 2), change where bullet patterns with random aiming will be directed to (for example Stage 2 midboss' second phase) and change boss movement. In some cases, RNG will only advance if you graze many bullets, mainly during a boss. You can still manipulate luck by grazing bullets if your graze count is 999.
The second way luck manipulation is attempted is by killing enemies on certain frames or certain sets of frames. By doing this, the TAS has alot more control over where the next enemy will spawn. The way this run was done however, there is a limit as to how much could be done. The difficulty of manipulating enemy spawns goes up alot if enemies spawn at a faster rate. This is especially true for two specific sections soon after the Stage 2 midboss. The Testrun TAS that was made around a year ago and does not do any manipulation. Check this video as a comparison to see the difference between how the random enemy sections are being handled. The Testrun essentially wings it: https://www.youtube.com/watch?v=yJxvhQRWR7s

TAS-only dodging/bullet source exploit

For entertainment value, this run will do all sorts of maneuvers you would never see in a real-time score run. Some of these dodges are somewhat necessary to increase the score, while some serve no real purpose beyond showing off. There is also one particular oddity that a TAS can abuse here. If you move into a bullet source on the exact frame the bullets are being fired, the hitbox collision is ignored. This can be observed at the end of Stage 5 and 6. Note that you have to "move into" the exact point of the bullet source. Sitting inside this source will result in you getting hit.

Other glitches and exploits

Laser hitbox

The Stage 1 and 4 bosses use lasers that extend out infinitely have glitchy hitboxes. These are different from the lasers fired by the Stage 2, 3 and 5 bosses. The lasers have consistently repeating gaps in the hitbox, meaning your character can pass through certain parts of the laser. This is abused during the final attack of the Stage 1 boss to more effectively manipulate luck and also abused during the remainder of instances for entertainment value. In practice this would be a TAS-only technique as well, but you could technically do this in real-time as well. It just wouldn't be consistent and it wouldn't benefit you. A rough visualization of this hitbox can be seen here: https://en.touhouwiki.net/wiki/User:KirbyComment/Mystic_Square_Info#Gaps_in_laser_hitbox

Persisting laser during the Stage 4 Boss (Yuki & Mai)

Yuki & Mai's boss fight is designed with timing out the first two phases in mind, as these phases do not award you with items and have short timers. You can however still end these phases prematurely by bringing the health bar low enough. The result however is that if the infinitely extending laser is present during the second phase as the phase is ending, it will fail to disappear as the phase transitions. During the TAS, the laser still has a hitbox during the third phase. If you end the second phase while the laser is still a line (before turning into a laser), you will be left with a line. This line does not have a hitbox. This glitch persists until either boss is defeated.

Bullet cloud exploit

Some bullet patterns are fired out of round clouds of varying sizes, before turning into regular bullets. These clouds do not have a hitbox until they turn into regular bullets. This allows for some safespots where you can sit inside the bullet clouds without getting hit. A good example is the first pattern fired by the Stage 5 midboss that you can sit inside of as a real-time player. The advantage of this is that you can graze the bullets behind you, as they turn into normal bullets after they've already passed you. In a TAS this is exploited much more heavily than what is feasible for a real-time player.

Boss hitbox exploit

Typically, bosses have a physical hitbox that you can collide with. In this game however, every single midboss lacks this hitbox. This means you can sit on top of a midboss without any immediate consequences. During the Yuki & Mai boss fight, Yuki also does not have a hitbox while Mai does.

Stage comments

Stage 1

Before starting the game, some time is wasted to change what items are being dropped at the start. From there, the goal is to reach Dream Bonus Max as fast as possible. Every Point Item is being collected high enough on the screen that you obtain 51,200 points, displayed in yellow text. Enemies are also not always killed immediately, to slightly optimize increasing the Dream Bonus Gauge. The Dream Bonus Gauge reaches it's maximum while two enemies are on screen, before reaching the midboss. In real-time, it's barely possible to reach Dream Bonus Max before the midboss. This TAS gets the gauge maxed out and picking up two Point Items at 200,000 value straight after.
The midboss is killed as fast as possible and makes use of the Doppler Shooting technique for extra damage at the start. For the rest of the midboss, Mima is placed in such a way that all shots are hitting the midboss. Near the end some shots are deliberately missing the midboss to get a larger Cancel Bonus. This optimization does prevent extra enemies from not spawning.
The first random enemy section occurs after the midboss, at 2:02 in the verification video. One bullet is grazed to manipulate the luck and proceeds to kill enemies with certain timings to manipulate where the enemies spawn. This is why this run doesn't shoot constantly. Half of the enemies here are flying towards your position the moment they come out of their vortex animation and the other half will move straight down.

Stage 1 Boss

For the first phase of this fight, the boss is being damaged until the phase only has 1 HP left before ending. Then by grazing bullets, the luck is manipulated so that the boss moves in favorable patterns and fires the right patterns in the optimal sequence, as this phase picks from a number of bullet patterns at random. A common goal is to try to keep as many bullets on screen as long as possible, to maximize the score obtained from the Bullet Cancel.
The second phase is being manipulated in the same way. One extra thing that's being attempted is that the boss needs to be in a particular position, as setup for the final phase. When the final phase begins, the boss will remain at whichever spot on the screen she was when phase 2 ended.
For the final phase the boss is positioned in a favorable spot to mainly keep as many small pellet bullets on screen as long as possible. Bullets are being grazed here to get as many of the large bullets to move down as possible. This is slightly easier to manipulate by the ability to move through the lasers, due to the glitched hitboxes.

Stage 2

This is one of two stages where the enemy spawn manipulation is vital. During the random enemy sections, grazing is almost completely useless, as the enemies shoot too few bullets to use for luck manipulation. For this reason, this TAS can only really manipulate luck by killing enemies on certain frames. All crystal/rock looking enemies in this stage spawn at random horizontal positions. On this stage, Full Power is reached too. This Full Power is timed when as many bullets are on screen as possible, this cancel will give 1,000 per bullet (about 80+ bullets).
The midboss is killed as fast as possible. During the second phase of this midboss, bullets are grazed in specific ways to get the lines of bullets to move downwards, ideally towards the bottom right of the screen. The midboss drops a bomb item, which would normally be picked up the instant the midboss dies, but keeping some distance and not picking up this item sets up the enemy spawn RNG after the midboss dies to be more favorable.
At 6:03 and 6:16, the crystal/rock enemies spawn at twice the frequency. This makes the manipulation much harder. By shooting one enemy with a specific timing, you are often forced to kill the next enemy immediately, thus limiting the flexibility to manipulate the luck. These sections will have to drop some Power Items and skip killing some enemies.

Stage 2 Boss

During the first phase, this is the first instance of the bullet limit being reached. The Bullet Cancel is timed the instant the bullet limit is reached. Fortunately the boss position doesn't have to be specific for this to happen. The same description applies to the second phase.
For the third phase, the Bullet Cancel has to be timed the moment the arrowhead bullet spawn. There is no way to get bullets from the previous wave included in this cancel.
For the fourth phase is manipulated so that the boss moves to the top corner of the screen. The bullets are misdirected towards the opposite corner of the screen to maximize the Cancel Bonus.

Stage 3

Stage 3 overall is pretty mixed in it's complexity. The stage portion is extremely simple and contains no randomness. There will be 200 Item Extend Cancel with the max number of bullets as possible. This TAS also demonstrates that the stationary demon enemies don't have a physical hitbox. These are the only stage enemies in the game without a physical hitbox.
The Stage 3 midboss is killed as fast as possible. The Cancel Bonus here is maxed out and extremely simple to get. Simple enough that you can be 100% consistent at getting this exact Cancel Bonus (766,450). This cancel is gotten on the first frame you can get this Cancel Bonus.

Stage 3 Boss

The boss fight of this stage becomes the precise opposite of the stage portion in terms of complexity. This is the only part of the stage where score optimizations are relevant. It is extremely difficult to get the Bullet Cancels as optimal as possible. There are a couple of factors that come into play here during the main phases in particular.
  • Alice's movement RNG
  • Alice's positioning
  • Alice's randomly chosen patterns and the sequence of them
  • The movement RNG of Alice's two dolls
  • The distance traveled by the dolls per movement
  • Each of the dolls' positioning
  • The randomly chosen patterns of the dolls
Before getting to the manipulation, it should be mentioned that shooting the dolls will not reduce the healthbar at all, though the dolls do have their own limited HP. This means they can be shot for extra Tick Points. However, when a doll is killed, it will reduce the health bar by alot, meaning that this will actually lose you Tick Points. For this reason, the dolls are only damaged as much as possible without killing them. The dolls are not killable during the mirror phases. The doll HP gets reset when the next phase begins.
Now to get into the details of the luck manipulation: Alice needs to be firing the correct two patterns in a row before getting the Bullet Cancel. These will be the densest pattern of each said phase. Generally the first pattern needs to be fired as high up as possible, then the second pattern should generally be fired lower on the screen, but this is not always necessary.
The two dolls are also an important factor. They will start out firing the same patterns at first, but they will then start firing different patterns. I could not quite figure out how the mechanics behind this work. Another problem is that the dolls will start to shoot out of sync from each other. This is also problematic because they will be firing out of sync from Alice as well. The dolls firing out of sync happens because the moment they fire is based on how much distance they moved before attacking. The further they move, the longer it takes for them to start firing their next pattern. For this reason, the luck was constantly being manipulated so the dolls continue to more or less attack at the same time. These are the reasons why these main phases are being waited out for quite a long time. The luck has been manipulated so that the dolls are firing roughly at the same time and even more roughly when Alice is firing her pattern, while also getting each of the three entities positioned as well as was reasonably possible. The choice of bullet patterns fired by the dolls has not been manipulated to be the optimal patterns. This would make the requirements for the manipulation too demanding. The TASing process for this fight took three weeks alone.
During the mirror phases, the mirror is fired to maximize the amount of Tick Points gotten, but also to maximize the score from the Bullet Cancel. These phases time out quickly and don't award any items. Hitting the mirror with your shots do not reduce the health bar.

Stage 4

At 15:21, enemies are not being killed for a while to fill the screen with kunai bullets. Then an Extend Cancel is gotten at 300 Point Items, with the bullet limit reached (220 bullets = 220,000 points). At 16:02, more enemies will spawn at random horizontal positions. Since this part doesn't last very long, every enemy was able to be killed and every item was collected.
The Stage 4 midboss is the only boss that doesn't need to be killed as fast as possible, though still somewhat quickly. The boss is being placed close enough to the middle of the screen and as low as possible, to maximize the Cancel Bonus. The pattern fired before it, is also being fired from close to a top corner as possible, to keep the fired bullets as long on screen as possible. The Cancel Bonus from this midboss is the largest Cancel Bonus of the run.
At 17:03, there is another random enemy section. This run does manage to kill every enemy during this section and only a couple of Power Items needed to be dropped. The section that comes after, not every enemies can be killed without using bombs. For this reason, killing as many enemies as possible takes priority. Several Power Items are being dropped offscreen, but every Point Item that appears is collected.

Stage 4 Boss (Yuki & Mai)

During this boss fight, the first two phases have to be ended before the timer runs out, despite them not awarding any Point Items regardless. If you time them out, they will not be firing the optimal patterns for the best Bullet Cancel. This is why during phase 2, alot of effort is made to damage both bosses at the same time. The optimal pattern only comes around once during this phase and it's just barely possible to get a Bullet Cancel during this specific attack. Also specifically during this fight, when enough damage is dealt, both bosses will stop firing bullets and then it takes 16 frames before the phase actually ends and a Bullet Cancel is triggered. This is why the cancel timing at 19:18 looks suboptimal when looking at it in slow-motion.
The timing of the cancel needed for phase 2, happens to trigger the glitch where the laser persists during the last phase, as mentioned in the glitch explanation. The glitch in itself does not have any practical use for a score run, but it does certainly add to the entertainment of this part of the run.
The last phase needs to be timed down a decent amount, as both bosses need to be in a favorable position, while also firing the correct pattern. The patterns fired during the last phase go at a cycle. For this fight, one of two bosses will go down and Yuki is being shot down to end the fight. When you fight Mai by herself, she will fire out eggs that can be shot down for 5,000 points each. This adds up to about 1.4-1.5 million points across the entire Mai fight.

Stage 4 Boss (Mai)

As mentioned in the last paragraph, you fight Mai in a score run due to her shooting eggs that can be destroyed for 5,000 points each. For this reason, this is the only fight where you time down phases all the way until near time-out. This will be done during phase 2, 3 and 4. These phases have a timer of 83, 168 and 56 seconds respectively. The third phase is the one where not all eggs can be destroyed without doing too much damage to the boss. In this TAS, as many eggs as possible are shot down and there's barely enough damage dealt to not accidentally end the phase early.
For the last phase, the Cancel Bonus is set up in a way so that the boss shoots the last stream of eggs as high on the screen as possible, then the boss is directed towards the middle of the screen to set up the kunai bullet pattern to maximize the Cancel Bonus. The eggs that were shot will mostly be delayed until they reach the bottom horizontal line of the six-pointed star in the background. They are shot at this timing, because shooting them down any lower on the screen will make the eggs explode without any bullets being shot out. The ability of bullets being shot out is being delayed as long as possible to maximize the potential of these stray bullets staying on screen when the Cancel Bonus is triggered.

Stage 5

For the start of this stage, yet another Extend Cancel is being triggered and maximizes the number of bullets on screen when the cancel occurs. It is worth mentioning that the bullet clouds do count towards the Bullet Cancel, meaning these too give you 1,000 points per cloud.
The midboss in this stage is also being killed as fast as possible. The optimal cancel would be to wait for the pellet pattern that comes after the green laser pattern, however the score gain from this is a little bit less than taking the Cancel Bonus from the laser pattern. There will be 8 extra enemies after the midboss by taking the Cancel Bonus on the laser pattern. The Cancel Bonus from this laser pattern is 2,558,450. This is the highest possible Cancel Bonus you can get during this pattern, as this Cancel Bonus is equivalent to 220 bullets, the bullet limit for this very type of bullet.
The section after the midboss is the last random enemy section of the game. For this section, the most important part of the luck manipulation is to get the white and blue fairies to spawn closer to the middle of the screen. These fairies, like the rest, come in sets of two. One of them will move left after firing a pattern and the other will move right. When they move away, they move away faster than the other fairies, so they need to be manipulated so that there's enough time to kill them. If the fairies can't be spawned near the middle, they should spawn so they move towards the side further away than the other. The rest of the fairies move up after shooting their bullets and do so slowly, so these don't need a particular spawn positioning.

Stage 5 Boss

By this point, the TAS has exceeded the current real-time World Record (202 million). This boss in a TAS is much more of a breather than the bosses from the previous two stages. For the first phase, you will see that the swords do not have a hitbox when they are in their spinning state. The Bullet Cancel during this phase is triggered the moment the bullet limit is reached. The boss position was manipulated to make sure this limit could be achieved, but the positioning doesn't have to be particular for this phase. The items that are spawned from ending the first phase are then delayed so that bullets can be canceled from the 600-item Extend Cancel.
Phase 2 and 4 got straight-forward cancels and these phases are divided into two subphases, so there are four Bullet Cancels in total from these phases. For phase 3 some extra manipulation needed to be done to get the boss in the middle of the screen during the correct attack. Technically this manipulation could've been done faster.
Phase 5 just goes for a standard cancel by misdirecting the stream of bullets straight down. For Phase 6, the bullet limit gets constantly reached once the pattern is firing for long enough. Unfortunately it's not possible to manipulate which direction the kunais are being fired when the bullet limit is reached. Ideally you would want to see the kunais being fired upwards. These bullets would ultimately move down once their path is set in stone.

Stage 6

This stage has a hard limit for how many items you can get. No manipulation needs to be done during the stage portion of this stage, so this part focuses exclusively on doing silly things.

Stage 6 Boss

The first and second phase times the cancel once the bullet limit is reached, once again. For these phases it is more important to get the boss as close to the middle of the screen as possible, to keep the bullets on screen as long as possible.
During the third phase, the TAS waits until a group of bullets is being fired in the top corner and misdirected towards the opposite corner, to maximize it's screentime. The bullets being fired after don't need to spawn from a specific spot before a cancel is being triggered. The large round bullets do not contribute to the score obtained from bullet cancels. During phase 4, the curvy lasers (a.k.a. Cheetos) also do not give any score when a Bullet Cancel is being triggered.
For phase 5, some time is wasted to wait for the optimal Bullet Cancel. The boss moves up and down very slightly and the bullet spawning locations move up and down with the boss. Therefore, the TAS waits until the boss starts moving down, which gives a couple 1,000 more points. The same strategy is being used to optimize the Bullet Cancel for phase 6.
For the final phase, luck is manipulated so that the boss sits near the top-middle of the screen (not the very top) and then moves straight down. The spot the boss ends up is as low down as the boss is allowed to move to. The Cancel Bonus also needs to be triggered when there is pellet bullets are being fired (and just a few arrowhead bullets near the end). The Cancel Bonus is 1,009,650. Any real-time run could easily get a higher Cancel Bonus, because these runs would typically have lower rank at this point, meaning bullets will move slower. A TAS would however at no point want to lower the rank by dying or bombing, so the Cancel Bonus has to be lower. The gain from the Cancel Bonus would still be less than the loss from forcing your rank to be reduced.
When the final Clear Bonus is added (29,508,500), the game is only able to add 25,605,090 points from scrolling up the score. The remaining 3,903,410 points are however instantly added the moment the screen starts to fade out. This brings the final score to S4,581,040 points, or 284,581,040 points.

Other comments

Possible improvements

In general, the Point Item count can't be improved very much, mainly more Power Items can be gotten and Bullet Cancels and Cancel Bonuses can be improved. Some more specific examples are listed below:
  • A few extra enemies can be killed during the random enemy section in Stage 1 that weren't killed in this TAS.
  • The first phase of the Stage 1 Boss can get a slightly bigger cancel by misdirecting the red lines of bullets towards the opposite corner rather than the corner directly below.
  • The Cancel Bonus of the Stage 1 Boss may be able to be improved with better boss position, but certainly with better luck manipulation to fire the round bullets to better directions more often.
  • All of the random enemy sections in Stage 2, as it's far too difficult for me to manipulate luck to not let any enemies escape and collecting every single Power Item, on top of every Point Item.
  • The first phase of the Stage 2 Midboss did no manipulation regarding where the bullets are being fired, as doing as much damage as possible had to take priority.
  • The main phases during the Stage 3 Boss can be improved by getting much more specific RNG to the dolls to fire the best pattern (the 4*16-way pattern) every time, at the perfect timing and in the middle of the screen
  • A few extra Power Items can be gained during the random enemy section after the Stage 4 midboss that were dropped in this TAS.
  • There may be a way to kill more enemies during the section with the three lines of enemies moving from the top and bottom of the screen.
  • During Mai's (Stage 4 Boss) second phase, one egg was accidentally not destroyed and was only spotted after the TAS was completed
  • More eggs may be able to be destroyed during Mai's third phase without ending the phase prematurely.
  • Two Power Items can be gained during the random enemy section in Stage 5 which were dropped during this TAS.
  • The third phase of the Stage 5 Boss may be able to get a better Bullet Cancel by putting the boss higher on the screen while still keeping her in the middle of the screen horizontally, to possibly get some bullets to remain near the bottom of the screen.
  • The Cancel Bonus of Stage 5 could not be manipulated luck-wise, but it may be possible to manipulate it somehow before this phase begins.
  • The fourth phase of the Stage 6 boss can gain at least 5,000 points on the Bullet Cancel. This many points were lost compared to the Testrun. The entire timer was run down without being able to get a better cancel.

Verification notes

  • The platform was automatically labeled as "Windows". The platform the game runs on is technically "PC-98".
  • The frame-rate was automatically labeled as 61 FPS by the submission. The actual framerate of the game is 56.4 FPS. This also made the time incorrect. The final time should be 37:30.1773
  • At frame 50780 during the final phase of the Stage 3 boss, the game freezes. This happens due to the F11 key activating the menu bar and accidentally being left in (F11 was bound as a hotkey as a load state key). The game unfreezes by clicking the Neko Project emulator window.
  • The verification movie contain occasional stutters that had to come up while recording the TAS. These may or may not be present when playing back the WTF-file.
  • The submitted input file speeds through the final score displays and scoreboard. The verification movie stays on these screens for a while longer.

Spreadsheet

A spreadsheet was used to compare the TAS with a Testrun TAS and the current real-time World Record. When analyzing the TAS scores, sometimes score is lost compared to the Testrun. This happens for one of three reasons:
  • An Extend Cancel was triggered during a different time from the Testrun or vice versa, meaning the Testrun may gain score in one section, but the main TAS will gain score back on the same Extend Cancel. Sometimes the main TAS is also forced to take a worse, if not non-existant Extend Cancel when the Testrun does not (see Stage 3 and Stage 6).
  • The items dropped are at a different part of the item drop cycle, which may sometimes cause the main TAS to be one item behind or ahead.
  • The main TAS will have a lower graze count compared to the Testrun at some parts. This loss is made up by the time the graze count hits 999.

Hourglass with fixed video dumping (frame loss on splits was not fixed): https://github.com/TASEmulators/hourglass-win32/releases/tag/90
feos: This run is incredible! I had no right to not fix encoding it, which involved quite a crazy trip, but now everything should finally be good.
Hourglass's time seems actually correct since it slices the time differently than np21. The amount of frames np21 actually ran would be different than Hourglass's, but the time displayed would match. Hourglass displays duplicate frames where np21 hasn't yet refreshed the screen, and Hourglass's frame is actually 1/60th of a second.
Changed the branch to not include difficulty and to traditional ma score wording we use.
Max score seems to be the fullest completion you can get, so accepting to standard.
fsvgm777: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
(processing)


TASVideoAgent
They/Them
Moderator
Joined: 8/3/2004
Posts: 15577
Location: 127.0.0.1
fsvgm777
She/Her
Senior Publisher, Player (226)
Joined: 5/28/2009
Posts: 1213
Location: Luxembourg
The TAS syncs for me! So I'm just gonna make a quick note here to encoders/publishers: I'm gonna encode and publish this TAS when the TAS gets accepted. Anyways, love some more Touhou TASes getting submitted here, and this is no exception. I enjoy watching these TASes, so this gets a Yes vote from me.
Steam Community page - Bluesky profile Oh, I'm just a concerned observer.
CoolHandMike
He/Him
Editor, Judge, Experienced player (895)
Joined: 3/9/2019
Posts: 695
Wow this is exactly what a high score bullet hell tas should like. Loved the extremely unlikely dodging movements. The laser graphic glitching out on that one boss was amusing too. Easy yes vote!
discord: CoolHandMike#0352
fsvgm777
She/Her
Senior Publisher, Player (226)
Joined: 5/28/2009
Posts: 1213
Location: Luxembourg
Okay, this post is gonna cover a fair amount I needed to figure out whilst dumping and putting everything together. First off, inside Hourglass, you must dump uncompressed, otherwise, the output will be skewed like this: It should be noted that for some reason, the dump is 642x402, which explains this issue right here. Secondly, you need to stitch the AVIs together using VirtualDub2 using the Caching driver, then save it to Lagarith. As an aside, it is strongly recommended to dump video and audio separately. This guarantees that the audio won't have any weird skips. I also had to make a full dump with any codec, in spite of the skew, because it's still a sort of "clear" image otherwise (read: text readable, at the very least). Why, you may ask? Well....it turns out Hourglass's internal AVI dumper is huge amounts of garbage and will skip several frames upon splitting if the frame before happens to be identical. However, thanks to the skewed dump I had, I could figure out where to add frames. This is the end result:
Language: AviSynth

video = AVISource("th05vid.avi").Crop(1, 1, -1, -1).DuplicateFrame(5289, 10579, 10579, 10579, 15869, 15869, 15869, 15869, 15869, 15869, 15869, 15869, 15869, 15869, 15869, 15869, 15869, 15869, 60834, 71414, 89929, 89929, 89929, 89929, 89929, 89929, 89929, 89929, 89929, 89929, 89929, 89929, 89929, 89929, 89929, 89929, 89929, 89929, 89929) audio = WAVSource("th05audio.avi").AssumeSampleRate(44060) AudioDub(video, audio).DelayAudio(-0.1)
The duplicate frames were figured out by comparing it with the dump that had a skewed output, but was fine otherwise, as I could still read the score, for instance. The AssumeSampleRate part is to ensure a/v sync. The DelayAudio(-0.1) is to account for the audio emulation buffer. With that, I have a dump that is ready to go. One thing I'd like to point out is the framerate. While it is true that the PC-98 runs at around 56.4 FPS, the fact remains that it was recorded on Hourglass at a flat 60 FPS. So a run time of 37:30.1773 would be wrong as well. Instead, the correct run time is the one given by Hourglass, namely 35:15.17. Indeed, it matches up neatly with when the final input occurs in my dump after fixing everything up. Making it roughly 56.4 FPS with AssumeFPS would actually slow the audio down (and make it lower pitched as a result).
Steam Community page - Bluesky profile Oh, I'm just a concerned observer.
Post subject: Movie published
TASVideoAgent
They/Them
Moderator
Joined: 8/3/2004
Posts: 15577
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. ---- [4738] PC98 Touhou Kaikidan ~ Mystic Square "maximum score" by KirbyComment in 35:15.17