[edit]
Table of contents
- TAS Map Pack
- Gens rerecording with Camera Hack/solidity display
- Lua TAS HUD
1. TAS Map Pack
For the meaning of the solidity overlays, see the section on the camera hack versions of Gens, below.
2. Gens rerecording with Camera Hack/solidity display
Here are versions of Gens compiled with Upthorn's and Nitsuja's camera hack, solidity display and hitbox display. It is only safe to use them for the corresponding games (and some limited hacks of each).
There are some modifications of mine which hopefully will eventually be merged into SVN; they improve the hitbox display for the main character (including insta-shield support for Sonic), adds support for the 2P Tails and makes use of the collision response list in Sonic 3/Sonic & Knuckles/Sonic 3 & Knuckles.
With 'num lock' on, the base address of objects is shown, as well as the angle on the ground. To use the base address, prepend "FF" to the value shown and you have its base RAM address.
With 'scroll lock' on, camera hack is disabled; otherwise, you can scroll through objects with 'page up'/'page down' or return to Sonic with 'home'. If the selected object is offscreen, the emulator will display centered on the selected object. While rings and sprites show, only rings on the same vertical slice as Sonic (give or take) can be taken, and Tails (or Sonic) will generally not interact with sprites that are offscreen.
Solidity is displayed as color overlays: green overlay means only the top is solid (ground); red overlay means all but top solid (wall/ceiling); blue overlay means all solid (ground/wall/ceiling); no overlay means not solid.
Sonic and Tails have two hitboxes: the inner (pink) one is for interaction with things that can hurt Sonic (or which Sonic can collect), the outer (white) one is for solid objects, platforms and terrain. Sprites with red hitboxes always hurt; sprites with green hitboxes have special collision, with no main pattern; purple hitboxes are badniks/bosses; cyan are generally monitors and scattering/attracted rings. In Sonic 3, Sonic & Knuckles and Sonic 3 & Knuckles, a white hitbox in a sprite with normally another color means this sprite is currently not interacting with the player.
For the player characters, blue boxes with 'plus' signs on them are drawn. These are the anchor points for sensor rays that detect terrain collision; to make things simple, assume only these points can collide with terrain. The anchor points along the top and bottom edges check, respectively, for ceilings and floors; those on the left and right edges check only for walls. A white plus sign allows zipping when embedded into terrain, the black ones do not.
3. Lua TAS HUD
This script is now hosted on GitHub
You can download the latest version of the Lua HUD (released Mar 12, 2015)
here. To use it, extract the contents of the file anywhere and select 'sonic-hud.lua' from Gens.
Compatibility list:
What the script does:
- Expanded game HUD showing score, rings, level time (including frames), number of emeralds collected (chaos, super or time emeralds) and whether a time warp is possible (and which kind).
- Character HUDs for both players, showing position (down to subpixel level), speed and slope angle. For player 1, the current shield, the number of lives and of continues are also shown; for player 2, there is an indicator of whether Tails is being controlled by the CPU or by a (presumably human) player. Both players also feature a jump predictor whenever you are not in read-only playback of a movie; the jump predictor shows what will be your speed if you hold the 'C' button for the next two frames (for optimal benefit, avoid using that button); for S2 and SCD, this speed is calculated as it will be without holding the forward direction, due to the air speed cap in those games. Also, lines show the level edges so that you know where you will be stopped.
- Boss HUDs, showing number of hits, a timer showing remaining invulnerability time (in frames) and position (pixel level). S2 Boom and SCD do not feature boss HUDs, but all other games in the compatibility list do.
- Dynamic status HUDs, showing several (most? all?) relevant timers (see below for a list), as well as the current charge in a spindash or peelout.
- The ability to disable the original game HUDs. The current method is very robust and fast, but could potentially cause desynchs; for this reason, it is disabled by default, and it is not recommended to be used while recording movies.
- The ability to skip "boring stuff". This is disabled by default. You can optionally toggle skipping of score tallies in all supported games (it is on by default, but does nothing unless you enable the skipping of generic "boring" stuff).
- The ability to disable Hyper Sonic's hyperflash. This includes a graphical glitch fix. As far as I can tell, the method used causes no desynchs, so it is on by default.
- The ability to disable the extremely annoying S3, SK and S3K super/hyper music. This is disabled by default.
- The ability to disable all of these Lua HUDs with a simple variable. Combined with the disabling of the original HUDs, this can make for a very clean screen. For obvious reasons, this is off by default.
- A configuration menu with persistent settings, allowing you to easily toggle all the available options.
All HUDs are semi-transparent so that they do not get too much in the way. They are positioned assuming that the input display, frame counter and lag frames are shown in the upper right corner.
The timers (all in frames) currently watched by this script are: post-hit invulnerability timer (for both players); drowning timer (for both players); insta-shield (Sonic, S3/SK/S3&K); flight timer and flight boost timer (Tails, except S2); speed shoes timer; invincibility timer; super/hyper form timer; frames until time warp (SCD); horizontal scroll delay for main character (S2, S3, S&K and hacks, and select S1 hacks); for 2p Tails, respawn and despawn timers and frames until CPU takes over.
The boss post-hit invulnerability timers are also watched and displayed, but they are displayed in the boss' respective HUDs.
Also, slope horizontal move lock timers for both players are also watched and displayed in the respective character HUD.
Changelog:
Mar 12/2015:
- Some improvements for SCD.
Jan 08/2014:
- Fixed Sonic CD issues from previous build.
Jan 08/2014:
- Replaced score display by camera position display.
- Added a level bounds display which shows where the player is stopped. Yellow is for player 1, magenta for player 2; magenta is drawn after, so if only magenta is being shown, then both are being coincident. These displays are keyed by the character's HUDs, and will only display if those are also being displayed. The computations in the games for level bounds use the player's centerpoint; the HUD uses their hitbox instead. This means that the boundary will shift when the character's size changes.
- Found and added horizontal scroll delay for s1tails and for s1knux.
- Fixed boss code tables for S&K and S3&Amy
- Build scripts now skips missing ROMs and warns about it.
Jun 28/2013:
- Fixed horizontal scroll delay for non-S3/S&K/S3&K.
- Better object-oriented model including: class/extends syntax to declare a class/declare that it is derived from another class; automatically created <classname>.new method that allocates a new instance and calls the constructor you define (<classname>:constructor); Java-like super method to call the next constructor up on the class hierarchy; widget abstract class will throw an informative error if used.
- Error handling code to check that (1) UI widgets only accept widgets as children and that (2) functions are supplied for callbacks.
- ROM checker no longer caches the return value of s1tails_check -- it is only ever called once per ROM anyway.
- Fixed two of Hyper Sonic's icons.
- Icons are dynamically loaded as needed, instead of all at once at startup.
Sep 5/2012:
- Added horizontal scroll delay support for S2, S3, S&K, and their supported hacks.
- Fixed bugs 'Sonic 3 & Amy' hack.
Aug 25 2012:
- Sonic 3 & Amy Rose support;
- Updated Charmy in Sonic 1 support to v1.1;
- Perfect rings counter in S2;
Apr 15 2012:
- Updated support to Amy in Sonic 2 hack to version 1.5.
Oct 11/2010:
- Fixes error in plain Sonic 3 with the boss tables introduced in previous version.
- Updated to Amy in Sonic 2 v1.2.
- Tracking Tails despawn timer as well.
- Improved Tails flight icon again.
- Now also watching slope horizontal move lock timers.
- Super Amy support for Amy in Sonic 2.
Sep 27/2010:
- Revamped the ROM detection and feature set code.
- Added several hacks to the compatibility list.
Jan 22 2012:
- Updated support to Amy in Sonic 2 hack to version 1.5.
Apr 15/2011:
Oct 11/2010:
- Fixes error in plain Sonic 3 with the boss tables introduced in previous version.
- Updated to Amy in Sonic 2 v1.2.
- Tracking Tails despawn timer as well.
- Improved Tails flight icon again.
- Now also watching slope horizontal move lock timers.
- Super Amy support for Amy in Sonic 2.
Sep 27/2010:
- Revamped the ROM detection and feature set code.
- Added several hacks to the compatibility list.
Oct 2/2010:
- Added instashield timer.
- Improved Tails' flight icon.
- Fixed Marble Garden 1 mini-boss HUD.
- Compatibility update for latest version of Amy Rose in Sonic 1.
- When disabling or enabling the original HUD in Sonic 1 and Sonic 1-based hacks through the configuration menu, you no longer have to wait for the next act for it to be restored.
Sep 27/2010:
- Revamped the ROM detection and feature set code.
- Added several hacks to the compatibility list.
Sep 3/2010:
- Fixed support for S&K and plain S3.
- Fixed jump predictor for S2K.
- Added Upthorn's code to disable super/hyper music in S3, S&K and S3&K.
- Reorganized code into multiple source files, all of which include the files it needs. All the scripts directly in the "sonic" subdirectory are standalone scripts included by the main HUD script and conditionally toggled on or off.
- Added configuration menu and persistent settings.
- Fixed behavior of script when it was started and when loading a saved state.
- Score tallies for all supported games can now be skipped.
Aug 9/2010:
Knuckles in Sonic 2 also features boss hit counts/timers now.
Aug 8/2010:
- A slight redesign, replacing the boxes with the minus/plus signs by a larger (but thinner) bar glued to the screen edge. This is to make it easier to bring back a disabled box (by Fitts' law).
- Hit counters and invulnerability timers for all bosses in S1 (including hacks), S2 (not including S2Boom), S3K (but not plain S3). Neither is available for SCD.
- Tails flight boost timer. This factors in the vertical limit and limiting upward speed, as well as the actual timer.
- Raiscan's code to skip S3K score tally, slightly modified.
The rest of the original post now follows.[end edit]
I am not entirely sure where this topic should go, but given the
Rewind Lua script (and other fun scripts), I think this is a safe bet; if this is not the correct location, I ask an admin to move it to the correct location.
I have been working on improving the Lua HUD I developed for TASing S3&K; in its current revision (available at the end of the post), it also tracks seconds before drowning and the times before Tails respawns or is taken over by the CPU. Not only that, but it also works now on all Genesis 16-bit Sonic games (Sonic 1, Sonic 2, Sonic 3, Sonic & Knuckles, Sonic 2 & Knuckles, Sonic 3 & Knuckles), as well as 2 hacks (Knuckles in Sonic 1 and Tails in Sonic 1). It probably works for other S1/S2/S3 hacks, but these are the ones I tested with.
There are a few things I would like to do, but haven't been able to; I am hoping someone has the knowledge for it. First, I'd like to extend the script for Sonic CD also; however, there is very scarce information about this game anywhere. There are a few memory offsets in the Gens source, which help; but about the best I have found elsewhere is
this; neither include some information I would like were I to include SCD support, such as how SCD spindash and peel out work, as well as time warps (how long until a warp, where the time direction is stored). Other timers (drowning, speed shoes, invincibility) are easy, so I am not worried about them; but determining the game 'mode' is something I would like, if anyone knows how to do it (i.e., knowing when to show the Lua HUD, as is done for all supported games).
Something else I have been unable to do is hide the original game HUD. I actually found a hackish way to do it in S1 (and the hacks), but not for the other games: ensuring that the byte at address 0xffd040 (the second object in the list) is always zero prevents the HUD from showing (this is not in the file linked above). Does anyone know if there is a similar procedure for S2/S3/S3&K? I am hoping that something similar will work for them, and for SCD (but I haven't tried yet for SCD); but except for SCD, it won't be the second object as that is Tails (and it isn't any object I tried thus far with S2).
Anyway, that is what I can remember at this time.