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

Submission #2493: sgrunt's GG Sonic the Hedgehog in 19:18.7

Console: Game Gear
Game name: Sonic the Hedgehog
Game version: any
ROM filename: Sonic the Hedgehog (JUE).gg
Emulator: (unknown)
Movie length: 19:18.7
FrameCount: 69522
Re-record count: 5690
Author's real name: SJM
Author's nickname: sgrunt
Submitter: sgrunt
Submitted at: 2009-12-14 03:24:28
Text last edited at: 2009-12-23 21:09:21
Text last edited by: sgrunt
Download: Download (3765 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:
This is an improvement of 0:20 on the in-game timer over wwmarx's rejected submission. An impressive two-fifths of this is from a single level. It is slower in real time due to signpost spinning and large numbers of extra bonus points.

Game objectives

  • Emulator used: Dega 1.16 MAME core
  • Aims for in-game time instead of real-time
  • Uses death as a shortcut
  • Takes damage to save time
  • Ignores delays caused by bonus effects
  • Abuses programming errors in the game
  • Moves character too fast for screen to keep up


Sonic 1 (and Sonic 2) for the Game Gear are amongst the first console games I can ever remember playing, so this run is rather dear to me.

As with all(?) of the other Sonic runs on the site, this run is intended to minimise in-game time. Because I hit the signpost as soon as possible, Sonic is usually at full speed and the sign usually wastes quite a few frames spinning up in the air, which I am not counting for the purpose of timing. This is not the only bonus effect that is ignored - the game, especially the GG version, has excessively large bonus point awards on the end-of-level screen for the times achieved.

This run is made on the Game Gear version. My main motivation for doing this was to have a direct basis for comparision in the form of wwmarx's run. Other reasons for doing so include some altered level designs and easier boss fights; I make no comment as to which version is preferable.

The following table sets out times for The Sonic Center (caveat: the times there are from the SMS version), mike89's unassisted run, wwmarx's submission, and my submission.

Stage Sonic Center mike89 wwmarx This run Time Gained (total)
Green Hill 1 0:18 0:19 0:19 0:18 1 (1)
Green Hill 2 0:22 0:24 0:22 0:20 2 (3)
Bridge 1 0:19 0:27 0:25 0:17 8 (11)
Bridge 2 - 1:53 1:53 1:53 0 (11)
Jungle 1 0:25* 0:34 0:28 0:28 0 (11)
Jungle 2 0:33 0:36 0:27 0:26 1 (12)
Labyrinth 1 0:27* 0:38 0:34 0:34 0 (12)
Labyrinth 2 0:56 1:09 0:56 0:53 3 (15)
Scrap Brain 1 0:27 0:29 0:27 0:27 0 (15)
Scrap Brain 2* 1:14 1:00 0:57 0:53 4 (19)
Sky Base 1 0:22 0:30 0:22 0:22 0 (19)
Sky Base 2 0:08 0:12 0:09 0:08 1 (20)

  • See stage comment below.

Most of the ludicrous times are obtained through extensive use of several glitches in the game physics:

  1. "Roll-zipping". This is the earliest known glitch, and predates all of the TAS attempts. Basically, if Sonic is in ball form, usually from having ducked down or from hitting something while jumping (a regular jump doesn't count), and enters mid-air (usually from rolling off an edge or down a ramp), he accelerates constantly; this allows very high speeds to be obtained. I'll refer to this as "roll-zipping" in the balance of the run comments.
  2. Speed trick. Pointed out to me by SprintGod. Sonic's velocity in this game is normally limited to 768 (0x300) units per frame while running on the ground, but this is only checked for the frame after Sonic exceeds this velocity. This can be abused: from a stop, Sonic can run up to a velocity of 768 units. One then taps down to rollfor one frame - deceleration while rolling is 4 units per frame per frame - to hit a velocity of 764 (0x2FC) units, taps back to stand back up (this has a side effect of braking Sonic by 48 (0x30) units per frame per frame, to hit a velocity of 716 (0x2CC) units per frame, then runs for four frames - accelerating at a speed of 16 (0x10) units per frame per frame to reach a one-frame velocity of 780 (0x30C) units per frame. If the forward direction is pressed in the following frame, velocity will drop back to 768; instead we release the forward direction, causing Sonic to decelerate 16 (0x10) units per frame per frame for one frame to reach a velocity of 764 (0x2FC); alternating between forward and no direction key causes velocity to toggle between 780 and 764 for an effective speed of 772 units per frame. By using the alternate acceleration/deceleration values of slopes, it's possible to achieve toggling between 766 (0x2FE) and 782 (0x30E) units per frame, for an average velocity of 774 units per frame, but this is rare in practice. Performing the speed trick on the ground causes lag due to the rapid switching between animations; fortunately, given an appropriate starting velocity, it can be done just as well in the air where no such animation switching takes place, so you will see Sonic spending a lot of time in the air wherever the speed trick is in use.
  3. Acceleration trick. Also pointed out to me by SprintGod. When braking from a roll in the manner described above, the one-frame deceleration is always applied towards the left, so if Sonic is moving towards the left he gains 48 (0x30) units of speed braking out of a roll. By rapidly rolling and braking while moving to the left, Sonic accelerates at an average of 22 (0x16) units per frame up to the game's internal maximum limit for velocity.

As a side comment, Sonic is incapable of spin-dashing in this game (as with Genesis Sonic 1), turning TASing the game more into an issue of maintaining speed.

Here are some RAM addresses (thanks to SprintGod for pointing these out):

  • 0xD3FE-0xD400: Horizontal position
  • 0xD401-0xD404: Vertical position
  • 0xD405-0xD407: Horizontal velocity
  • 0xD408-0xD40A: Vertical velocity

Stage by stage comments

Green Hill 1

This level's basically been set up for roll-zipping through the use of the large hill, and it's probably one of the few significant roll-zips that can be done fairly easily in real time. With judicious use of the speed trick up to that point, Sonic achieves a time once thought impossible to achieve on the GG version of this game.

It's possible to stop right before the signpost and lose no perceptible time while waiting for the screen to catch up. I don't do this in favour of hitting the sign at the earliest possible moment - made easier by being at full speed.

Green Hill 2

This winding level layout provides the first demonstrations of the acceleration glitch, and also contains one large roll-zip at the end - I need to slow down considerably before hitting the last ramp to avoid overshooting the signpost.

Green Hill 3

This boss fight is considerably easier in the GG version - over in SMS land, Robotnik normally hovers out of jumping distance for a considerable part of the fight, but there's not enough screen room here for that to be possible and he goes down quickly.

Despite judicious use of the speed trick, no frames are saved; it's possible that Robotnik's appearance is on a timer or something similar.

Bridge 1

This level is probably one of the highlights of the run - completed in the impossibly low time of 0:17! The trick that allows this is abuse of the scales - it is quite possible to roll-zip from them by rolling just before the weight hits the other side - the massive air time resulting from this leads to truly absurd speeds. Combined with bouncing off of monitors and enemies and a handful of additional roll-zips, this level passes by so quickly you can see how Sonic gets his reputation of being the fastest ever video game character.

Although obtaining the shield and rolling over the bridge during this roll-zip cause lag, it's also critical not to do anything to lose speed during that segment to make the impossibly low time feasible.

This level has seen the most improvements over the course of working on this run. In an earlier version of this run, the precise input sequence leading to the massive chain of roll-zips that make such short work of the level was discovered quite by accident - in one of the earliest WIPs I had achieved 0:21 from a less impressive set of roll-zips, then discovered that the input for Green Hill 3 up to the boss fight had somehow been erased in the interim. I reran that segment and spliced the input past that point on, only to find the run would desync when hopping on to the scale; I attempted to tweak the input by hand and quite mistakenly ended up achieving a long sought-after 0:20 time. Although that iteration looked slightly sloppy, I didn't want to touch it for fear of disturbing the roll-zip, but then mike89 pointed out what (correctly) looked to be a slight improvement to GH2; I went and inserted that into the run and sure enough it caused the roll-zip once more to desync, and in a very strange echoing of circumstances ended up improving the roll-zip into a very low and much better-looking 0:20. Then SprintGod came along with his new (to me) set of glitches, and I restarted the run; with those glitches, his information about velocity RAM addresses, and the knowledge of how to work the scales from my WIPs, I was able to shave another impressive three seconds off of the level to what you see now.

Bridge 2

The game's requisite auto-scrolling level, also making it the most boring level in the game, and made even worse coming hot off the heels of one of the fastest levels in the game. My major priority here is lag reduction, considering how atrocious wwmarx's run of this level looks without it. To that end, I take a hit from the first enemy in the level to lose the shield and kill most enemies the moment they appear on the screen.

During the long interregnum, I bounce around idly and collect most of the rings. There are enough in the level that the special stage would normally be triggered at the level end (which happens with at least 50 rings), so I take a hit from the second-last enemy in the level to drop the rings (I didn't use the last enemy because it's placed in such a fashion that using it would cause two bridge tiles to drop instead of one).

Bridge 3

Another short and sweet boss level. Although rolling across the bridge causes lag, it's still the fastest way to get over to the boss, even considering the resulting lag frames.

Robotnik spawns on the left hand side twice, unlike wwmarx's run, where he appears on the right for his second attack. I don't know what controls his spawn pattern. It takes 24 frames more for him to leave the screen than if he's on the right, as found in the WIP; only 11 frames are lost due to time savings from using the speed trick..

If you look carefully, you will realise that Robotnik's contraption doesn't explode and that the capsule has fewer explosions than usual. Apparently Sonic rolling across the bridge is so fast that the boss doesn't have time to finish loading the boss. Funny, no?

Jungle 1

This is probably the level of which I was least certain going into the run; there are fairly substantial differences betweeen the SMS and GG versions of the game and I wasn't sure, given the three-second differential between TSC's time and wwmarx's time, whether wwmarx's route would be the most optimal strategy. I consulted mike89, who's far more familiar with the game than I am, and he stated he could not see any obvious improvements to the route, so I decided to work with it anyway.

The shield is only collected for the purpose of having something to bounce off of for roll-zipping purposes, but it comes in handy during the next level.

It turns out that running on the log in the middle of the level is treated as though Sonic is running on the ground; instead of jumping across as in wwmarx's run, I therefore use the log. This does not appear to make much of a time difference in the end, unfortunately.

Jungle 2

An unusual vertical-scrolling level. The SMS version here locks the screen in place during jumps, and also does not scroll back down such that Sonic dies if he misses a jump; these are cited as two reasons for preferring the GG version, but they are irrelevant in a run of this nature.

The damage boost in the middle of the level seems to have been discovered by wwmarx. It puts the shield from Jungle 1 to good use; otherwise one would need either the shield found a couple of moments before or a ring, both of which are out of the way enough that needing to get one of them would probably cause the loss of an in-game second.

Jungle 3

I guess none of these boss fights are much of a challenge when one has perfect reflexes.

Labyrinth 1

The trick used to obtain TSC's time has been lost, but is believed to be SMS-specific. The level is far from glitch-free, however; in particular, abuse of the first rising platform leads to a vertical zipping trick (completely unrelated to roll-zipping, despite the terminology).

The bounce off the ceiling corner at the beginning needs to be very nearly frame-perfect to work as advertised; surprisingly, it can be done in real time (see mike89's unassisted run for an illustration of this).

The speed trick, unfortunately, doesn't work underwater - acceleration and deceleration are both 4 units per frame per frame. The acceleration trick, however, does work, but only gives an effective acceleration of 4 units per frame per frame, equal to just running on the ground - therefore its only utility is exceeding the underwater speed limit of 256 (0x100) units per frame.

I need to slow down in the water at 0:10-0:11 as the spike at 0:13 doesn't retract until 0:13 - I time the slowdown and jump to just clear the spike.

The most arduous part of this level, oddly, is the sequence of jumps starting at 0:23, particularly the jump out of the water at 0:29 - Sonic's vertical velocity is greatly reduced during this jump for whatever reason, and needs to land very precisely from the previous jump to allow time to gain enough horizontal velocity at the edge of the platform to make it up onto the next ledge.

Labyrinth 2

The second-longest level in the game in a distance sense (time-wise goes to Bridge 2, boring level that it is). An added unnoticed roll-zip near the start and judicious use of the acceleration glitch shave a huge three seconds from this level.

Labyrinth 3

Desperate measures force Robotnik to try attacking underwater in an attempt to be more difficult. In the face of the fastest character in the video game universe with much better reflexes than normal, this plan naturally fails miserably.

Scrap Brain 1

One of the most straightforward levels of the game; sadly, a better time is more or less prevented by the doors, given the need to slow down to avoid hitting them on the way in. Rolling under the doors in the fashion you see here gets through them as quickly as possible, and has been timed to maintain the most possible speed, but that isn't enough to save a unit.

Scrap Brain 2

This is the lengthiest level in the game; it is laid out in three parts. Normally it is even longer than the time would suggest, but much of it can be skipped. In the middle of the level, a switch is hit which moves several doors around. Notably, a door falls to block the spawn point for the level segment from the switch, and opens another door from the spawn point to the path to the exit - so dying after hitting the switch is faster than going through the intended route! The timer resets to 1:30 upon this death; the listed time is the sum of the pre-death time and whatever additional units are on the timer at the moment of hitting the signpost.

mike89 suggested attempting to use the acceleration glitch upon hitting the switch to pass through the door which closes to the left, which by my estimate would save 4-5 units. I tested this possibility very thoroughly, and have concluded that it's still not possible to build up enough speed, even from a running start further boosted by jumping off the right edge and/or using the spring.

wwmarx goes and jumps into a pit to trigger a death, wasting three units instead of going and hitting the nearest enemy. I also save a unit in the final segment thanks to judicious use of the acceleration glitch

Scrap Brain 3

Sensing that another fight is futile, Robotnik instead chooses to run away - Probably a smart plan, given the strange abilities Sonic has demonstrated this round.

Sky Base 1

What would otherwise be a very straightforward level is complicated by the electric grid in this level. It prevents the hill at the beginning from yielding a useful roll-zip and puts timing constraints on the rest of the level; it is exploited for a couple of damage boosts, however.

Sky Base 2

Most of this level can be - and is - skipped, which is good, because the intended route is lengthy and annoying.

Sky Base 3

Unable to run any further, Robotnik hides in a glass tube. Unfortunately, Sonic is so fast he manages to embed himself in the tube. So much for that plan.

Other comments

Suggested screenshot: frame 13600

As a reliable encoder, it would be irresponsible of me to submit a run and not provide you with an encode right off the bat. So, you can find that here, or watch it on Dailymotion: part 1 and part 2.

I offer my thanks to wwmarx (who made a valiant - if ultimately of questionable quality - attempt at this game), alden (whose initial and long-on-hiatus attempts at TASing the game led partly to my interest in making this run in the first place), mike89 (who did an unassisted run of this version of the game, and whose insights and commentary on strategy and game mechanics proved very valuable), and SprintGod (who pointed out the speed trick, acceleration trick, and several RAM addresses and provided me with at least one very tight target time while restarting the run in the wake of this).


adelikat: Accepting for publication based on positive user feedback (and fast sonic action!).

Similar submissions (by title and categories where applicable):