Player (37)
Joined: 2/16/2012
Posts: 282
I've recently finished a real-time speedrun for this game, and during my routing and testing I've accumulated a good chunk of information. I don't think I quite have the skills/patience to make a TAS for it myself, but keeping this information to myself serves no purpose. If anybody feels like tackling it I can support on testing and suggestions. So yeah. Timecop. Not a whole lot to be said about coming up with routes or otherwise, but I have noticed some technical tricks. -Landing on enemies/objects will shift you one direction or the other. This is important because the effect is instant, and the camera scrolls at a constant rate. This is most important because... -Overscrolling past the screen boundaries preserves the stage layout, but most enemies and platforms/elevators do not spawn. This is especially useful in 6-1, where you can easily use the conveyor belts to get this effect. I have not tested it, but I'm fairly certain that you can abuse the enemy shifting described above to get the same effect on other stages. You can also abuse the roof of the car in 3-1 and 3-2 to gain this effect by just walking off it. Collision boxes for some enemies still spawn, but that shouldn't be a major concern. -The full amount of time that a story cutscene is being played directional inputs and other persistent inputs (gun) can be buffered just by holding them. These buffered inputs will be executed on the first possible frame your character spawns, which is before the stage text. You can also buffer non-persistent inputs (jumping) by pressing them on the last frame before the game stops accepting inputs. The addresses to watch for this are listed below. This is important in 7-1 since you can jump up an extra flight right at the beginning. There's a brief period of time where inputs are accepted before any stage, but the window is too small to buffer anything without the cutscenes. -The drop system works as follows: Every other enemy killed will drop a health pickup. There's a 1/8 chance for the drop to be a big (full) health. The RNG is proprietary, but is likely to have a very small and highly predictable cycle. -Jumping into a pit while attacking causes you to warp to the very top of the current screen. Only stages with pits are 6-1 and 7-1, and 7-1 is the only stage that can use it in a meaningful way. Unfortunately there's no way to clip back in bounds at this point, so neither helps. There is one frame where you are returned to a neutral position at the very top of the screen, and you can jump during it. Somewhat related, if you fall too far after a jump-kick you will also return to a neutral position and attacking will cause you to stop in midair until you move again. -Conveyor belts in 6-1 switch every time a 0 occurs in the RNG sequence. I do not know what seeds the elevator positions at the start of 1-2, but the best pattern is almost 4 seconds better than the "average" pattern. Some useful addresses: 7E06F3 - HP (Note: stored misaligned in 2 bytes) 7E0760 - Boss HPs (See above) 7E0674 - 2 bytes, all 0s if inputs ignored, all Fs if inputs accepted 7E0671 - Buffered input; occurs on next frame that movement is possible 7E0673 - Stores current inputs; equivalent to 7E0671 if actions are possible during that frame 7E06E1/FB/FD - current and incoming character states 7E0666 - if 01, next enemy will give drop 7E066E - RNG value. RNG sequence starts at 80/84A8. EDIT: A very rudimentary demonstration for a few of the glitches is available below: Link to video
Expert player (2470)
Joined: 6/2/2009
Posts: 1182
Location: Teresópolis - Rio de Janeiro - Brazil
Hi, Omnigamer, just watched your Speedrun. I'm still working, but my boss is not around so I have some time to use his computer :) But let's get down to business; I'm currently without projects and I'm playing some first person shooter games with my nephews, but I suck big time playing in real time. So, before I get my ass kicked again by one of my ten year old nephews, I think it's better to do another TAS :) In short, I'll get all the info you gave us and put it to good use on a run of this game, unless someone else is already working on it, of course.
I am old enough to know better, but not enough to do it.
Player (37)
Joined: 2/16/2012
Posts: 282
Dooty, that is fantastic news :) I will be running this game up until I do it at AGDQ, so I'll continue testing when I can. I can also program up a quick sequence generator for the RNG since it's pretty simple. I've experimented briefly with left+right but I wasn't able to find anything special. I wasn't able to set up clipping anywhere, although I had one occasion where I was able to fire a bullet in midair that I haven't been able to reproduce. Something else to try might involve usuing enemy collision boxes to force you into places, but it wouldn't be easy or quick to set up. EDIT: Here's some other misc information: Damages: Gun: 2 Kick: 2 Punch: 1 Jumpkick: 4 Lowkick: 1 Bomb: 4 Every normal enemy besides octopus has 4 HP. Robo Boss: 32 HP Octo Boss: 64 HP Tank Boss: 64 HP Punk Car: 32 HP Missile Man: 64 HP Final: 64 HP
Joined: 5/12/2009
Posts: 748
Location: Brazil
Are you going to use bizhawk, dooty?
Expert player (2470)
Joined: 6/2/2009
Posts: 1182
Location: Teresópolis - Rio de Janeiro - Brazil
Yes, I'm finally getting along with BizHawk :) Here's a script I did with some of Omnigamer's addresses, but I still need some more, see the "todo"; http://tasvideos.org/userfiles/info/2235851729942125 edit: I forgot we can put scripts on the storage... anyway, the game is really enjoyable to TAS, but I'll need all the help I can get. edit2: @ Omnigamer; I completely forgot to say thank you, sorry man. but I never used RNGs before and I confess I do not know how to use them... but if you can help me with the Lua script I will be very grateful.
I am old enough to know better, but not enough to do it.
Player (37)
Joined: 2/16/2012
Posts: 282
I can definitely handle the RNG side of things. When I was initially investigating it seemed that it didn't change often, but when I play through now it looks like it's being called constantly. There's no entropy with it beyond the number of times that it's called, so being able to predict the next sequence of numbers is easy. I'll work on putting it into the lua script soon. Some other minor stuff: -Bombs are useful for lag reduction in some areas. Using them doesn't introduce lag as far as I know, but being able to kill out-of-reach enemies goes a long way to reduce lag in some areas. -You have a faster fire rate while running than standing. -No damage is pretty unrealistic even for a TAS, and honestly there are several times when taking damage would be preferred for time. -You can jump up the elevators in 7-1 as they're coming down, but it's a tight window (~2 frames).
Expert player (2470)
Joined: 6/2/2009
Posts: 1182
Location: Teresópolis - Rio de Janeiro - Brazil
Nice, thanks! Lag is really a serious problem in this game, and avoid or minimize it will be the hardest part of this run. I did some "improvements" on the script; it now have a table to hold the player's states. He also have a hitbox now, but I couldn't find the addresses for the enemies, looks like it's 1 byte signed but I'm not sure. It's really simple as I don't know Lua, I'm doing it reading other scripts, please take a look; http://tasvideos.org/userfiles/info/2256711388207910
I am old enough to know better, but not enough to do it.
Player (37)
Joined: 2/16/2012
Posts: 282
The assembly code for the RNG is below.
828011 jsl $8084a8   [8084a8] A:0004 X:0000 Y:bcfc S:1ff1 D:0899 DB:8c nvmxdizC V: 90
8084a8 rep #$20               A:0004 X:0000 Y:bcfc S:1fee D:0899 DB:8c nvmxdizC V: 90
8084aa lda $066e     [8c066e] A:0004 X:0000 Y:bcfc S:1fee D:0899 DB:8c nvmxdizC V: 90
8084ad pha                    A:1443 X:0000 Y:bcfc S:1fee D:0899 DB:8c nvmxdizC V: 90
8084ae lda $066c     [8c066c] A:1443 X:0000 Y:bcfc S:1fec D:0899 DB:8c nvmxdizC V: 90
8084b1 sep #$20               A:95c5 X:0000 Y:bcfc S:1fec D:0899 DB:8c NvmxdizC V: 90
8084b3 clc                    A:95c5 X:0000 Y:bcfc S:1fec D:0899 DB:8c NvMxdizC V: 90
8084b4 adc $066f     [8c066f] A:95c5 X:0000 Y:bcfc S:1fec D:0899 DB:8c NvMxdizc V: 90
8084b7 eor $066e     [8c066e] A:95d9 X:0000 Y:bcfc S:1fec D:0899 DB:8c NvMxdizc V: 90
8084ba rep #$20               A:959a X:0000 Y:bcfc S:1fec D:0899 DB:8c NvMxdizc V: 90
8084bc clc                    A:959a X:0000 Y:bcfc S:1fec D:0899 DB:8c Nvmxdizc V: 90
8084bd adc $066e     [8c066e] A:959a X:0000 Y:bcfc S:1fec D:0899 DB:8c Nvmxdizc V: 90
8084c0 sta $066e     [8c066e] A:a9dd X:0000 Y:bcfc S:1fec D:0899 DB:8c Nvmxdizc V: 90
8084c3 pla                    A:a9dd X:0000 Y:bcfc S:1fec D:0899 DB:8c Nvmxdizc V: 90
8084c4 sta $066c     [8c066c] A:1443 X:0000 Y:bcfc S:1fee D:0899 DB:8c nvmxdizc V: 90
8084c7 rtl                    A:1443 X:0000 Y:bcfc S:1fee D:0899 DB:8c nvmxdizc V: 90
I have reproduced the functionality in a MATLAB script for my own intellectual curiosity. I was surprised to find that it was more robust than I thought. There is no cycle within 1 million iterations and it does not seem to favor certain numbers too much. All possible values in the 16-bit space appear in about 750k iterations on average. That said, it's easy to predict upcoming numbers, but difficult to force to be a desired number. I can program the RNG into the lua script so it spits out the next ~10 numbers that will appear, but a more robust external program might be more useful for planning some things. I'll try to get it into the lua script this weekend, but I also haven't ever used lua so it might take a little bit.
Expert player (2470)
Joined: 6/2/2009
Posts: 1182
Location: Teresópolis - Rio de Janeiro - Brazil
Do not worry, I'm brute-forcing my way through the game; run right/left for "justice" is not that complicated :) anyway, I'm trying to upload the 1st wip but I'm receiving this error message;
Errors found in upload:
<<< Can't parse movie (error from format parser) >>>
Errors from the movie parser:

