TASVideos

Tool-assisted game movies
When human skills are just not enough

Submission #4452: dunnius's NES Hydlide in 05:11.62

Console: Nintendo Entertainment System
Game name: Hydlide
Game version: USA
ROM filename: Hydlide (U).nes
Branch:
Emulator: FCEUX 2.2.2
Movie length: 05:11.62
FrameCount: 18728
Re-record count: (unknown)
Author's real name: Michael Dunn
Author's nickname: dunnius
Submitter: dunnius
Submitted at: 2014-10-03 12:15:05
Text last edited at: 2014-10-10 13:37:24
Text last edited by: fsvgm777
Download: Download (3859 bytes)
Status: published
Click to view the actual publication
Submission instructions
Discuss this submission (also rating / voting)
List all submissions by this submitter
List pages on this site that refer to this submission
View submission text history
Back to the submission list
Author's comments and explanations:

Encode


(Link to video)

  • Emulator used: FCEUX 2.2.2
  • Uses the (U) version, which I believe is a frame faster than the (J) version.

  • Aims for the fastest time
  • Used a bot for most of the run
  • Heavy luck manipulation
  • Uses save and reload to manipulate luck
  • The run can be played back with the lua script alone

You can run, but you can't hide-lide

This is a 14111 frame improvement over Inzult's TAS, #1304: Inzult's NES Hydlide in 09:07.32, due to overall better leveling strategy and route planning which came from analyzing the game's memory addresses to better determine how the game works. Obviously this can be improved by analyzing the assembly, which I will get to at some point. I think the grinding can be improved quite a bit if I knew how monsters chose the position for spawning.

This used a bot for luck manipulation testing just like the easter egg version, #3980: dunnius's NES Hydlide Special "Easter Eggs" in 03:41.67. The same principles of luck manipulation apply here, and all the tools that I made for the easter egg TAS were useful for this TAS. Of course, this TAS does not use the infinite health easter egg, which, by the way, is not available in the (U) version, and does not use the infinte magic easter egg because it is not useful without infinite health. This is because leveling must be done anyways, and the animation to get infinite magic is very slow.

History

Feasel got me into this game because he was speedrunning this and needed assistance understanding the game mechanics. So I started researching various mechanics using memory watching and cheats, and the more I studied and understood the mechanics, the more I appreciated the game. This game is largely misunderstood because it was created in 1984 and uses ideas from that era, but is compared to games made in 1989 because of the late release in the US. Because I am an old gamer (and I am submitting this on my birthday because it worked out that way) I grew up playing old games, so I appreciate the older game mechanics. I first worked on the easter egg TAS because feasel found the TAS and I knew it could be improved, but also because it would be easier to TAS than this one. It was still very difficult, but it was good training for this TAS. Feasel and I worked on route planning for both the TAS and speedrun, which use different routes, but that is great because it caused many ideas to be considered. It took over a year, off and on, to get this TAS completed.

Lua script

This lua script =userfiles/info/17820044610355222 is set to automatically play this TAS without drawing the HUD. There are 3 boolean variables that can be changed. Setting do_drawing will draw the HUD. Setting do_remote_control will run the tas, clearing it will make it so you can play the game (of course you would want to play with the HUD). Setting Is_J_Version will make the remote control play the easter egg TAS, though you need to have the (J) rom loaded in order for it to play that TAS properly.

Health, and the ring does NOT regenerate health!

There is a 1 byte counter that handles recovery and damage from terrain. When the timer overflows, it adds an HP, and when it underflows, it reduces an HP. Only the 2 squares at Jim's feet are used to calculate the change for terrain. Each terrain has 2 base values, one for walking and one for standing. Each level (this is actually 0 based in memory) adds 1 to each value, and level 6(5 in memory) and above only uses the value for standing as the base value. The 2 terrain square values are added together and that value modifies the terrain counter. This probably need to be in a chart in a resource page for it to understood better.

The ring does NOT cause the extra health regeneration, it is actually caused by being at level 6 or higher.

Luck Manipulation

