Posts for marzojr

marzojr
He/Him
Experienced Forum User, Published Author, Experienced player (751)
Joined: 9/29/2008
Posts: 964
Location: 🇫🇷 France
So I looked at your work in GHZ1 and built upon it. I added a new trick which somehow got overlooked by everyone which allows for the fastest speed yet out of the loop. And I got the half-circle jump first try! The preliminary result is this: 0:16::31. I wonder how much further can that loop be optimized...
Marzo Junior
marzojr
He/Him
Experienced Forum User, Published Author, Experienced player (751)
Joined: 9/29/2008
Posts: 964
Location: 🇫🇷 France
Uff... at about the same time Kiske was sending me another strategy to improve LBZ1, I discovered that the spindash camera lock works differently in this hack than it does in every other hack, S2 or S3; specifically, it actually locks the camera in place for the duration of the timer. It also seems to expire automatically when you level wrap, but I am not sure why; finally, multiple spindashes while the timer is running do not reset it, it just continues from the current value. In any case, I had to go over the run and see where it would be useful. The first place was MZ3, which was improved by 12 frames. The second was Kiske's improved LZ1 -- his 18-frame improvement became a whooping 36-frame improvement by using the camera lock a second time for the level wrap (along with some precision improvements along the way, I guess -- he only sent me a YouTube video). Completely unrelated to the camera lock, something was irking me when I was fast-forwarding through SLZ3, and I tried a new route at the start; it worked, which caused me to have to redo it entirely -- but saving a further 68 frames in the process, including a much better boss fight. When I had finished all this, including animal manipulation, I went to play the movie... and it desynched in SYZ1. I went to see why, and its input was starting in the middle of level loading; somehow, the animal manipulation in MZ3 got borked up -- I have no idea what happened. So I redid it; this caused chain desynchs and forced me to remanipulate the animals. LZ2 and LZ3 additionally desynched due to lag differences; I resynched it manually because I hadn't saved the improved SLZ3 anywhere but in the movie file. When I finished resynching LZ3, I somehow was 2 frames ahead; I have no idea where these came from. Anyway, this is the story behind this 118-frame improvement. Damn, my TASing skills are rusty... feos, you can set it back to judging underway; I already edited the submission text. This is the (hopefully) final version, as I can see nothing further to improve; but now that I jinxed it, lets see what happens... Edit: I HAD to jinx it, right? Now it was Tee-N-Tee that proposed an improvement: going through walls in MZ1. It is sadly not possible to go through both walls, and I could not extend the zip onto the other side; but this is still a 123-frame improvement in MZ1. Since I did a new skip in LZ2 for the Knuckles run, I tried it in this run too; as a result, LZ2 is now 225 frames shorter. And I noticed I missed an opportunity to use the screen locking in LZ3, which led to 6 frames of improvement (most of the others were lost due to the tight space restrictions which would have prevented me from getting inside the wall). The new version is here. In total, 354 frames of improvement. I already edited the submission. Edit 2: Tee-N-Tee suggested a new route for MZ1 which was 42 frames faster; I improved by a further 13 frames, for 55 more frames of improvement. Here is the new version with remanipulated animals.
Marzo Junior
marzojr
He/Him
Experienced Forum User, Published Author, Experienced player (751)
Joined: 9/29/2008
Posts: 964
Location: 🇫🇷 France
Microstorage was down, so I put in the main site: WIP to SYZ2. Has Aglar's GHZ1, I improved GHZ2 by a further 32 frames and I improved SYZ2 by 92 frames over the published run due to better precision. Sadly, every thing I tried to use to break the level failed -- not that there is much to do to try and break this one.
Marzo Junior
marzojr
He/Him
Experienced Forum User, Published Author, Experienced player (751)
Joined: 9/29/2008
Posts: 964
Location: 🇫🇷 France
Thanks; I ended up making a version that is 2 frames faster and used that instead. The two frames come from level wrap 1 frame earlier and from better camera placement (further right at the time of the level wrap), if you are wondering.
Marzo Junior
marzojr
He/Him
Experienced Forum User, Published Author, Experienced player (751)
Joined: 9/29/2008
Posts: 964
Location: 🇫🇷 France
New file for submission using the fall-through-floor trick in SBZ2 which WST explained to me in another thread. SBZ2 is now 34 frames faster than before, and 2 frames faster than WST's. Edit: The submission has already been edited with the improvement.
Marzo Junior
marzojr
He/Him
Experienced Forum User, Published Author, Experienced player (751)
Joined: 9/29/2008
Posts: 964
Location: 🇫🇷 France
Will do so. I am also thinking of adding screen boundary display to help with capsules; this should come in handy.
Marzo Junior
marzojr
He/Him
Experienced Forum User, Published Author, Experienced player (751)
Joined: 9/29/2008
Posts: 964
Location: 🇫🇷 France
WST wrote:
Frame war on Green Hill Zone? =D it’s amazing. Congratulations on doing the job which I actually knew was possible, but couldn’t do myself. Can we see your gmv, or you are still trying to optimize it deeper?
Well, Aglar beats him anyway with this old WIP he says is "most likely not fully optimized"; his time is 0:16::40.
Marzo Junior
marzojr
He/Him
Experienced Forum User, Published Author, Experienced player (751)
Joined: 9/29/2008
Posts: 964
Location: 🇫🇷 France
Oh, you went for the level wrap; I knew I should have tried harder to fall through the ceiling (floor?); what is the trick to it anyway?
Marzo Junior
marzojr
He/Him
Experienced Forum User, Published Author, Experienced player (751)
Joined: 9/29/2008
Posts: 964
Location: 🇫🇷 France
Gaining more speed out of the loop isn't the real problem; jumping out of the half-circle after the spin tubes with enough speed is. You can try this: at about 0:09::00, near the checkpoint, arrange your braking so that you stop one pixel earlier than in the movie. When you jump your way through the loop, you will be able to get more speed. I managed to get 4063 x speed; but then, I always lose speed at the bottom, no matter what I try. The Tails run also has this issue -- the jump at the bottom is very particular as to your positioning, and if you are off you lose a lot of speed no matter how much faster you were up to that point. Anyways, I have been looking over SYZ2 and SYZ3 and they seem to be resistant to breakage thus far...
Marzo Junior
marzojr
He/Him
Experienced Forum User, Published Author, Experienced player (751)
Joined: 9/29/2008
Posts: 964
Location: 🇫🇷 France
I was going to post something when I saw your post; so I went back and I pasted my versions of the levels onto your movie. The result is here. I went ahead all the way to the end of SYZ1 and... well, I will let you see it for yourselves. Suffice to say, Qwerty's movies are utterly irrelevant now.
Marzo Junior
marzojr
He/Him
Experienced Forum User, Published Author, Experienced player (751)
Joined: 9/29/2008
Posts: 964
Location: 🇫🇷 France
mklip2001 wrote:
Do you have any interest in improving the Knuckles hack? JXQ's run is really outdated by this point.
I just might; we shall see.
Marzo Junior
marzojr
He/Him
Experienced Forum User, Published Author, Experienced player (751)
Joined: 9/29/2008
Posts: 964
Location: 🇫🇷 France
I recommend that you use the "sonic-resyncher.lua" script that I bundle with my HUD script; it currently only works for S1 and hacks, but it takes care of managing lag differences. To use it, open a movie and click 'save level' for each level you want to copy; this will dump the levels to a ROM-and-level defined file in the "movies" directory (only one file per level per ROM, to allow easier copying to different movie files). Then on a writable movie, press 'paste level' (preferably when the screen is still black) to copy the level (it can be done right after the point where the last 'paste level' gets you). I really wish that Qwerty would post his gmvs for ease; as is, I will try my hand at MZ. Maybe we can collaborate on this run?
Marzo Junior
marzojr
He/Him
Experienced Forum User, Published Author, Experienced player (751)
Joined: 9/29/2008
Posts: 964
Location: 🇫🇷 France
You know, there really should be a "hell, yeah!" option to select from; in its absence, a simple "yes" will have to do, I guess...
Marzo Junior
marzojr
He/Him
Experienced Forum User, Published Author, Experienced player (751)
Joined: 9/29/2008
Posts: 964
Location: 🇫🇷 France
Need to replace he submission file with this; Kiske showed me a strategy I overlooked in GHZ3; his version was 31 frames faster, I managed to improve it by 8 frames; I had to remanipulate the animals, which generally got better patterns, leading to a further 15 frames of (real time) improvement.
Marzo Junior
marzojr
He/Him
Experienced Forum User, Published Author, Experienced player (751)
Joined: 9/29/2008
Posts: 964
Location: 🇫🇷 France
Since there has been no apparent progress, I decided to try my hand at GHZ2 and GHZ3; here is the result: 0:10::38 in GHZ2, 0:28::01 in GHZ3. Since I am not that good with Knuckles, both may be improvable.
Marzo Junior
marzojr
He/Him
Experienced Forum User, Published Author, Experienced player (751)
Joined: 9/29/2008
Posts: 964
Location: 🇫🇷 France
When you are on the ground, your speed is completely determined by your "inertia" -- the third value for speed on my HUD -- by floor angle and by whether or not you are rolling. When you are not rolling, you have that
X speed = inertia * cos(angle)
Y speed = inertia * sin(angle)
When you are rolling, X and Y speed are still determined by the above formulas, with the exception that X speed is capped at 4096 subpixels/frame. Thus, you can never move horizontally faster than 4096 subpixels/frame when you are rolling, but you can when running. Since camera position is used to start several events, rolling downhill loses efficiency compared to running because the camera can scroll up to 6144 subpixels/frame in S3&K (for S1 and for S2, camera moves at most 4096 subpixels/frame, so you lose less time). When you are rolling, you accelerate faster when rolling downhill than you do when running downhill; you also decelerate less when rolling uphill than you do running uphill. If your X speed is less than the rolling X speed cap, you will benefit from rolling downhill; if not, you will waste speed because you could be running faster.
Marzo Junior
marzojr
He/Him
Experienced Forum User, Published Author, Experienced player (751)
Joined: 9/29/2008
Posts: 964
Location: 🇫🇷 France
This one is not new, it is just not useful for Knuckles -- you can't finish the act from the place you end up at because Knuckles doesn't trigger Sonic's boss and you are boxed in a place for which there is no escape.
Marzo Junior
marzojr
He/Him
Experienced Forum User, Published Author, Experienced player (751)
Joined: 9/29/2008
Posts: 964
Location: 🇫🇷 France
Oh, I didn't notice you guys managed to manipulate Nightcrawler. Yes, pressing up+down (or left+right, for that matter) changes timing slightly because the game has routines to "fix" the input that are ever so slightly slower when it has to fix it than otherwise. I just assumed that the difference would be too slight, but it seems I was wrong... Now to watch that TAS...
Marzo Junior
marzojr
He/Him
Experienced Forum User, Published Author, Experienced player (751)
Joined: 9/29/2008
Posts: 964
Location: 🇫🇷 France
So, after some talk on IRC, I started disassembling the game to see exactly is the cause of the randomness in the character selection. feos prompted me to put my findings here. First off, this game seems to have been written in C++ and compiled to the 68k; and let me say, I did not know how much compilers have improved in these ~20 years... Anyway: each level has its own separate function that initializes the level data; the function responsible for setting up Siberia is at offset 0xFD6A8. Among other functions, this function calls the function at offset 0xFD614; this function is responsible for selecting which player you get. If player 1 has not yet been initialized (specifically, it tests if the long at 0xffeaa8 is zero or not), then the following code gets run:
                jsr     j_DisableInterrupts-MainVTable(a5)