error_handler:
	errstr=Division by zero
	errfile=/home/tasvideos/public_html/formats/bkm.php
	errline=75
edit; It's on MediaFire if you wanna take a look; http://www.mediafire.com/file/b4w7qz45b1lzdo5/Dooty-Timecop.zip edit2; New wip; Gangsta Paradise on foot with only one frame of lag! http://www.mediafire.com/file/8ib9i2lxx4km7c4/Dooty-Timecop.zip I still can't upload wips on my storage, I hope I can submit the final run...
I am old enough to know better, but not enough to do it.
Joined: 5/12/2009
Posts: 748
Location: Brazil
Great Wip, Dooty! Keep up the good work! I'm a huge fan of your runs!
Player (37)
Joined: 2/16/2012
Posts: 282
Wow, nice work! I was afraid 1-3 and 2-1 would be boring watches, but you made them quite enjoyable despite their length and repetition. The strategy on 3-1 is also really impressive; I figured something like that was possible, but there's no practical way to deal with the low building guys in real time. You should be able to do an easier version of the same thing on 3-2 since there are less enemies and all but one of them are the high versions, so any bullets will push you forward. I'm sure you've noticed that you can manipulate the driver to try and fire upward by jumping as well. I'l be curious to see how quickly you are able to dispatch the coming bosses with the rapid fire :)
Expert player (2470)
Joined: 6/2/2009
Posts: 1182
Location: Teresópolis - Rio de Janeiro - Brazil
Thank you, guys! The movie is done and submitted. I was afraid it wouldn't be possible due to the error I was receiving with the wips, so there's no submission text yet, sorry. edit; fixed!
I am old enough to know better, but not enough to do it.
Player (37)
Joined: 2/16/2012
Posts: 282
Just watched it Dooty, great job! One thing I noticed though, is there any reason you didn't try to use the cutscene buffer bug? In my testing it seemed like it didn't add any additional time (you can still hit start at any time before the cutscene actually plays and trigger it). It should be useable in 3-1, 4-1, 5-1, 6-1 and 7-1 to gain some extra distance before you can normally gain control. Also, in 7-1 you can force the last elevator to spawn earlier by jumping from under the one immediately below it (screen should move up slightly) and it will give you a quicker cycle that way. I'm not sure if that would affect the quick-jump on the elevator right before it though.
Player (37)
Joined: 2/16/2012
Posts: 282
Copypasta from the publish thread: After watching through again, I noticed several places for improvements: -In 1-3 and 2-1, don't pick up the clock powerups. This adds time at the end since the time is counted up to be added to your score. It may not be able to sync though, as I'm not sure if the RNG freezes during score counting. -Along the same lines, a fair amount of improvement can be had from trying to keep the "Bonus" score low. I'm not exactly sure what this is based off of, but it looks like enemy kills. This would be especially helpful in stages like 2-2 where you can have decent control over which enemies you can kill without losing time. Combined across all stages, I think this kind of optimization would bring the total time below 19 minutes. It would require redoing the entire game though, as many more tradeoffs between entertainment, lag, and bonus score would come up.
Expert player (2470)
Joined: 6/2/2009
Posts: 1182
Location: Teresópolis - Rio de Janeiro - Brazil
Sorry, had not noticed your post. I had some suspicion about tally screen at the end of the levels, but as the underwater level has a tremendous amount of lag if I do not collect the items or kill less enemies I thought it would be weird if I avoided items in a stage and collect up all in another. But improvements are welcome in any run and I'm sure willing to improve it as soon as I have some free time.
I am old enough to know better, but not enough to do it.
Expert player (2470)
Joined: 6/2/2009
Posts: 1182
Location: Teresópolis - Rio de Janeiro - Brazil
I did some messing around with the Ram Poke tool and here's the results: Washington Part 3: ~89 frames faster avoiding 2 clocks San Andreas Fault Part 1: ~118 frames faster avoiding 2 clocks With better luck on Los Angeles Part 1, this stage can be ~200 frames faster, also, avoiding some kills and items, when it's lag-free, would save a little bit of time, so, sub 19 minutes may be possible, but will not be so easy... My published run: 9:08:46 if everything work on the above test: ~9:05:00 It may sound silly, but I'd love to have one of my runs obsoleted by someone else, the way it is now, looks like only I have interest on playing the games I play :( So, I'm sorry, but I'm not going to improve this run, I hope someone else does.
I am old enough to know better, but not enough to do it.