Luck can be manipulated by waiting (which is in 4 frame increments in fast speed, 6 in normal), by changing screens, by monster spawning (which can be affected by Jim standing where a monster wants to spawn), killing a monster, by a monster changing direction (Jim can manipulate the direction, which can affect the timing of the next direction change), taking damage, or by save reloading. There might be other factors, but luck manipulation is tricky because a change earlier in the run affects RNG later, so I had to use a bot to test in sizeable sections.

Since I have to wait to recover health in this TAS, there are far more possibilites for manipulating luck by waiting, which is great, except for the fact that it causes extra bot testing. I try to distribute the waiting as much as possible so that there are not long waiting periods. This is done by stutter stepping (a few delays after every step, but on grass only for health recovery). There are only a few places where there is a noticable waiting period, but they are very tolerable.

I avoid taking damage because health recovery is slower than the time saved manipulating that way.

In areas that are not grass I do not delay for luck manipulation, so I manipulate the stronger monsters to stay out of the way because each time I stop to do an attack on the monster, it costs 6 frames, and perhaps more if I have to delay or move to avoid damage. This adds up really fast. Luckily weaker monsters only cost a frame because Jim does not have to stop walking. But even that has to be limited if the experience is not needed.

Save reload must be done after the sword to prevent the infinite magic easter egg from occurring, which wastes time since it has no benefit because the animation takes 999 frames. It must also be done before the key to manipulate it to be in a better position. There are 3 memory locations that are set when loading a game: the tree for fairy 1, the tree monster for fairy 2, and the chest for the key. I am only interested in fairy 1 and the key since the position for the fairy 2 tree is set when that screen loads. The best place for the save reload is in the underground since there are fewer sceen loading frames on the reload. In the sword cave, reloading also resets the wisp positions, which can be useful. Unfortunately, there were no RNG values that I wanted in that cave, so I ended up using the key cave. But getting the RNG value from it is tricky and had to be botted.

Storage of monster position on previous screens

When Jim leaves a screen the monster positions are saved so if Jim comes back to it, nothing changes. This is useful in Feasel's speedrun where he uses wave on the wizards. It is important to note that the game only stores the 1 screen prior. When moving to a 3rd screen, the positions from the 1st screen are dumped. This is important because it is a useful way to manipulate RNG when grinding, and is the reason I use the 4 corners area of the lake for eel grinding. If there is a bad spawn, I can clear it by visiting 2 other screens. It is also why hyper grinding with only 2 screens is difficult. I can't reset a bad spawn so I have to waste more time for luck manipulation.

Attack/Defend modes

This is a clever game mechanic idea which forces the player to consider carefully how to engage in combat. In attack mode, Jim does lots more damage to the monsters, but monsters also do more damage to Jim. This means that being in attack mode constantly is not a good idea. The monsters will only attack in the direction they are headed, so attacking from monster's side or back is recommended (though it is hard to tell for many), though they can suddenly change directions, especially eels.

Experience

Each monster has a value for experience which goes down, and eventually to 0, as Jim gains levels. This requires a chart on a resource page since there is no formula for the starting values and the change. This makes planning the level grinding a bit tricky. Fortunately, eels give the most amount of experience at level 1 and 2, so it is obvious that eel grinding is best for a while.

When the experience reaches 100, it reduces 100 from the experience counter and adds a level (and also adds 10 HP and MP because the maximums for both also increase). Since the remainder is not cleared, it means that gaining the level from as close to 99 experience as possible is recommended, especially when the experience for the monster is reduced in the next level. So obtaining 46-49 experience before the eels is best since they give 50 on level 1 and 2. This means that the experience is 46-49 when level 3 is obtained (was 96-99 before leveling), so only 6 eels are needed at level 3 instead of 10 (they give 10 experience at that level), which saves time. The same is true entering level 5, which starts at 6-9 experience, which cuts another eel out (they give 5 experience at that level). I will explain my leveling choices in the section comments.