loc_FD62C:
                moveq   #0,d7
                move.b  (VDP_HV_counter).l,d7
                moveq   #0,d0
                move.b  (VDP_HV_counter).l,d0
                cmp.w   d7,d0
                bne.s   loc_FD62C
                jsr     j_EnableInterrupts-MainVTable(a5)
                ext.l   d7
                move.w  FrameCount_mod4-MainVTable(a5),d0
                ext.l   d0
                add.l   d7,d0
                move.l  d0,-(sp)
                jsr     j_InitRNG-MainVTable(a5)
                jsr     j_GetRandomP1-MainVTable(a5)
Ah, yes, the compiler has made pretty much all calls use a master VTable stored at register a5, and most of these calls point to trampoline functions (that is, a function that is nothing more than a jump to the real function). FrameCount_mod4 is a RAM location: 0xffc670, to be accurate; for Siberia, it is never updated from its initial value of zero, so it is utterly irrelevant. Now for some info: VDP_HV_counter is a symbolic constant for 0xC00008; it is a memory-mapped port from the Genesis graphics chip, the VDP. You can read it as a byte or as a word; if reading as a word, the low byte is the same as you would get from reading port 0xC00009. Port 0xC00008 is the Horizontal/Vertical counter, or H/V counter. The byte read in the code above is the vertical counter -- it is the line in which the electron beam is in the TV (or would be, in the case of modern TVs and emulators). The other byte would be the horizontal counter, and shows which column the electron beam is in -- it is counted in pairs of pixels because it is a single byte (not that it matters, as the VDP is a lot faster than the 68k anyway...). The game reads it twice, compares and loops just to make sure that the beam is not too close to changing a line. With these considerations out of the way, we can write the above as the following pseudo-c code:
	word scanline = VDP_Get_Active_Line();
	InitRNG(scanline + *(word *)FrameCount_mod4);
	GetRandomP1();
