Submission #5045: MUGG's GBA Dragon Ball Z: The Legacy of Goku in 13:46.29

Console Game Boy Advance Emulator Bizhawk 1.11.6
Game Version USA Frame Count 49352
ROM Filename 0434 - Dragon Ball Z - The Legacy of Goku (U).gba Frame Rate 59.7275005696058
Branch Rerecord Count 49630
Unknown Authors MUGG
Game Dragon Ball Z: The Legacy of Goku
Submitted by MUGG on 3/14/2016 2:07:34 PM

Submission Comments


  • Uses death to save time
  • Takes damage to save time
  • Abuses programming errors
  • Genre: Action
  • Genre: Adventure
  • Emulator used: Bizhawk 1.11.6 with mGBA 0.4.0 core

About the game

The game covers the Saiyan and Namek arcs of the Dragonball Z manga/anime. As Goku, you fight enemies or accomplish certain tasks to become stronger and go on to protect the universe from the evil Frieza. While that sounds cool and all, this game has been implemented rather poorly. Here you have Goku, tournament winner and the world's strongest, who has protected Earth from Piccolo Jr and now his son has been kidnapped by his evil brother Raditz. Before you get to fight him, you have to complete tasks that are - objectively - rather boring, ranging from picking flowers to rescuing people. Most enemies you fight in this game are wildlife or no-name soldiers.
I still liked this game for what it is, maybe because I'm a Dragonball fan at heart, or maybe because it just spoke to me as a player and glitchhunter. I don't know. At least, the sequel, Dragonball Z Legacy of Goku 2, has seen a far better implementation so go check it out if you're interested. Bonecrusher and Amphorce are working on a TAS of that game at the moment.

Comments about the run

I first attempted TASing this game back in 2008 on the old VBA emulator. While I already knew about the faster flying technique (by switching between flying and walking repeatedly), I restricted myself to not using it, so I ended up walking for most of the run. This looked more clean and watchable to me but produced a run that was longer by more than, I estimate, 3 minutes. I never played past the Ginyu Force back then so the run was never finished. While dealing with other projects, I glitch hunted the game some and found some interesting things. You can read all about that on the Game resource page I made.
After mGBA became available for TASing on Bizhawk, I started looking at the game's addresses and stat growth (see here) and started working on a luascript. It took a very long time and dedication to finish my research. I found some interesting trivia, for example: The leveling up is not consistent. There are some odd gaps in the experience needed to level up, as you can see in the right chart. Level 20 and 21 only required you to gain another 100,000 experience, while Level 22 required a whopping 1,200,000. Maybe the devs intended for you to get this level up in the Frieza fight, and not before.
As far as this run's experience gaining and grinding is concerned, there aren't many options to work with in the first place. Grinding on random dinos or guards just isn't worth the time it takes. I did the mandatory forest tasks and opted to talk to Yamcha and Puar to level up earlier and have a faster Raditz fight. I killed Snake Queen to be a level higher for Nappa and Vegeta, thus speeding up those fights as well. I found that you could skip rescuing the missing kid in the snow forest by flying over the military border in a certain way and fortunately that task didn't give any experience so it didn't ruin my route. The next decision-making was done at the Ginyu Force: You could skip it altogether but that would leave you underleveled for Frieza. I don't have the notes anymore, but I think it would have wasted over a minute if you didn't level-up at the Ginyu Force.
So next thing I had to decide was to either kill Recoome, Jeeze and Barta (RJB) and leave Ginyu alone OR to kill Ginyu as well. Through thorough testing it appeared to me that killing Ginyu too was only a mere 1 second faster so I did that. The first plan to deal with RJB was to fight them all at the same time but I later found a better route: Recoome has lower health, so by prioritizing on killing him faster, I could level-up and deal more damage to the other two. I also found that I could kill a nearby guard to level-up and kill Recoome himself faster. Another thing I found is the use of Kamehameha being worthwhile. My luascript showed me that Kamehameha had a lot of potential for dealing more damage than punching so I ended up using it when I saw the chance. The Frieza fight (and also all the other fights to some extent) wasn't very optimized. I'm sure you could squeeze a lot of frames out of it but I had no insights on how RNG behaves. All the damage dealing was done purely on a trial-and-error basis and I had worked a very long time already and wanted to be done with the project. I estimate I worked:
  • 40 hours on researching and luascripting
  • 45 hours on the TAS
  • 15 hours on encoding/overlay