Leveling to 5 is necessary to get the wave spell which is required for the wizards. Further leveling is not required, but it speeds up the dragon and varalys battles. I analyzed the battle timing and the leveling timing to find the optimal leveling. This is why the infinite magic easter egg is not useful for this TAS.

Items

The cross and lamp (and vampire) are skipped because a TAS can see in the dark. Actually, my lua script HUD draws where the walls are, so I made my own lamp.

The sword and shield are not required, but they make the game much easier. The sword obviously increases attack, and the shield halves the damage taken, but only in defend mode. This means that the shield's use in a TAS is for the dragon and Varalys, which are fought in defend mode. The dragon can be fought in attack mode at level 8 or 9, but it is faster to fight it at level 7 due to leveling being slow at that level.

The rest of the items/events are required.

Section Breakdown

Outside sword cave and sword cave

Setting the game speed to fast saves time because there is less lag frames than normal speed (4 vs. 6) between input. The game uses lag frames to throttle the game speed.

This section was botted up to the sword, then had manual input to the outside. The delaying on the grass is done to manipulate RNG, with the additional manipuation of the path used, and of course minimizing traveling in forests since it causes terrain damage. I ended up using the screen to the right of the start instead of the screen above.

Delaying when at full health does not lose any time as long as the terrain counter does not overflow. The amount of delaying that was done is the maximum amount without overflowing.

Because I could not use save reload in this cave, manipulaing the wisps was a bit tricky. I found a path where I got to the sword with no delay. Finding a path that is clear of wisps after was tricky. After thinking about that I wanted to get to 46-49 experience before the eels, I realized that wisps are perfect for obtaining the extra experience needed, giving 7 experience with only 3 hits with the sword in attack mode. So I used the results from the bot testing to manually test getting back outside. I needed to kill only 2 wisps for 14 experience, and I found an interesting path. Jim is in attack mode to get to the sword, but when attacking the wisp which happens immediately after (no input done inbetween), it uses the sword damage calculation, which shows the order of operation. The second wisp's position was also perfect, so the only frames "lost" were the attacking frames for the wisps, so I consider this section perfect.

Pot, key, and back to the grass

This entire section was botted in 1 big piece. This was the most complicated bot test in the run. The general path taken again minimizes forests. The open spaces in forests are grass, so they are preferred. Stutter stepping is done here to minimize long periods of no input. 3 minor monsters are killed, not just because I needed experience, but it manipulated luck the way I wanted. However the extra kills were perfect because I wanted to get 48-49 experience because of the leveling that was planned.

There is a small standing still period before the roper maze, but it is not bad. It is the only place on that screen that is grass. Luck is manipulated to keep the ropers out of the way for the entire section, and without any delaying on the brick! Unlike wisps, ropers only give 2 experience, so they are not worth fighting.

In the key cave, the timing of the save reload had to be carefully planned, and was the other major objective in the bot test. Not only did its timing require that the RNG is set optimally to put the key in chest #1 and fairy 1 in tree #8, but it also has to be done with the terrain counter as close to 0 as possible. The reason is that reloading clears the terrain counter, so it is considered as terrain damage.

There are 2 paths in the key cave: going back to the roper cave, or going through the other side of the cave. They are rather close timewise (less than a second) in route, so both had to be roughly tested for general route speed. In the other route, I would have manipulated the RNG to use key chest #7.

After getting the key, the ropers are very luckily out of the way, so this section was perfect!

Jewel, fairy 1, and to the ring cave

This section was bot tested in 2 sections but sort of tied together. The first goes to the dirt area of the jewel, and the other did the remainder. I probably wanted to do smaller sections after doing the last huge section, but maybe it doesn't matter.

The delays that happen here are part of an overall HP recovery before the next cave. It had to be distributed thoughout the whole section.

There is another very short wait after the roper maze but because it is the only spot in the main path that is grass. Another slime is killed, so the total of minor monsters killed is 4, so now the experience is 18.

The zombies are manipulated to get out of the way since they are not worth fighting, and I don't need to kill any more optional monsters.

Fairy 1 is obtained with no time loss because of the optimal save reload.

