After two short years, we once again find a way to defeat Dracula and its minions in a record time. This TAS builds upon all the techniques and tricks that the community has discovered throughout decades, and adds a few new ones. The main innovations for this movie were (1) the use of a brute-forcing bot to refine execution, (2) clever new ways to use the well-known scroll glitch, and (3) a better execution of boss stages.
Category Rules
any%, so all is allowed
Takes damage to save time
Heavy glitch abuse
Heavy luck manipulation (uses pausing to influence enemy actions)
Story
The story of this TAS is divided in two phases, first:
and then:
Improvement Summary
Optimized and extended use of the Scroll Glitch: We discovered that it was possible to reduce the frames required to execute the glitch to 4 (two L presses, if walking rightwards; two R presses, if walking leftwards). This optimization alone saved several dozen frames throughout the run.
New Cave Stage (10-00) Route: we've found a way to completely avoid moving platforms in the cave stage. Described in detail below, this required a much more extensive use of the scroll glitch.
Early Orb Grab Landing: This is a new use for the scroll glitch initially theorized by eien86 and then refined by Challenger, where spawning platforms at the boss screen allows us to land faster after grabbing an orb. A faster landing enables a faster level transition, which saves a few frames.
Faster boss kills: Detailed below, we've found ways to beat the Mummies, Death, and the Cookie monster faster.
Bot: We used a bot to go optimize the established routes and try to polish the execution in many parts where frames could be saved. This included shaving off lag frames.
Software + Hardware
Rom Information
Name: Castlevania (U) (PRG0) [!]
SHA1: A31B8BD5B370A9103343C866F3C2B2998E889341
MD5:00D93C9F6B8AEFB8B6C02B20147DF4EC
Emulator
EmuHawk 2.8.0 (Core: NesHawk)
Manually resynchronized by Challenger from a EmuHawk 2.8.0 + QuickNES movie.
0x0018 - Game Mode
0x0019 - Game Sub Mode
0x0028 - Current Stage
0x0046 - Current Substage
And the following criteria:
Start. Starting game sequence, including boot, pressing Start, and the walking scene.
Cutscenes. After a cutscene, the stage starts when the player gains control of Simon (Game mode: 05, Game Sub Mode: 06)
Entrance. This is the animation of Simon entering the Castle or the last level's big demon head. (Game Mode: 10)
Doors. Walking through doors are driven by a 16-frame-rule and must be taken into consideration separately. By doing this, we can see what gains were made with respect to the old movie, which were later lost due to a full frame rule not being saved. (Game Mode: 08)
Stairs. Since these transitions are not frame-rules, we count a transition when the Current Sub Stage number increases by one
Level End. The level officially ends on landing after grabbing the orb after killing the boss. (Game mode: 12, Game Sub Mode: 1)
Movie End. This category's end time is taken at the frame of the last input.
Game End. The actual moment when the game ends by grabbing the orb and landing after killing the cookie monster. (Game mode: 12, Game Sub Mode: 1)
Comparison Movie
Here is a per-level comparison between this movie and the currently published TAS:
No significant changes have been introduced in this stage.
Stage 01-00
No significant changes have been introduced in this stage.
Stage 02-00
No significant changes have been introduced in this stage.
Challenger: While this stage can't be improved due to frame rule, I took advantage of that for another item drop when killing that bat - he drops holy water but it's not possible to grab it because lower height... well, there's a reason why we skipped this subweapon, and I'll explain it.
Stage 03-00
Here we use the scroll glitch to keep the middle platform at the boss battle, to enable early orb grab. The glitch requires 4 frames, but the trick saves 5, so we get 1 net frame save.
We also removed the use of the stopwatch from the previous TAS, for the purpose of ending the game timer at a lower number, which gave less bonus score, but resulted in 3 fewer frames of post-boss transition.
Challenger: Yep stopwatch usage adds more time left at the end, and we keep the axe subweapon this time because...
Stage 04-00
No significant changes have been introduced in this stage.
Challenger: The axe can beat this first room with the same amount of time as when this room was played using holy water.
With axe subweapon this time, we must kill the knight enemy - he normally dies with 2 axe hits but if you hit another enemy on the next frame alongside the first enemy (there a bat in this room too) with a single axe, it will result on a double hit, killing both of them.
Fun fact: An item drop in this room could be possible but unfortunately it would require wasting some frames - that's why holy water was skipped this time, but that item drop on stage 02 was necessary because we need the boomerang at the next item drop from the following room.
Stage 04-01
No significant changes have been introduced in this stage.
Challenger: Axe sucks in this room, because it won't kill the first knight enemy this time. With this enemy alive, this room can lag at the middle of this room (because another knight enemy spawns, as well as having some candles present) but with some trial-and-error the lag problem can be avoided.
Stage 05-00
No significant changes have been introduced in this stage.
Stage 05-01
This is certainly the level where the fun began. The bot found a way to execute medusa skip by 16 frames, exactly enough to catch the previous frame rule at the door transition. The keys to the improvements were a smoother execution of the scroll glitch and getting the medusa skip closer to the exit door, as shown below:
Stage 06-00
The second improvement is the idea by Challenger, to remove an extra block from Stage 06-00 to facilitate a faster jump towards the top. Note that every single application of the scroll glitch takes the bot 4 frames. However, the savings from removing this block was enough to save a whole 9 frames.
Stage 06-01
The improvements in this stage came from a better execution of the scroll glitch in the Medusa boss room. It's here that eien86 initially came up with the idea of the early orb grab: by scroll glitching an additional block, we could trigger the transition earlier. In the picture below we compare the TASes at the exact frame where the orb is grabbed:
Stage 07-00
The saved frames in this stage came exclusively from a better execution of the scroll glitch.
Stage 07-01
Here we decided to remove the last block before the door to accelerate the descent before activating it. This had no impact on the frame counter since the door enforces a frame rule. However, we kept it because it looks cool.
Stage 08-00
No significant changes have been introduced in this stage.
Stage 08-01
No significant changes have been introduced in this stage.
Stage 09-00
We added a new instance of the scroll glitch to create a fake platform in the boss' room for one of the biggest early orb catch in the game, saving 7 frames:
Challenger: I didn't consider testing this instance of the scroll glitch despite testing this glitch on the 2020 pacifist TAS (which has a very different strategy), so the OHKO strategy for this battle is new indeed.
Stage 10-00
Perhaps the most broken of all stages, the list of differences here is large.
First, Challenger discovered that there exists a void block that can be glitched in where Simon can stand and save a few frames from the moving platform.
Challenger: I waste a boomerang at the start of this stage and didn't pick the big heart despite destroying the candle in order to avoid an almost unavoidable lag frame soon after Simon get out the moving platforms (fortunately it's possible to gain another big heart by killing a fishman on certain frames - item drop). This lag is very weird, because avoiding it requires some trial-and-error and right timing.
Second, eien86 discovered that, by removing the top stalactite on top, it is possible to exit the cave skip with a jump, which saves Simon from 'clunking', an unavoidable pause he takes when falling from a height.
Third, Challenger found a way to create an artificial 'stair', initially theorized by scrimpeh, that allows us to skip the moving platforms altogether. These blocks are brought into this part of the stage from its very beginning.
Challenger: Skipping those moving platforms was only implemented near the end of this project, although I considered implementing it since I started working on the second version of this TAS.
My original idea was build an artificial 'brigde': using the same platform from the previous TAS + adding an extra platform that would allow him skip waiting for the moving platforms. Unfortunately some frames were lost at the end because the setup for the required extra platform was awkward.
This strat was revived later in the progress after discovering that void block timesaver, since you must wait for the moving platforms anyway. 2 frames were gained at the end.
Soon after achieving this holy grail, I optimized this strat even further, changing from a literal 'brigde' to an artificial 'stair' allowing me for a good opportunity to use stopwatch some frames earlier in order to gain some frames at bat skip without waiting at all.
I built another extra platform for the artifficial 'stair' because Simon must land on the middle raised platform sooner because otherwise he would miss the opportunity for another discovered scroll glitch:
Fourth, Challenger found an additional stair is possible to reach the end earlier.
Challenger: Actually the artificial 'stair' idea was originally theorized here, and the shortcut was discovered soon after I started the work on the second version of this TAS.
Stage 11-00
No significant changes have been introduced in this stage.
Stage 12-00
Through botting and manual optimization we achieved a better scroll glitch execution. We also added an early orb platform, for faster level transition:
Stage 13-00
The saved frames in this stage came exclusively from a better execution of the scroll glitch.
Stage 13-01
The saved frames in this stage came exclusively from a better execution of the scroll glitch.
Challenger: I didn't know this room has a hidden multiplier item, which was a great opportunity to increase the entertainment factor, as well as gaining III item at the start of the next stage before getting the axe subweapon.
Stage 14-00
A change in route is made here, where we grab the axe subweapon (instead of preserving the holy water). This makes the rest of the level a bit harder to solve, but will allow for a faster Death boss kill.
Stage 14-01
The saved frames in this stage came from a better execution and a slightly changed route where the scroll glitch is used to enable the upper path, as opposed to going downwards.
Challenger: I tested the upper path during my work on both previous any% and pacifist runs, but at the time it looked slower because I thought the required scroll glitch for door glitch would require adding an extra platform, forcing me to lose more time than using the old path and waiting for the axe knight moves away.
Stage 15-00
No significant changes have been introduced in this stage.
Stage 15-01
Here we changed the route from using the super-crit on Death to killing it using the axe. Not only is this approach faster on itself, but also has a faster setup since scroll glitching the door out is not required. This strategy was initially suggested by McHazard (movie) and optimized here by Challenger.
Challenger: Stage 15 was originally improved thanks to a better execution of the scroll glitch, and later in the progress:
Here comes the decisive moment I should have tried before: if you stun for a while the first axe knight with two axes, Simon can bypass the first axe knight by only a few frames thanks to the same attack pattern manipulation seen on pacifist runs. And the second axe knight is avoided completely by using the same strategy from the 2020 pacifist run, thanks to a frame perfect whip trick.
I was aware of the Death axe strat even before doing my first TAS of this game back from 2017, but bringing axe wouldn't work because axe knights sucks and the crucial whip trick was only discovered three years later. Once reaching the boss, initially I attempted to replicate the same movements from McHazard's movie file but the middle scythe didn't cooperate well. I asked eien86 for help, but we failed to fix that scythe.
I wasn't much satisfied with the result (despite being 8 frames faster than the previous version of this new TAS), so I decided to adjust the strategy by using that axe extra hit idea from stage 04-00 using two of three scythes and one of the candles of this room.
The boss normally moves to the left after the battle starts, but you can prevent it by hitting him on certain frames so optimizing every attack is important (though pausing the game helps too) in order to deliver the critical hit at the time when he starts to move. The final result is frame perfect strategy (and really satisfying).
This new axe strat is cool but unfortunately lots of points were lost during this and the previous stage.
Stage 16-00
In this stage, Challenger found that the bats can be manipulated to grab an additional heart and increase the 'kill counter', by killing Bat shots. This approach is crucial for having enough hearts to execute the rest of the route.
We also grab the stopwatch subweapon for a faster skip in the next stage.
Challenger: Initially after discovering the 'faster skip for the next stage', 3 frames were sacrified in order to get 2 hearts and the stopwatch by whipping those candles (seen in the screenshot above) before finding about the bat manipulations - it was only discovered after I beat Dracula.
EDIT 18/09: I got another extra heart to save time during the dracula battle.
Stage 17-00
Here, Challenger discovered that the skeleton bone skip can be made faster by the use of the stopwatch power. This 'wastes' 5 hearts, but this is compensated by the heart gained in the previous stage and the fewer hearts needed in the last boss fight.
Challenger: Too bad I didn't thought of that before, because adding this strat during the previous TAS would be actually possible since there are enough hearts to recover before fighting Dracula.
Stage 17-01
Arguably the most complex of all stages by reasons the casual watcher cannot see. Here, lag frame optimization, kill-count tallying (we need to kill a number of objects and enemies to obtain a triple shot later), heart count optimization, enemy pattern manipulation, health optimization, skeleton skips, and the scroll glitch all intervene. After an initial optimization with the bot, Challenger optimized this stage even further by achieving all the aforementioned goals in a flawless execution.
Stage 18-01
The most spectacular save of all, Challenger optimized this fight by inserting two instances of the scroll glitch to entrap the cookie monster and killing it with a much sooner last movie input.
Challenger:
EDIT 18/09 - Phase 1 improvements:
- By throwing the first boomerang with precise positioning and at the right timing before the battle starts, the boomerang will hit him twice as soon as he turns out solid.
- Pausing the game during dracula phase 1 affect both his positioning and pattern, but after finishing this TAS I found out it's actually possible to manipulate a faster pattern for cycle 2 without messing up his positioning by pausing as soon as he respawns - in "ghost" state.
- Using one of the candles will add an extra hit like seen on the previous boss.
- And some adjustments during the second cycle before going to the next phase...
For the first time in 18 years, we have a brand new strategy for phase 2 thanks to scroll glitch, and surprise: it doesn't require holy water this time!
Before phase 2 starts, I throw 2 boomerangs and at the last second I throw a third boomerang for an extra hit as soon as cookie monster appears.
Boomerangs doesn't 'permanently' stun this monster like the holy water so his jump pattern is unavoidable this time, but allows him for a critical hit then I take advantage of the invicibility to throw 3 boomerangs for extra hits before going to the orb location and finish input with the lastest boomerang throw, killing cookie monster just in time. Not only the input ends even earlier but also achieves a faster game completion.
Initially I used only one instance of the scroll glitch but it would require more time for staying away from the cookie monster before the invicibility expires, meaning I would throw 2 boomerangs instead of three, and requiring two jumps before going to orb location. Adding an extra tile would allow him to land near the end of the raised platform. 14 frames were gained between the lastest boomerang shots until the end input.
This scroll glitch was originally discovered during my work on 2020 but I'm not sure why I didn't test it before, although the reachable raised platform was really useful on pacifist run for both Dracula phases.
Fun fact: The jump pattern from cookie monster can be triggered even earlier if you press "B" on certain frames for some reason, and that was useful during the new strategy, combined with timing, positioning and optimizing every attack and boomerang shots before doing that critical hit.
Future Work
Although this movie has been extensively refined, we are certain that further improvements are possible. Here are some ideas worth pursuing:
Glitch Worlds Exploration
In this game, starting to climb a stair is a scripted event. At certain points of the map, if you press Up, you will start climbing up (similarly for climbing down). This is true, even if such stair is no longer graphically present in the screen, due to e.g., scroll glitching, or bad warps (see figure below).
However, the finalization of the stair climbing animation is not scripted. Instead, it is regulated by the NES PPU and its collision detection. It is only when Simon hits a solid block that he is allowed to exit the stair. If you by any reason remove such an ending block, Simon will keep on climbing until the next solid block. If no such solid block exists, then he will climb until reaching the limits of the screen.
Instead of triggering death, reaching the end of the screen will bring you to the next or previous substage, even if such substage doesn't exist. If you are in substage 0, climbing down will take you to substage 255 (-1, when signed). When these substages are not defined, the game will read from garbage when resolving the level:
We have detected many instances of these glitchy substages which are actually accessible with the help of scroll glitch. These glitchy worlds remain largely unexplored. Their potential is that, interacting with them might (a) modify other parts in memory that allows for a game breaking skip or, (b) trigger stage-changing doors earlier than the route allows.
For anyone (us included) interested in pursuing this possibility, we recommend downloading the rom hack by bogaa, which allows you to visualize door and stair triggers.
Better Boss execution
Boss fights are by no means proven to be optimal. There surely remains frames to be saved in the more complex battles.
Deeper bot exploration
Even though the bot helped a lot in figuring out better executions, this game is still quite complex. Especially when utilizing weapons (and several of them at a time), the exploration space becomes huge. This complicates especially boss fights, where the bot could not find any improvements at all. Either better ways to prune states, or simply waiting for server-grade CPUs to become x10 more powerful in the future could be very useful to improve those fights.
RTA feasible techniques
A common question in the speedrunning community is whether botting can help in developing more RTA friendly strategies. I have been pondering this question ever since I've been working with the Prince of Persia community. There are no simple answers for this, as it is hard to parametrize 'human feasibility'. However, I believe we are making some progress in this front and hope to get some framework for bot-driven RTA strategizing some year soon.
Acknowledgements and Attributions
Challenger: Authored the second version of this movie, totalling ~272 frames saved, and 8 more frames after submitting this run.
eien86: Authored the first version of this movie, totalling ~128 frames saved.
SBDWolf: He was the catalyst for my (eien86) interest in the game. After watching Summoning Salt's video on this game's WR, I took interest in watching runners in Twitch and, if I recall correctly, he was the WR holder at the time. He was kind enough to record his solution of level 1 on the emulator for me. This recording was instrumental for calibrating the bot. He also provided support, hints and ideas during the entire process. I am very grateful for his help.
scrimpeh: Suggested the 'artificial stairway' on the cave level which Challenger later showed it was faster that current strat, and was overall very helpful in the creation of this movie.
Trisklion: He was really helpful in providing technical knowledge in all of the (obscure) aspects of the game, and especially the scroll glitch. His help and support was instrumental in bringing this movie to fruition.
Crem / mooskgah: He came up with the idea of a speedrunning bot, an idea that I (eien86) would have never considered on my own (I consider myself first and foremost a glitch hunter). I was so inspired by his ideas that I decided to take them to the max. Here's the result.
The Castlevania I Speedrunning community: Many others contributed with ideas, comments and support. In particular, Shockra_Tease, Komrade, Kid Charlemagne, Dating, 2snek, Joshua (RG2084), Xytoriak, Scum, and McHazard.
Encoder Information
Suggested Thumbnails
Console Verification
Unfortunately, this game will prove hard to verify on a console. The reason is that one of its RNG generators depends exclusively on the relation between its 6502 CPU and its PPU. The CPU would loop indefinitely changing its RNG value until an interruption is made by the PPU, at which the last RNG value is produced. As far as we know, this timing cannot be pre-determined even between reboots of the same console.
For anyone willing to take a deeper look, the part of the code where this number is decided is shown here (excerpt taken from this public CV1 labelled disassembly):
It might be possible to nevertheless obtain a verification by attempting to run this solution many times. Only a few enemies' behavior are affected by this RNG (most notably, the spawn side of ghosts in stages 1 and 3), so it might be possible to achieve a verification within a realistic amount of attempts. If you have the time, go for it!
Another possibility is to try and run a hacked version of this game, where this generator is not pegged to the CPU/PPU clocking, but that wouldn't be ideal either.
Challenger: Now the TAS got console verified, thanks to Alyosha:
By adding an 'A' press at frame 37012, it is possible to end the proper game (Game mode 12, submode 1) one frame faster. However, this results in a movie that is 225 frames larger. The authors believe that encoding such a movie would take away from the beauty of the submitted solution. However, we leave this decision to the encoder's discretion.
Re-record Count
The submitted movie is a manual resync of a QuickNES-based movie that contained a re-record count of 208678. The re-records performed by the bot are not counted here (impossible to quantify, but would be in the order of 10^11)
Absolutely incredible work. There has clearly been a lot of effort that went into making this TAS. It's particularly mind boggling to me just how different this new TAS is from the previous one. For a game like Castlevania, I find that pretty incredible.
Amazing work, great combination of innovative botting combined with deep technical knowledge of the game. Great write up too.
There are already several console verifications of games with RNG as you describe here, its not that bad. Chance of success is something like 1/4 or 1/8. I'll try it assuming no one else does it first and I can figure out what a PRG0 cart looks like.
When I joined the site in 2010, I saw the published Castlevania run at the time as a beacon of optimization and technical perfection. A game that was studied so completely and a TAS that was realized so thoroughly that it would be impossible to beat. It was the movie that I wanted my runs to eventually be like.
Never in a million years would I have imagined what actually happened then.
Both of you absolutely tore this game to shreds at every possible juncture. Nothing is as I once thought it was. The boss strats, the orb grabs, the shortcuts, the gameplay in areas like stage 11. It's completely stunning to behold, and even though I saw the development of many of those strategies ahead of time in the Discord, it was still mindblowing to see it all come together. The faster scroll glitch setup is an absolute godsend. It allows using it for the most minute things that would never save time with the old method. As with the previous submission, I am in awe at how many places it can be used. Once again, the ingenuity is fantastic. I also loved the bone damage boost in Stage 17, the axe being used for Death, and so many other things.
I am also really impressed how it is now possible to bot a game as complex as Castlevania. This is also something I would've considered not in the cards when I was new. The result absolutely speaks for itself.
Absolutely phenomenal work. Challenger, eien86, I salute you.
I guess I lost my old college email address and can't get into my old account (Morrison) but great work on the new TAS. New tech looks really optimized. GG!
[Mod edit: account restored!]
TAS is console verified! (Took ~10 tries)
-EDIT: video updated below
I forgot to turn on 60 fps recording so the quality isn't very good, I'll replace it with a better one later this week.
Really cool to finally see a verified Castlevania run, what game do you think you will try your bot on next eien86?
Yeah and the old runs of this game that uses this emulator really desyncs in the lastest version too. Glad you managed to run this new any% TAS on console :)
Speaking of pacifist TAS, I'm aware the current run can be improvable with the new scroll glitch method, so we are working on a new TAS of this category too.
My homepage
--Currently not much motived for TASing as before...--
But I'm still working.
During my work on pacifist tas, I discovered an possible improvement for dracula phase 1 that works on any% run too.
Probably I'll spend some days testing the entire dracula battle again, but once finishing it, I'll send a new movie file ;)
My homepage
--Currently not much motived for TASing as before...--
But I'm still working.
Joined: 4/17/2010
Posts: 11469
Location: Lake Chargoggagoggmanchauggagoggchaubunagungamaugg
How is it going so far?
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.
I managed to gain 7 frames for now, but I'm also testing another extra scroll glitch for dracula phase 2 I didn't realize before submitting this run, though the current strategy requires adjustments.
My homepage
--Currently not much motived for TASing as before...--
But I'm still working.
During my work on pacifist tas, I discovered an possible improvement for dracula phase 1 that works on any% run too.
Probably I'll spend some days testing the entire dracula battle again, but once finishing it, I'll send a new movie file ;)
Well, I lost some motivation while working on this game again, but now here's the updated movie file at last: https://tasvideos.org/UserFiles/Info/637991222174805377
About the improvement I've mentioned before: pausing the game during dracula phase 1 affect both his positioning and pattern, but after finishing this TAS I found out it's actually possible to manipulate a faster pattern for cycle 2 without messing up his positioning by pausing as soon as he respawns - in "ghost" state. This pause strat saves 4 frames.
After implementing it, I still discovered two more improvements for this game, gaining 3 frames and 1 frame, respectively. So 8 frames were gained at the end.
I also found an possible timesaver for dracula phase 2 (5 frames), but the timing between hits/boomerang throws/cookie monster manipulation doesn't collaborate well, ruining my idea :\
My homepage
--Currently not much motived for TASing as before...--
But I'm still working.
Comparison movie of the original level 16, vs Challenger's 8 frame improvement.
Link to video
Here Challenger manipulated the bats into getting an additional heart, which translated to an extra shot at the final fight, which enabled the improvement.