TASVideos

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

Submission #4537: marzojr's SegaCD Sonic the Hedgehog CD in 17:04.27

Console: Sega CD
Game name: Sonic the Hedgehog CD
Game version: USA
ROM filename: Sonic the Hedgehog CD (NTSC-U) [MK-4407].bin
Branch:
Emulator: Gens 11b
Movie length: 17:04.27
FrameCount: 61377
Re-record count: 17983
Author's real name: Marzo Junior
Author's nickname: marzojr
Submitter: marzojr
Submitted at: 2015-01-04 22:59:06
Text last edited at: 2016-07-12 00:32:02
Text last edited by: marzojr
Download: Download (3840 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:
Outtakes.

A completely new TAS of the slow-paced weird brother of the Genesis Sonic games. Every level has been replayed entirely and improved, and none of Nitsuja's or Upthorn's input survives. All told, it is 0'31"53 in in-game time faster than the previous movie.

Emulator used: Gens 11b + SCDCamhack + SolidityViewer + (partial)HitboxDisplay + LUA HUD for Genesis Sonic games

Game objectives

  • Ignores delays caused by bonus effects
  • Aims for fastest (primarily in-game) time
  • Takes damage to save time
  • No deaths
  • Abuses programming errors
  • Uses time travel to save time

Comments

Synch and JP version

The US version of this run was done with a bin/cue of the US disc, where the bin had MD5 091498f94fe76d5c43af5f513e2b5e8f. The BIOS used was named us_scd1_9210.bin (version 1.1), and has MD5 2efd74e3232ff260e371b99f84024f7f.

The Japanese version of this run was done with a bin/cue of the Japanese disc, where the bin had MD5 bb293a0b5a5ad9dea4f0c807c7a3d694. The BIOS used was named jp_mcd1_9112.bin (version 1.0), and has MD5 bdeb4c47da613946d422d97d98b21cda.

Making the Japanese version was a matter of compensating for lag frames and BIOS differences. Since the submitted zip file can only have 1 movie, I uploaded it here; ROM name is "Sonic the Hedgehog CD (NTSC-J) [G-6021].bin".

General Comments

A troll Sonic game by any standards:
"Where S2 rewards skill with speed and punishes failure with slow, SCD punishes speed with walls and interruptions, and rewards going slow by letting you progress at all"
― Covarr, in this post

The peelout and spindash are slow to charge. There are many dead-end routes which force backtracking, and troll springs placed on places where they are guaranteed to slow you down or bounce you back. Everything in the game is designed to make you go slow. Despite this, the game can be quite fast if you know how to abuse the engine.

This run was made with constant reference to a partial in-progress disassembly of Palmtree Panic 1 Present, with skeletal disassemblies of other zones being done as needed. This was possible because the game shares a common code base among all zones, with a few tweaks here or there (for example, you can play as a full-featured, if invisible, mini Sonic in all levels by using the PAR code FF195A:0001; he is even visible in Tidal Tempest). These disassemblies were used to determine exactly how a few things worked so they could better be abused; they are not available anywhere yet. All in all, very little was found that helped.

The Moving While Charging Peelout (MWCP)

One of the major sources of improvement in the run, the exact workings of it were found by reference on the disassembly before it was tested on the game. Nitsuja and Upthorn understood the basics of this, but failed to realize its true potential. In a high-level manner, here is how this works:
  1. You start charging a peelout (duh);
  2. while charging a peelout, the game checks if you are at the edge of terrain (important) or an object (not as important, but also interesting);
  3. after determining you shouldn't lose balance, it then proceeds to the peelout code: there is a 16-frame timer for looking up or down after you press up/down that prevents you from starting a peelout or spindash;
  4. when you press or hold down while charging a peelout, the game determines whether you should duck (if you had pressed down to start the timer mentioned above) or start charging a spindash;
  5. after either of the paths above, the game goes into the normal code that applies natural deceleration when running and not pressing right or left; this code is skipped in the normal course of charging a peelout;
  6. after this, the game updates your X and Y speeds based on ground angle and inertia; this code is skipped in the normal course of charging a peelout;
  7. finally, the game checks for zipping; this code is skipped in the normal course of charging a peelout;
  8. after this, the game checks whether or not to start rolling.

The variant used by Nitsuja and Upthorn simply pressed down. This caused a frame's worth of deceleration to be applied (but because of (2), the deceleration applied was wrong: 13 instead of 12), the game checks for zips on this frame, and there is the possibility of rolling. In the end, you have 4 cases:

  1. 1-frame charge + 1-frame deceleration (Launch speed 87), no zip: speed is insufficient for rolling, so you don't roll and get to keep the launch speed;
  2. n+1-frame charge + 1-frame deceleration, no zip (Launch speed 87+100*n): you move for 1 frame, and your inertia is sufficient for rolling, so you get converted to a spindash and lose the charge when you release down;
  3. n+1-frame charge + 1-frame deceleration, with zip (Launch speed 87+100*n minus 256 times the number of pixels Sonic gets inside the wall): inertia gets set to 0 due to zip, which prevents rolling; you get to keep the quoted launch speed after the first frame; you lose the current charge;
  4. n+1-frame charge + 1-frame deceleration, no zip, the launch movement plus the smaller rolling hitbox makes you go over an edge (Launch speed 87+100*n): you get to keep the full speed of the launch, and you will keep moving when you land and will resume charging from the inertia you keep from landing.

The variant I discovered presses down+forward. This prevents the deceleration from being applied, and moreover, you can't roll when you are pressing right or left. This means you get launched at your full current inertia (the peelout charge) and you keep charging your peelout since it is not converted into a spindash (as long as the timer mentioned above is zero when you press down+forward). And since zipping is disabled when charging a peelout, you get to run through walls on all frames except those you pressed down+forward on. Finally, you are also not affected by slopes, meaning you keep your full speed even while running up a slope.

In-Game Time Table (US)[1]

Zone Time[1] Previous[2] Change
Palmtree Panic 1 0'20"30 0'20"75 -45
Palmtree Panic 2 0'15"28 0'16"60 -132
Palmtree Panic 3 0'17"51 0'17"71 -20
Collision Chaos 1 0'15"66 0'15"83 -17
Collision Chaos 2 0'19"75 0'22"06 -231
Collision Chaos 3 0'03"16 0'03"35 -19
Tidal Tempest 1 0'17"86 0'21"38 -352
Tidal Tempest 2 0'29"60 0'31"65 -205
Tidal Tempest 3 0'22"56 0'23"90 -134
Quartz Quadrant 1 0'15"85 0'18"65 -280
Quartz Quadrant 2 0'16"55 0'17"91 -136
Quartz Quadrant 3 0'50"55 0'50"86 -31
Wacky Workbench 1 0'12"78 0'22"03 -925
Wacky Workbench 2 0'25"50 0'27"25 -175
Wacky Workbench 3 1'02"58 1'03"05 -47
Stardust Speedway 1 0'14"41 0'14"75 -34
Stardust Speedway 2 0'17"21 0'17"63 -42
Stardust Speedway 3 1'04"88 1'05"01 -13
Metallic Madness 1 0'16"36 0'18"71 -235
Metallic Madness 2 0'23"08 0'23"61 -53
Metallic Madness 3 1'07"30 1'07"56 -26
Total 9'08"73 9'40"25 -3152

In-Game Time Table (JP)[1]

Zone Time[1] Previous[2] Change
Palmtree Panic 1 0'20"30 0'20"75 -45
Palmtree Panic 2 0'15"28 0'16"60 -132
Palmtree Panic 3 0'17"51 0'17"71 -20
Collision Chaos 1 0'15"66 0'15"83 -17
Collision Chaos 2 0'19"75 0'22"06 -231
Collision Chaos 3 0'03"16 0'03"35 -19
Tidal Tempest 1 0'17"86 0'21"38 -352
Tidal Tempest 2 0'29"60 0'31"65 -205
Tidal Tempest 3 0'22"56 0'23"90 -134
Quartz Quadrant 1 0'15"88 0'18"68 -280
Quartz Quadrant 2 0'16"58 0'17"95 -137
Quartz Quadrant 3 0'50"55 0'50"86 -31
Wacky Workbench 1 0'12"78 0'22"03 -925
Wacky Workbench 2 0'25"50 0'27"25 -175
Wacky Workbench 3 1'02"58 1'03"05 -47
Stardust Speedway 1 0'14"41 0'14"75 -34
Stardust Speedway 2 0'17"21 0'17"63 -42
Stardust Speedway 3 1'04"88 1'05"01 -13
Metallic Madness 1 0'16"36 0'18"71 -235
Metallic Madness 2 0'23"08 0'23"61 -53
Metallic Madness 3 1'07"30 1'07"56 -26
Total 9'08"79 9'40"32 -3153

[1] The Japanese and US versions have a slightly different way of handling the in-game time and lag frames. The US version works like the other 2D Sonic games and only updates the in-game timer on non-lag frames; the Japanese version, however, appears to update the timer also when there are two consecutive lag frames. This happens in a couple of places in Quartz Quadrant, making these levels longer in in-game time.

[2] Time is in the pseudo-centiseconds used by the game. What the game really does is have an internal frame counter in the [0,59] range that is used to update the seconds every 60 frames. The centiseconds are obtained from this frame counter by multiplying it by 100 and dividing by 60, rounding down (the game does an integer unsigned division and sets the remainder to zero).

Level-by-Levels comments

All levels benefit from improved precision or MWCP; these comments talk about only things that aren't covered by these.

Palmtree Panic 1

There is a level wrap, which leads to inevitable death; it is in the outtakes video. There are time-traveling level wraps, which are slower.

Palmtree Panic 2

Speed shoes + peelout = level wrap.

Palmtree Panic 3

Better boss fight.

Collision Chaos 2

New route abusing speed shoes + peelout to enter a wall and zip through to the end.

Tidal Tempest 1

Entering a wall and launching at zip speeds to cut a portion of the level.

Tidal Tempest 2

Average speed in the portion of zipping and jumping is marginally better than running at the bottom; the portion with a straight zip clinches the deal, and avoids the switch.

Quartz Quadrant 1

Time travel to the future ends up being faster in in-game time than going for the speed shoes in the present.

Quartz Quadrant 2

Glitched into a wall instead of going around it using the spring. Sadly, speed is lower at the end, and I need to jump into the last spring instead of standing where it will load.

Quartz Quadrant 3

I disassembled the boss to find out the fastest way to beat him. As it turns out, you can start damaging the boss right after hitting him the first time (which must happen on-screen). Sonic accelerates at 12 subpixels/frame/frame, whereas the conveyor belt accelerates at a rate of 8 subpixels/frame/frame; the conveyor's speed maxes out 32 subpixels/frame slower than Sonic's top speed, and is the rate at which the boss gets damaged. If you are moving slower than the conveyor, its speed decreases by 7 subpixels/frame/frame, unless you are on air, in which it decreases only by 1 subpixel/frame/frame. So you want to be on the ground faster than the conveyor belt whenever possible, and just holding right is enough to damage the boss as fast as possible.

Wacky Workbench 1

New route, playing the level at zip speeds and going through walls at every turn. There is a level wrap, but you can't activate the signpost — you are too low (see outtakes video).

Wacky Workbench 2

A most annoying level. I can do the first part faster with MWCP, but it takes longer at the bottom for the ground to throw you up. There is a ton of possible zips on that first part, but they all leave you stuck on those long rotating poles and lose all the time you get up until the moving platform after hitting the ground. There is a level wrap, but it is slower (see outtakes video).

Wacky Workbench 3

There is a level wrap into the third level of the boss, but it is slower and useless.

Stardust Speedway 1

In the outtakes video, I show a level wrap. Just playing through the level is faster.

Stardust Speedway 3

Metal Sonic and Eggman are slow; they cap out at 6 pixels/frame if you are far enough ahead. So you need to wait for them at the end, meaning the only real gains were until the screen locks at the start. I did play it much faster anyway. The outtakes video shows a (slower) level wrap.

Other comments

Thanks goes to Nitsuja and Upthorn for their runs;
to Zone 0 for maps and information about the game.

Potential improvements

None I am aware of.


feos: Accepting to obsolete [1188] SegaCD Sonic the Hedgehog CD (JPN/USA) by nitsuja in 17:27.65.

Spikestuff: Publishing for the Goddess. Need to hand this off to someone else to wait and publish.

feos: Grabbing since it's such a big deal.


Similar submissions (by title and categories where applicable):