The delay timing and path are chosen very carefully in this section to manipulate luck for the ring cave. I went into the ring cave with maximum health and terrain because I wasn't sure exactly how much health would be drained in the next section, but the extra health reduced the waiting in the following section. This section was done optimally.

Ring cave and fairy 2

This section was done manually because it involves more complicated battling due to the narrow hallways. One of the major challenges was getting a good RNG entering this cave so I can fight the goldams and ladyams without waiting around for the next monster.

In order to make the ring appear, you must kill 3 goldams without killing any ladyams. And to get the shield, you must kill 3 ladyams without killing any goldams. Because I am at level 1, each of them are 5 experience, so killing the 6 yields 30 experience, for a total of 48 experience.

I managed to find an RNG where I can kill 2 goldams instantly. There is luck manipulation that can be done by chosing one of several y positions to change screens without having to do any waiting. So I found one where another goldam is along the path and the ladyams stay out of the way. It was lucky that my manipulation also had a good position for the ladyam so it was right in the path on the way back after the ring. I was also extremely lucky that the ladyams in the next screen ended up being right on the way (there are only 2 y positions for luck manipulation coming back), so I only lost a small amount of frames getting the ring and shield, which is acceptable considering the complexity.

I was not that concerned about the luck for fairy 2 after the excellent ring cave. However, I managed to get lucky again to get a near perfect fairy 2 after all that, and I did not have to take an unoptimal terrain to get it. I am extremely happy with this section.

To the water

This was bot tested to manipulate optimal eel positions for the first 2 eels, to get to level 2. I also determined through testing that I only needed to have a minimal amount of HP since 10 HP is gained when gaining a level, so this section is very quick. I could have killed a slime, but at the time I thought that 48 was best. It could be slightly faster to be at 49 experience, but is difficult to test. This section of course is perfect because it is not complicated.

Eel grinding and wizards

This was done manually because of the complexity of the battles. The first 2 eel positions were manipulated to gain level 2 as quickly as possible so that Jim has enough health to get to the next level. The first eel actually was part of the bot in the previous section because the 2 dimensional aspect of the narrow passage made it easy to bot, so that is how I was able to manipulate the second eel's position.

For the remainder of the the eels, the hard part was finding a path where I can beat the eel quickly and force the next eel to spawn quicky. Sometimes I ended up with dead ends and had to go back a few eels to try another path. I used the 4 corner section of the lake for grinding because I used screen transitions to help with luck manipulation. I averaged 23.2 non-combat frames per eel, including lag frames for screen transitions. The advantage of using screen transition is that those frames do not cause terrain damage.

The point where I decided to stop fighting eels had to be carefully calculated. I killed 48 eels. I realized that I didn't need to be as close to leveling to 7 as I first thought because I realized that I can use the down time to fight hypers. But how close had to be tested, which was done manually. Another major consideration is the wizards.

I managed to find a wizard pattern where I could use the wave near the top of the screen. The reason this is important is that the fairy transport is extremely slow, so it is faster to be as high up on the screen as possible. The wave can only be used horizontally, which is a pain. Luckily, not too many frames are wasted in this process. I'm sure this section can be improved, but finding the best grinding is difficult.

Hyper Grind 1

In order to use fire on the tree to get to the grave, 30 MP is needed. Because wave uses 50 MP, some waiting is necessary before using fire. At level 6, Jim has 60 MP, so there is 10 MP left after wave, so 20 MP has to be recovered. There is a 1 byte counter for MP that increments by 32 every non-lag frame. When it reaches 256 it adds 1 to the MP. So in fast speed, 1 MP is gained every 32 frames, so 640 frames of waiting is needed.

Because Jim is at level 6 at this point, the terrain calculation always uses the standing values, so Jim does not have to be idle. I realized that I can grind hypers while I am waiting to save time. Since this is down time, the only time lost is the screen transitions, but even so the grinding is faster than grinding eels. I can't grind hypers as fast as eels because it is more difficult to manipulate RNG with only 2 screens. This section was done manually, and killed 20 hypers and 1 slime (for 0 exp, but it was done in order to make a hyper appear on that screen).