For more information, please go to the Game resource page.
Keep flying energy
In flying mode, the game depletes 1 fly energy unit every 9 frames or so. You can switch back to walking before that happens, and then continue to fly again.
Deal more damage
The damage you deal is based on some kind of RNG and changes almost every frame, but I have not figured it out very well. I resorted to a lot of trial and error to find the most optimal frames to punch enemies. If your punch is successful, it will make a crack sound. But when you punch and it makes a soft sound, that means it didn't do any damage. This can be because you hit a flop frame (a frame where your hit misses) or because the enemy is invulnerable for a small time.

The enemy can become invulnerable if he attempts to attack you (ki or punch) - after his attack animation, he gains 20 frames of invulnerability. He also becomes invulnerable for 80 frames whenever you successfully deal damage to him. Those two possibilities for invulnerability are treated separately - if either of the timers is nonzero, you can't deal damage.

Each enemy has some sort of Defense stat, but I was not able to figure it out, sadly. Basicly, based on your level, you can deal damage up to a certain amount (your max damage). If the enemy's Def is bad, you will deal high damage pretty much always. But if it is good, you will sometimes deal miserable damage (like, 36 damage when you could have dealt 2740, for example).

RTA players do not have any way of manipulating the damage; all they can do is to respect the enemies' invincibility periods. This TAS sometimes deals soft hits in order to manipulate for better upcoming hits.
Dino forest route
Just so I don't forget to mention it: I fly over the river and walk for a while until I can gain fly energy again. This is only about 6 frames faster than going the upper route that my unfinished run used.
Underworld 2nd spirit route
There is a route from the manager to the 2nd spirit that's about 50 frames faster. dlp_ found it and told me it, but I was already too far into the run so I didn't use it.
Enemy movement manipulation
The path finding in this game is buggy so you can get away with being very close to enemies but still not get hit. Console runners, in comparison, have to rely on the invincibility bug (fly and get hit by a ki blast - works on the US version only) to fight enemies whereas TAS can just walk around freely and be fine. I also manipulated Bubbles to walk back and forth a little so I could reach him fast. I like how the Kai planet turned out :)
Skipping the missing kid
I found this by chance and did it. Normally there is an invisible wall at the military outpost, but you can bypass it by walking at the corner of the fence and flying to the right.
Picking up flight energy orbs during battles
Was done because it saves time, duh.
Negative Damage aka. enemies that heal you
There is a bug where Jeeze and Barta can sometimes heal you instead of damaging you. I don't know why it happens but it came in handy in this run.
Death warp on Namek
I pick up the 2 required gemstones, saved and died. This is faster by 5 seconds than resetting (the intro cinematics are too long) or flying to the entrance without saving. I got this idea from RyuLetsPlay, I think, but I can't remember.
Kamehameha instead of punching
Sometimes, Kamehameha turned out faster. Even though you leave the enemy alone for a while, you deal worthwhile damage. I tried to use it optimally, but wasn't very sure when exactly to use it in the Frieza fight. I think I ended up with a good result though.

Possible improvements

  • Better luck-manipulation in battles. I think you can save time especially at Ginyu Force, and maybe Frieza. Though I imagine Ginyu Force to be hell to deal with :)
    Maybe you can save 2~6 seconds.
  • Better route in underworld, as mentioned. Saves 0.8 seconds or so.
  • In the Ginyu Force room, use the warp in the top-left right after killing Ginyu. Should save like 2~4 sec.

Thanks to

  • Everyone who stopped by my stream and said hi
  • pld_ for telling me about the underworld possible improvement
  • endrift for making mGBA
  • Bizhawk staff for making Bizhawk what it is

Noxxa: Judging.
Noxxa: Good viewer response. Accepting for Moons.
Anty-Lemon: Processing...

Last Edited by ThunderAxe31 on 12/19/2021 9:11:38 AM
Page History Latest diff List Referrers