So: the current scanline is being used to seed the random number generator, which is then used to select P1. And there is the pickle: Gens-rr is deterministic, so the H/V counter is set to a known value; in real hardware, and in some other emulators, it would be an essentially random value. Changing controller settings works for changing the initial character because the code to read from a 6-button controller is slightly slower than the code for reading from a 3-button controller; this is enough to change one scanline, but only because the game was apparently close to it already. As far as I can tell, there is no way to gain the 488 clock cycles needed to gain another scanline. So until there is a setting to change the initial value of the H/V counter, the best that can be done is using Wolverine in that level.
Marzo Junior
marzojr
He/Him
Experienced Forum User, Published Author, Experienced player (751)
Joined: 9/29/2008
Posts: 964
Location: 🇫🇷 France
FWIW, the next TAS uses a completely different level wrap technique that handily trounces this one. Just saying :-)
Marzo Junior
marzojr
He/Him
Experienced Forum User, Published Author, Experienced player (751)
Joined: 9/29/2008
Posts: 964
Location: 🇫🇷 France
Even with all the zipping and everything else, AIZ2 can't be completed, for instance: you die if you try to go fight the normal Knuckles boss, and the flying airship in Sonic's route does not spawn hence the screen locks too far left for you to fight the boss. And after checking, MHZ2 can't be completed without either entering a bonus stage or dying: the level transition is glitched, and if you do neither, you lose control at the boss -- the only input that works is pressing start which resets the game as if a demo was playing. Other levels may or may not suffer similar issues, I didn't check.
Marzo Junior
marzojr
He/Him
Experienced Forum User, Published Author, Experienced player (751)
Joined: 9/29/2008
Posts: 964
Location: 🇫🇷 France
It would take a hacked version of the game: Blue Knuckles can't complete AIZ2 (among other levels), making it impossible to finish the game. Edit: Err... I keep forgetting, this thread is for the "& Knuckles" part alone. This part can be completed, I think.
Marzo Junior
marzojr
He/Him
Experienced Forum User, Published Author, Experienced player (751)
Joined: 9/29/2008
Posts: 964
Location: 🇫🇷 France
I agree with Fishaman P: the amount of input from DMTM used is about the same size as that of input from me used, but you don't see me bullying WST for including my name as a co-author, nor do you see me making other people do that. In fact, I explicitly declined it, as I felt my contribution was too small. DMTM should really get a grip. Other than that, the run is fantastic, and shows why people should work in teams to TAS this game: it is too easy to miss opportunities for optimization otherwise. I would have preferred the full-game(S3&K) TAS, but this fulfills all its intended goals.
Marzo Junior
marzojr
He/Him
Experienced Forum User, Published Author, Experienced player (751)
Joined: 9/29/2008
Posts: 964
Location: 🇫🇷 France
I actually has specifications for both a binary version and a text version. The idea behind the text version is to make it easy to edit; you just load in a text editor and edit it. You can also do some heavy-duty processing using Unix text tools such as grep, sed and many others, which would be harder to do with the binary format (would require specialized tools). Moreover, the format is simple enough that it can be read in linear time, with a small constant factor penalty compared to the binary format. As for size: the format allows for external compression: you can compress a GM2 file using zip format, and the resulting file is a valid GM2 file (but note that the text goes on to say "[n]ot recursively, that would be silly"). All that being said, it is likely that the format will first be implemented in the binary version...
Marzo Junior
marzojr
He/Him
Experienced Forum User, Published Author, Experienced player (751)
Joined: 9/29/2008
Posts: 964
Location: 🇫🇷 France
There are actually 2 Mythbusters episodes, with conflicting results. Tub hits the nail in the head with his first two questions: Derakon's answer is for the theoretical case, with uniform rain distribution and considering your silhouette to be uniform as you walk/run through the rain. The answer is quite different if you are talking about a certain period of time (in which case it is better to stand still) or over a certain distance (in which case running is better); and effects from changing the uniform rain density, wind speed and silhouette can likewise make the answer swing back and forth between running and walking as the better choice.
Marzo Junior