At the end of this section there is some minor luck manipulation for the next section by choosing when to screen transition from the screen above the castle. Again this could be improved like the previous section.

Grave

This was also done manually because there are a battles in narrow hallways. I knew from the easter egg TAS that it would be nearly impossible to find a pattern where I don't fight some monsters along the way, so I reserved some experience for this purpose. I had to get a route where I only fought the necessary amount of monsters (in this case 6 monsters killed), and they had to be along the way (mostly). But I also had to make sure that I manipulated luck for the next section. I had to go back and redo part of this because the RNG that I got initially was not good. This section could be improved, as usual.

Jim obtains maximum HP during this, so there is some terrain healing that is wasted. It can't be helped, and it is an aspect of being at level 6 and having the extra healing.

Dragon and Hyper Grind 2

This section was also done manually because of the battles. Because Jim must take damage when fighting the dragon (9 damage with the shield), there is lots of down time to recover health for that battle, and also after the battle to recover for the Varalys battle. I made use of the massive down time by fighting hypers. This time I avoided using screen transitions because there is plenty of time to fight 90 hypers. The dragon is worth 10 experience, so I get to make use of that experience. I again kill a slime to make hypers appear on that screen. I could save some frames by getting to level 8 quicker, but the extra HP gain is not worth the time if I have to use screen transitions. Again this would benefit from better luck manipulation.

I chose level 7 to fight the dragon because at level 7 grinding to 8 takes longer than the time saved for a quicker battle.

The reason I grind to level 8 is that I get a much faster Varalys battle for very little grind cost since it is done during down time. From some rough testing, level 8 saves around 18 seconds over level 7 for Varalys.

Ruby and to Varalys

This was bot tested because I had to find a path in the underground where the blackams stayed out of the way, and also to get an initial Varalys pattern where Jim only has to walk 1 step to fight. There are patterns where Varalys is right next to Jim, but then Jim has to take a damage before being able to fight, so that is significantly slower.

There is some additional waiting to recover health which is why Jim is goofing off on the grass sections. I made use of that additional time to create lots of possibilites for luck manipulation. The amount of waiting done is to get the optimal HP and terrain values for fighting Varalys. Because this section is small, it is done perfectly.

Varalys

This was done manually because it is hard to bot goofing off. I start the Varalys battle with just enough HP near the maximum to be at 1 HP when delivering the attack mode hit that uses the medicine. That way I avoid healing too much before the battle. I also manipulated the terrain values so that the HP gain from it overflowing is done as close as possible after using the medicine. It had to be done on the second hit after because terrain is calculated before battling, so the HP gain would have been wasted with full health on the first hit. This minimizes the amount of health recovery (about 10.67 HP) needed to get the final hit, which is done when Jim's HP reaches 14, since Varalys does 13 damage in defense mode with the shield equipped.

At level 7, as shown in Feasel's speedrun, it is faster to go outside to recover HP on the grass. This is feasel's discovery. But at level 8 it is faster to wait in the underground because the screen transitions eat up lots of time. I calculated that it is worth it to go outside to recover at around when there is at least a little over 14 HP to recover. The advantage of not going outside is that I don't have to bother with luck manipulation to keep the blackams out of the way, which is a problem coming back to the underground since that screen is the prior screen to the outside, so the blackams' positions are not reset. This would have been a major pain if I was fighting Varalys at level 7.

So because I stay on the Varalys screen to recover HP, the Varalys music gets to play for a little while, and there is some fun playaround while waiting, but not too long. This section is perfect since the setup was done in the previous section.

Thanks

  • Feasel for getting me into this game and helping with ideas for route planning.
  • Inzult for the previous TAS
  • FractalFusion for the research of the RNG which made testing easier.

  • Jim because he stood up and took action.

Suggested Screenshot

14810


turska: Judging.
turska: Accepting for publication in the Vault as an improvement to the published movie.

fsvgm777: Processing.


Similar submissions (by title and categories where applicable):