Difference between revisions of "R.C. Pro-Am II/Game Mechanics"
From SDA Knowledge Base
(→Speed) |
m (→RAM addresses) |
||
(42 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
==Items== | ==Items== | ||
− | [[File:Rcproam2_dollar.JPG|50px]] - | + | [[File:Rcproam2_dollar.JPG|50px]] - $250. If it's blinking, any car can grab it. Otherwise, only the car with the corresponding color can collect it.<br /><br /> |
− | [[File:Rcproam2_dollar-bag.JPG|50px]] - | + | [[File:Rcproam2_dollar-bag.JPG|50px]] - $100. If it's blinking, any car can grab it. Otherwise, only the car with the corresponding color can collect it.<br /><br /> |
− | [[File:Rcproam2_ammo.JPG|50px]] - | + | [[File:Rcproam2_ammo.JPG|50px]] - $100. If you're equipped with a bought weapon, this item will increase the ammo by 5.<br /><br /> |
− | [[File:Rcproam2_star.JPG|50px]] - | + | [[File:Rcproam2_star.JPG|50px]] - $100. If you're equipped with a bought weapon, this item will increase the ammo by 1.<br /><br /> |
[[File:Rcproam2_letter.JPG|50px]] - No money. Collect the letters P, R, O, A, M and I (twice) to upgrade the car. The car can be upgraded twice.<br /><br /> | [[File:Rcproam2_letter.JPG|50px]] - No money. Collect the letters P, R, O, A, M and I (twice) to upgrade the car. The car can be upgraded twice.<br /><br /> | ||
− | [[File:Rcproam2_nitro.JPG|50px]] - No money, one nitro. If it's blinking, any car can grab it. Otherwise, only the car with the corresponding color can collect it.<br /><br /> | + | [[File:Rcproam2_nitro.JPG|50px]] - No money, one nitro. Any <u>unused</u> nitro is converted into $250 at the end of a race. If it's blinking, any car can grab it. Otherwise, only the car with the corresponding color can collect it.<br /><br /> |
− | [[File:Rcproam2_questionmark.JPG|50px]] - No money, gives either missiles or bombs with unlimited ammo. You can't tell from the question mark if it's one or the other, but the same question mark always contains the same weapon.<br /><br /> | + | [[File:Rcproam2_questionmark.JPG|50px]] - No money, gives either missiles or bombs with unlimited ammo for that race. You can't tell from the question mark if it's one or the other, but the same question mark always contains the same weapon.<br /><br /> |
[[File:Rcproam2_rollcage.JPG|50px]] - No money, prevents you from crashing after driving through an oil slick. If a car touches another car having the roll cage, it will start spinning and crash if hitting the border of the track. If both cars have the roll cage, nothing happens.<br /><br /> | [[File:Rcproam2_rollcage.JPG|50px]] - No money, prevents you from crashing after driving through an oil slick. If a car touches another car having the roll cage, it will start spinning and crash if hitting the border of the track. If both cars have the roll cage, nothing happens.<br /><br /> | ||
[[File:Rcproam2_1up.JPG|50px]] - No money, one continue<br /><br /> | [[File:Rcproam2_1up.JPG|50px]] - No money, one continue<br /><br /> | ||
==Speed== | ==Speed== | ||
− | The speed is tracked in RAM-address | + | The speed is tracked in RAM-address 0596. |
===Max speeds=== | ===Max speeds=== | ||
− | The below table shows how the max | + | The below table shows how the max speed increases with the upgrades. The numbers in the motor rows correspond to their additional speed boost. |
{| class="wikitable" | {| class="wikitable" | ||
| | | | ||
Line 22: | Line 22: | ||
|- | |- | ||
|Standard | |Standard | ||
− | | | + | |106 |
− | | | + | |114 |
− | | | + | |118 |
|- | |- | ||
|Red | |Red | ||
− | | | + | |8 |
− | | | + | |8 |
− | | | + | |8 |
|- | |- | ||
|Black | |Black | ||
− | | | + | |12 |
− | | | + | |12 |
− | | | + | |12 |
|- | |- | ||
|Silver | |Silver | ||
− | | | + | |14 |
− | | | + | |14 |
− | | | + | |14 |
|- | |- | ||
|Gold | |Gold | ||
− | | | + | |16 |
− | | | + | |16 |
− | | | + | |15 |
|- | |- | ||
|Hyper | |Hyper | ||
− | | | + | |17 |
− | | | + | |17 |
− | | | + | |16 |
|- | |- | ||
|Mega | |Mega | ||
− | | | + | |19 |
− | | | + | |20 |
− | | | + | |20 |
|- | |- | ||
|} | |} | ||
− | In addition to the boost of the speed stats, each new motor also improves the acceleration | + | In addition to the boost of the speed stats, each new motor also improves the acceleration. |
===Test of upgrade combinations=== | ===Test of upgrade combinations=== | ||
− | A primitive test was made by timing (in frames) one lap of track 6 with different combinations of motors and tires. | + | A primitive real-time test was made by timing (in frames) one lap of track 6 with different combinations of motors and tires. The green light was used as start of timing and the screen displaying "lap 2" was used as the end point. The completions were retried until they felt "representative" for each combination. They were of course still subject to minor execution mistakes, but should give an idea of what time differences to expect. |
{| class="wikitable" | {| class="wikitable" | ||
| | | | ||
Line 67: | Line 67: | ||
|Nooblies | |Nooblies | ||
|Dynafit | |Dynafit | ||
+ | |Scoopers | ||
|- | |- | ||
|Standard | |Standard | ||
− | | | + | |1438 |
− | | | + | |1376 |
− | | | + | |1361 |
− | | | + | |1361 |
+ | |1346 | ||
|- | |- | ||
|Red | |Red | ||
− | | | + | |1336 |
− | | | + | |1296 |
− | | | + | |1269 |
− | | | + | |1257 |
+ | |1265 | ||
|- | |- | ||
|Black | |Black | ||
− | | | + | |1268 |
− | | | + | |1261 |
− | | | + | |1248 |
− | | | + | |1238 |
+ | |1206 | ||
|- | |- | ||
|Silver | |Silver | ||
− | | | + | |1249 |
− | | | + | |1208 |
− | | | + | |1221 |
− | | | + | |1201 |
+ | |1195 | ||
+ | |- | ||
+ | |Gold | ||
+ | |1245 | ||
+ | |1193 | ||
+ | |1192 | ||
+ | |1201 | ||
+ | |1173 | ||
+ | |- | ||
+ | |Hyper | ||
+ | |1227 | ||
+ | |1200 | ||
+ | |1211 | ||
+ | |1189 | ||
+ | |1180 | ||
+ | |- | ||
+ | |Mega | ||
+ | |1245 | ||
+ | |1210 | ||
+ | |1193 | ||
+ | |1179 | ||
+ | |1159 | ||
|- | |- | ||
|} | |} | ||
===Zippers=== | ===Zippers=== | ||
− | Zippers | + | Zippers give a speed boost of around 111 tracked in 05B2, which then starts to drop every frame as soon as you leave the zipper (by 1, 1, 1, 0 etc). The boost drop rate is not impacted by obstacles. Very roughly, a zipper saves about one second. |
===Boosts=== | ===Boosts=== | ||
The nitro and start boost effects are governed by the same game mechanics. The effect goes through 4 phases (RAM-address 061E):<br /> | The nitro and start boost effects are governed by the same game mechanics. The effect goes through 4 phases (RAM-address 061E):<br /> | ||
# The counter in 0622 counts down from 32 (nitro) or 40 (start boost) by one every frame. When the counter reaches 0, phase 2 begins.<br /> | # The counter in 0622 counts down from 32 (nitro) or 40 (start boost) by one every frame. When the counter reaches 0, phase 2 begins.<br /> | ||
− | # RAM-address 0626 increases by 8 every frame for 8 frames (so ending at 64). 0626 is effectively what boosts the car | + | # RAM-address 0626 increases by 8 every frame for 8 frames (so ending at 64). 0626 is effectively what boosts the car.<br /> |
# 0622 is reset to 32 and starts to count down yet again. When the counter reaches 0, phase 4 begins.<br /> | # 0622 is reset to 32 and starts to count down yet again. When the counter reaches 0, phase 4 begins.<br /> | ||
− | # | + | # 0626 decreases by 1 every frame until it reaches 0. This is also the point when a new nitro can be used.<br /><br /> |
It's important to note the following things: | It's important to note the following things: | ||
− | * The nitro boost is <u>not</u> affected by | + | * The nitro boost is <u>not</u> affected by obstacles. That means they are extra useful when crossing water, bump sections etc. |
* By activating the nitro so you're in phase 2 while entering the obstacle, you can save additional time by not losing as much speed as you otherwise would have. | * By activating the nitro so you're in phase 2 while entering the obstacle, you can save additional time by not losing as much speed as you otherwise would have. | ||
− | * | + | * A boost saves roughly half a second (of course depending on which upgrades you have). |
+ | * Nitros generate additional lag, which should be taken into account when choosing where to use them. | ||
+ | <br /> | ||
+ | |||
+ | ==Tires== | ||
+ | The tire parameters have been described by FatRatKnight in http://tasvideos.org/forum/viewtopic.php?p=468257&highlight=#468257.<br /><br /> | ||
==RNG== | ==RNG== | ||
Line 115: | Line 146: | ||
* Line-up at the start line | * Line-up at the start line | ||
<br /> | <br /> | ||
− | All three are determined by | + | All three are determined by a set of RNG-addresses (0756-0759) and a frame counter (043C) when pressing start in the shop. The RNG-algorithm is recursive with the frame counter acting as enthropy. It's triggered a few times during the start of a race and can also occasionally be called during a race. The frame counter is reset between every race, which in theory could provide a method for manipulating the RNG. There are ways to determine the RNG-seed in race 1 (by looking at the car order at line-up and which letter is in the letter box). One could technically learn a few neighboring RNG-seeds that follow in race 2, depending on how long the frame counter was left to run during the shop menu. But the possibilities quickly multiply and it will in practice be difficult to memorize all possible branches. This means real-time manipulation is likely going to be limited. There is one exception and that is race 1, which always starts from the same seed and therefore only depends on the frame counter. |
===Letters=== | ===Letters=== | ||
− | + | This section is almost completely based on FatRatKnight's analysis, which can be found here: http://tasvideos.org/forum/viewtopic.php?p=468325#468325<br /><br /> | |
+ | |||
+ | Each individual letter item (to avoid any possible confusion, it's the white boxes with a black letter) is linked to one of six letter addresses (01CD-01D2). These links are static and are described further down. Each letter address is recalculated at the start of every race, regardless of if it's going to be used or not. The letter generation process is as follows: | ||
+ | #Update RNG-addresses 0756-0759. The detailed calculation with comments is described in http://tasvideos.org/forum/viewtopic.php?t=9164 | ||
+ | #Perform an XOR on the "letters collected" address of one of the cars (07A1-07A4) and 0xFF. Since each letter collected is a binary 1 in the corresponding byte, the result will contain 1 for the bits corresponding to letters <u>not</u> collected by that car. | ||
+ | #Perform an AND on the result in 2 with 0756. The AND-operation is performed from left to right and stops as soon as it results in a 1. | ||
+ | #The position of the resulting 1 determines the letter in the order P, R, O, A and M, with the rest always resulting in an I. Write the corresponding result to the letter address. | ||
+ | <br /> | ||
+ | |||
+ | Observations: | ||
+ | * Only letters <u>not</u> collected by the determining car are possible (except I, which is <u>always</u> possible) | ||
+ | * Assuming the RNG-generation algorithm is accurate (which appears to be the case), the probability of possible letters drops by roughly half each step and finally the rest going into I. E.g. if a car has collected the letters P, R and M, the probabilities become O - 50%, A - 25% and I - 25%. | ||
+ | * A letter can never have a probability of >50%, except for I, which can actually be 100% determined if that's the only letter missing. | ||
+ | * Since the letter items will contain the different cars' missing letters, it's an advantage to keep the opponents at roughly the same level as yourself (to the extent possible) since that will increase the chances of spawning letters you need. | ||
+ | <br /> | ||
+ | |||
+ | The six letter addresses depend on the different cars in the following way: | ||
+ | * 01CD - The XOR operation will be based on car 1's letters (red, address 07A1) | ||
+ | * 01CE - Car 2's letters (blue, address 07A2) | ||
+ | * 01CF - Car 3's letters (green, address, 07A3) | ||
+ | * 01D0 - Car 4's letters (yellow, address 07A4) | ||
+ | * 01D1 - Car letters depending on the race. In race 1, it's car 1's letters, in race 2, car 2's etc. Note that the bonus stages count as well. So race 9 will depend on car 2's letters. | ||
+ | * 01D2 - Random car (= depends on the RNG-addresses and therefore not predictable) | ||
+ | <br /> | ||
+ | |||
+ | The RNG-addresses are updated in-between, which means that 01CD and 01D1 are not necessarily the same in race 1 etc. Below is the link between these letter addresses and the individual letter items in the 15 first races.<br /><br /> | ||
+ | |||
+ | <u>Race 1</u><br /> | ||
+ | Only one letter - P1<br /><br /> | ||
+ | |||
+ | <u>Race 2</u><br /> | ||
+ | Left side - Random<br /> | ||
+ | Left of 3 letters - Race (P2)<br /> | ||
+ | Middle of 3 letters - P2<br /> | ||
+ | Right of 3 letters - P3<br /><br /> | ||
+ | |||
+ | <u>Race 4</u><br /> | ||
+ | Left at zipper - Race (P4)<br /> | ||
+ | Right at zipper - P4<br /> | ||
+ | Past zipper: P1<br /><br /> | ||
+ | |||
+ | <u>Race 6</u><br /> | ||
+ | Lower of 3 letters - P2 <br /> | ||
+ | Middle of 3 letters - Race (P2)<br /> | ||
+ | Upper of 3 letters - P3<br /> | ||
+ | First of the left straight - P1<br /> | ||
+ | Second of the left straight - Random<br /> | ||
+ | Zipper "side pit" - Random<br /><br /> | ||
+ | |||
+ | <u>Race 7</u><br /> | ||
+ | Only one letter - P4<br /><br /> | ||
+ | |||
+ | <u>Race 9</u><br /> | ||
+ | Upper left - P1<br /> | ||
+ | Upper right - P3<br /> | ||
+ | Lower left - P2<br /> | ||
+ | Lower right - P4<br /><br /> | ||
+ | |||
+ | <u>Race 10</u><br /> | ||
+ | Upper right - P3<br /> | ||
+ | Left - Race (P3)<br /> | ||
+ | Lower right - P2<br /><br /> | ||
+ | |||
+ | <u>Race 11</u><br /> | ||
+ | Upper, ice section - P3<br /> | ||
+ | Lower, ice section - P2<br /> | ||
+ | Right side - Random<br /> | ||
+ | Finish line - Random<br /><br /> | ||
+ | |||
+ | <u>Race 12</u><br /> | ||
+ | Start - P4<br /> | ||
+ | Pit, right side - P4<br /> | ||
+ | Between bombs - P1<br /> | ||
+ | Pit, left side - Random<br /> | ||
+ | Left of 3 letters - P1<br /> | ||
+ | Middle of 3 letters - P2<br /> | ||
+ | Right of 3 letters - P3<br /><br /> | ||
+ | |||
+ | <u>Race 13</u><br /> | ||
+ | Only letter - Race (P2)<br /><br /> | ||
+ | |||
+ | <u>Race 14</u><br /> | ||
+ | Left of the first group of 3 letters - P1<br /> | ||
+ | Middle of the first group of 3 letters - P2<br /> | ||
+ | Right of the first group of 3 letters - P3<br /> | ||
+ | Left of the second group of 3 letters - P1<br /> | ||
+ | Middle of the second group of 3 letters - P2<br /> | ||
+ | Right of the second group of 3 letters - P3<br /> | ||
+ | Finish line - P4<br /><br /> | ||
+ | |||
+ | <u>Race 15</u><br /> | ||
+ | Right side, upper right - P1<br /> | ||
+ | Right side, middle left - P2<br /> | ||
+ | Right side, middle right - P3<br /> | ||
+ | Right side, lower right - P3<br /> | ||
+ | Left side - P4<br /><br /> | ||
+ | |||
+ | Observations: | ||
+ | * If two letter items draw their content from the same letter address, they will also always be identical. E.g there is no need to skip the zipper in race 6 and try to collect the letter instead since it will always be the same as the last letter on the left side (unless of course it was an I and you need one more). | ||
+ | * Some of the letter items will rarely or never be collected by the cpu cars. By prioritizing collecting these and leave some of the easy-to-collect letters to the cpus, you'll end up being more even with them, which will result in a higher chance of the upcoming letters being the ones you're looking for. | ||
+ | * There doesn't appear to be any particular pattern or structure to which letter item depends on which letter address. It's just whatever the developers decided the dependence should be. | ||
+ | <br /> | ||
+ | |||
+ | As mentioned above, the letter in race 1 only depends on the frame counter in 043C. The table below shows the 256 different possible results: | ||
{| class="wikitable" | {| class="wikitable" | ||
| | | | ||
Line 429: | Line 563: | ||
Some observations: | Some observations: | ||
− | * P | + | * P - 85, R - 43, O - 21, A - 10, M - 6 and I - 5 (and non-valid - 86). This corresponds extremely well with the "50%" probability decay, described above. |
* Roughly one third of the frames are not valid (= nothing happens when you press a button on these frames). | * Roughly one third of the frames are not valid (= nothing happens when you press a button on these frames). | ||
− | * There doesn't appear to be any structure to the letters. There are no "islands" with one letter | + | * There doesn't appear to be any structure to the letters. There are no "islands" with one letter that would make it easy to get that particular one. |
− | + | * Since the same RNG appears to govern different elements, you can already from the start get an indication of the value of 043C the race began on by looking at the order of the cars at the line-up. | |
− | * Since the same RNG appears to govern different elements, you can already from the start get an indication of the value of 043C the race began on by | + | <br /> |
+ | |||
+ | As already mentioned higher up, similar tables can be made from a save state for the other tracks as well. Unfortunately, this won't be of any value in a real-time attempt, since the RNG-seed at that point won't be predictable. | ||
+ | |||
+ | ===Traffic lights=== | ||
+ | The timing of the traffic lights can be seen in 06E2. | ||
+ | # The frame before the traffic lights appear on screen, 06E2 is set to 16. It then counts down by one every frame. | ||
+ | # At 0, 06E2 is reset to 32 and starts to count down again. The first traffic light is lit. | ||
+ | # At 0, 06E2 is reset to an RNG-value between 24 and 87. The second light is lit. | ||
+ | # At 0 (or actually one frame after), the green light is lit. | ||
+ | <br /> | ||
+ | Since the green light timing follows the letter RNG, it's not possible to predict (other than to some extent in race 1). The piece of code determining the green light timer RNG has been described by FatRatKnight in http://tasvideos.org/forum/viewtopic.php?p=468741&highlight=#468741. In short, the time (in frames) is 24 + an RNG-value between 0 and 63.<br /><br /> | ||
+ | |||
+ | ==Speed boost timing== | ||
+ | The time window for getting the start boost appears to be linked to the race you're on. The first four races, which are the most important, have the following windows: | ||
+ | # 15 | ||
+ | # 15 | ||
+ | # 14 | ||
+ | # 12 | ||
+ | <br /> | ||
+ | It looks like all the races after #4 (except 25, 28 and 31, which are copies of 1, 2 and 3, respectively) also have a time window of 12 frames for getting the start boost. However, if any of the other cars accelerate before you and within the "start boost time window", they will get the boost and you will not. It seems that the cpus get better and better to react as the game progresses, so it will be more and more difficult to get the start boost for that reason.<br /><br /> | ||
+ | |||
+ | ==Menu navigation== | ||
+ | * After a race, when the result screens are showing, you only need to press start once. This is possible as soon as the screen turns black after the race. | ||
+ | * Once the map screen has been shown for 10 frames, it can be clicked away by any button. Roughly every third frame is a blank though. So a good idea is to press two buttons almost at once to decrease the chances of getting stuck on blank frames. | ||
+ | * The drag race screen can be clicked away after 47 frames and then (roughly?) every third frame is a blank. | ||
+ | * The tug-o-truck screen can be clicked away after 46 frames and then (roughly?) every third frame is a blank. | ||
+ | * A merchandise can be selected (A or B) two frames before it's selected/shown and then every frame without blanks. | ||
+ | * A motor buy takes at least 55 frames (for the first one available). | ||
+ | * It costs an additional 28 frames for each menu jump, regardless of it's the outer or one of the inner menus. | ||
+ | * After 22 frames on the shop screen, your current motor type will be displayed. If you enter the motor menu after this point, you'll go directly to the next motor upgrade. However, if you enter the motor menu before your current motor type is shown, you'll be at the red motor and will have to navigate more menu items and lose time overall.<br /><br /> | ||
− | + | ==RAM addresses== | |
+ | All player-specific stats are for P1. The next three addresses contain the corresponding stats of the other cars. | ||
+ | * 0596 - Car speed | ||
+ | * 05B2 - Zipper boost | ||
+ | * 0748 - Nitros | ||
+ | * 0626/061E/0622 - Nitro boost/phase/counter (see section about nitros) | ||
+ | * 043C - Frame counter giving input to the RNG (letters/line-up/traffic light) | ||
+ | * 0756-0759 - RNG-addresses | ||
+ | * 01CD-01D2 - Letter addresses. 103 - P, 104 - R etc. (see section about letters) | ||
+ | * 06E2 - Traffic light countdown timer | ||
+ | * 0700 - Motor type (0-6, where 0 is the standard motor and 6 is the Mega motor) | ||
+ | * 0704 - Tyre type (0-4, where 0 is the standard tires and 4 is the Scoopers tires) | ||
+ | * 0710 - Car upgrade (0-2, where 0 is standard and 2 is the 2nd car upgrade) | ||
+ | * 05F2/05F6 - Big/Small money earned/collected during a race. The decimal value is multiplied by 10 for a player's earnings during the race. | ||
+ | * 075F/075B - Big/Small money (total). The decimal value is multiplied by 10 for the player's total cash (added up after each race). | ||
+ | * 07A1 - Letters collected. P is worth 64, R 32, O 16, A 8, M 4, the first I 2 and the second I is worth 1. This adds up to 127 (or 01111111 in binary). When you enter the shop with a value of 127, you'll get the first upgrade and the value changes to 128 (or 10000000 in binary). Once you reach 255 (128+127), you'll get the second car upgrade and the value is set to 253 for the rest of the game. | ||
+ | * 0728/072C/0730/0734/0738/073C/0740/0744 - Buckshots/Missiles/Bombs/Lazers/Freezes/Mega Pulses/Shields/Slicks | ||
+ | * 059E - Angle of the car. -33 is N and 33 is E (with reference to the screen, not the isometric view of the track). | ||
+ | * 0531/052C - Big/Small x-position of the car (with reference to the screen). Positive to the right. | ||
+ | * 053B/0536 - Big/Small y-position of the car (with reference to the screen). Positive down. | ||
+ | * 055E/0559/056D - Lap/Segment/sub-segment, these addresses are the game's way of tracking player progress in the race (possibly to prevent any kind of shortcuts or manipulation of the lap counter) | ||
+ | More addresses are listed in http://tasvideos.org/forum/viewtopic.php?t=9164 |
Latest revision as of 04:55, 11 June 2023
Contents
Items
- $250. If it's blinking, any car can grab it. Otherwise, only the car with the corresponding color can collect it.
- $100. If it's blinking, any car can grab it. Otherwise, only the car with the corresponding color can collect it.
- $100. If you're equipped with a bought weapon, this item will increase the ammo by 5.
- $100. If you're equipped with a bought weapon, this item will increase the ammo by 1.
- No money. Collect the letters P, R, O, A, M and I (twice) to upgrade the car. The car can be upgraded twice.
- No money, one nitro. Any unused nitro is converted into $250 at the end of a race. If it's blinking, any car can grab it. Otherwise, only the car with the corresponding color can collect it.
- No money, gives either missiles or bombs with unlimited ammo for that race. You can't tell from the question mark if it's one or the other, but the same question mark always contains the same weapon.
- No money, prevents you from crashing after driving through an oil slick. If a car touches another car having the roll cage, it will start spinning and crash if hitting the border of the track. If both cars have the roll cage, nothing happens.
- No money, one continue
Speed
The speed is tracked in RAM-address 0596.
Max speeds
The below table shows how the max speed increases with the upgrades. The numbers in the motor rows correspond to their additional speed boost.
Default | 1st upgrade | 2nd upgrade | |
Standard | 106 | 114 | 118 |
Red | 8 | 8 | 8 |
Black | 12 | 12 | 12 |
Silver | 14 | 14 | 14 |
Gold | 16 | 16 | 15 |
Hyper | 17 | 17 | 16 |
Mega | 19 | 20 | 20 |
In addition to the boost of the speed stats, each new motor also improves the acceleration.
Test of upgrade combinations
A primitive real-time test was made by timing (in frames) one lap of track 6 with different combinations of motors and tires. The green light was used as start of timing and the screen displaying "lap 2" was used as the end point. The completions were retried until they felt "representative" for each combination. They were of course still subject to minor execution mistakes, but should give an idea of what time differences to expect.
Standard | Skinny | Nooblies | Dynafit | Scoopers | |
Standard | 1438 | 1376 | 1361 | 1361 | 1346 |
Red | 1336 | 1296 | 1269 | 1257 | 1265 |
Black | 1268 | 1261 | 1248 | 1238 | 1206 |
Silver | 1249 | 1208 | 1221 | 1201 | 1195 |
Gold | 1245 | 1193 | 1192 | 1201 | 1173 |
Hyper | 1227 | 1200 | 1211 | 1189 | 1180 |
Mega | 1245 | 1210 | 1193 | 1179 | 1159 |
Zippers
Zippers give a speed boost of around 111 tracked in 05B2, which then starts to drop every frame as soon as you leave the zipper (by 1, 1, 1, 0 etc). The boost drop rate is not impacted by obstacles. Very roughly, a zipper saves about one second.
Boosts
The nitro and start boost effects are governed by the same game mechanics. The effect goes through 4 phases (RAM-address 061E):
- The counter in 0622 counts down from 32 (nitro) or 40 (start boost) by one every frame. When the counter reaches 0, phase 2 begins.
- RAM-address 0626 increases by 8 every frame for 8 frames (so ending at 64). 0626 is effectively what boosts the car.
- 0622 is reset to 32 and starts to count down yet again. When the counter reaches 0, phase 4 begins.
- 0626 decreases by 1 every frame until it reaches 0. This is also the point when a new nitro can be used.
It's important to note the following things:
- The nitro boost is not affected by obstacles. That means they are extra useful when crossing water, bump sections etc.
- By activating the nitro so you're in phase 2 while entering the obstacle, you can save additional time by not losing as much speed as you otherwise would have.
- A boost saves roughly half a second (of course depending on which upgrades you have).
- Nitros generate additional lag, which should be taken into account when choosing where to use them.
Tires
The tire parameters have been described by FatRatKnight in http://tasvideos.org/forum/viewtopic.php?p=468257&highlight=#468257.
RNG
The most important RNG-factors in the game are:
- Letters
- Traffic light timing
- Line-up at the start line
All three are determined by a set of RNG-addresses (0756-0759) and a frame counter (043C) when pressing start in the shop. The RNG-algorithm is recursive with the frame counter acting as enthropy. It's triggered a few times during the start of a race and can also occasionally be called during a race. The frame counter is reset between every race, which in theory could provide a method for manipulating the RNG. There are ways to determine the RNG-seed in race 1 (by looking at the car order at line-up and which letter is in the letter box). One could technically learn a few neighboring RNG-seeds that follow in race 2, depending on how long the frame counter was left to run during the shop menu. But the possibilities quickly multiply and it will in practice be difficult to memorize all possible branches. This means real-time manipulation is likely going to be limited. There is one exception and that is race 1, which always starts from the same seed and therefore only depends on the frame counter.
Letters
This section is almost completely based on FatRatKnight's analysis, which can be found here: http://tasvideos.org/forum/viewtopic.php?p=468325#468325
Each individual letter item (to avoid any possible confusion, it's the white boxes with a black letter) is linked to one of six letter addresses (01CD-01D2). These links are static and are described further down. Each letter address is recalculated at the start of every race, regardless of if it's going to be used or not. The letter generation process is as follows:
- Update RNG-addresses 0756-0759. The detailed calculation with comments is described in http://tasvideos.org/forum/viewtopic.php?t=9164
- Perform an XOR on the "letters collected" address of one of the cars (07A1-07A4) and 0xFF. Since each letter collected is a binary 1 in the corresponding byte, the result will contain 1 for the bits corresponding to letters not collected by that car.
- Perform an AND on the result in 2 with 0756. The AND-operation is performed from left to right and stops as soon as it results in a 1.
- The position of the resulting 1 determines the letter in the order P, R, O, A and M, with the rest always resulting in an I. Write the corresponding result to the letter address.
Observations:
- Only letters not collected by the determining car are possible (except I, which is always possible)
- Assuming the RNG-generation algorithm is accurate (which appears to be the case), the probability of possible letters drops by roughly half each step and finally the rest going into I. E.g. if a car has collected the letters P, R and M, the probabilities become O - 50%, A - 25% and I - 25%.
- A letter can never have a probability of >50%, except for I, which can actually be 100% determined if that's the only letter missing.
- Since the letter items will contain the different cars' missing letters, it's an advantage to keep the opponents at roughly the same level as yourself (to the extent possible) since that will increase the chances of spawning letters you need.
The six letter addresses depend on the different cars in the following way:
- 01CD - The XOR operation will be based on car 1's letters (red, address 07A1)
- 01CE - Car 2's letters (blue, address 07A2)
- 01CF - Car 3's letters (green, address, 07A3)
- 01D0 - Car 4's letters (yellow, address 07A4)
- 01D1 - Car letters depending on the race. In race 1, it's car 1's letters, in race 2, car 2's etc. Note that the bonus stages count as well. So race 9 will depend on car 2's letters.
- 01D2 - Random car (= depends on the RNG-addresses and therefore not predictable)
The RNG-addresses are updated in-between, which means that 01CD and 01D1 are not necessarily the same in race 1 etc. Below is the link between these letter addresses and the individual letter items in the 15 first races.
Race 1
Only one letter - P1
Race 2
Left side - Random
Left of 3 letters - Race (P2)
Middle of 3 letters - P2
Right of 3 letters - P3
Race 4
Left at zipper - Race (P4)
Right at zipper - P4
Past zipper: P1
Race 6
Lower of 3 letters - P2
Middle of 3 letters - Race (P2)
Upper of 3 letters - P3
First of the left straight - P1
Second of the left straight - Random
Zipper "side pit" - Random
Race 7
Only one letter - P4
Race 9
Upper left - P1
Upper right - P3
Lower left - P2
Lower right - P4
Race 10
Upper right - P3
Left - Race (P3)
Lower right - P2
Race 11
Upper, ice section - P3
Lower, ice section - P2
Right side - Random
Finish line - Random
Race 12
Start - P4
Pit, right side - P4
Between bombs - P1
Pit, left side - Random
Left of 3 letters - P1
Middle of 3 letters - P2
Right of 3 letters - P3
Race 13
Only letter - Race (P2)
Race 14
Left of the first group of 3 letters - P1
Middle of the first group of 3 letters - P2
Right of the first group of 3 letters - P3
Left of the second group of 3 letters - P1
Middle of the second group of 3 letters - P2
Right of the second group of 3 letters - P3
Finish line - P4
Race 15
Right side, upper right - P1
Right side, middle left - P2
Right side, middle right - P3
Right side, lower right - P3
Left side - P4
Observations:
- If two letter items draw their content from the same letter address, they will also always be identical. E.g there is no need to skip the zipper in race 6 and try to collect the letter instead since it will always be the same as the last letter on the left side (unless of course it was an I and you need one more).
- Some of the letter items will rarely or never be collected by the cpu cars. By prioritizing collecting these and leave some of the easy-to-collect letters to the cpus, you'll end up being more even with them, which will result in a higher chance of the upcoming letters being the ones you're looking for.
- There doesn't appear to be any particular pattern or structure to which letter item depends on which letter address. It's just whatever the developers decided the dependence should be.
As mentioned above, the letter in race 1 only depends on the frame counter in 043C. The table below shows the 256 different possible results:
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | |
0-15 | R | R | P | P | P | P | A | O | R | R | ||||||
16-31 | P | P | P | P | P | M | O | R | R | P | P | P | ||||
32-47 | P | P | O | O | R | R | P | P | P | P | ||||||
48-63 | A | O | R | R | P | P | P | P | I | O | O | |||||
64-79 | R | R | P | P | P | P | A | O | R | R | ||||||
80-95 | P | P | P | P | M | A | R | R | P | P | P | |||||
96-111 | P | P | M | O | R | R | P | P | P | P | ||||||
112-127 | A | O | R | R | P | P | P | P | I | A | O | |||||
128-143 | R | R | P | P | P | P | I | O | R | R | R | |||||
144-159 | P | P | P | P | A | O | R | R | P | P | ||||||
160-175 | P | P | M | P | R | R | P | P | P | P | P | |||||
176-191 | O | O | R | R | P | P | P | P | A | O | ||||||
192-207 | R | R | P | P | P | P | I | A | R | R | R | |||||
208-223 | P | P | P | P | M | O | R | R | P | P | R | |||||
224-239 | P | M | O | R | R | P | P | P | P | P | ||||||
240-255 | A | O | R | R | P | P | P | P | I | O | O |
Some observations:
- P - 85, R - 43, O - 21, A - 10, M - 6 and I - 5 (and non-valid - 86). This corresponds extremely well with the "50%" probability decay, described above.
- Roughly one third of the frames are not valid (= nothing happens when you press a button on these frames).
- There doesn't appear to be any structure to the letters. There are no "islands" with one letter that would make it easy to get that particular one.
- Since the same RNG appears to govern different elements, you can already from the start get an indication of the value of 043C the race began on by looking at the order of the cars at the line-up.
As already mentioned higher up, similar tables can be made from a save state for the other tracks as well. Unfortunately, this won't be of any value in a real-time attempt, since the RNG-seed at that point won't be predictable.
Traffic lights
The timing of the traffic lights can be seen in 06E2.
- The frame before the traffic lights appear on screen, 06E2 is set to 16. It then counts down by one every frame.
- At 0, 06E2 is reset to 32 and starts to count down again. The first traffic light is lit.
- At 0, 06E2 is reset to an RNG-value between 24 and 87. The second light is lit.
- At 0 (or actually one frame after), the green light is lit.
Since the green light timing follows the letter RNG, it's not possible to predict (other than to some extent in race 1). The piece of code determining the green light timer RNG has been described by FatRatKnight in http://tasvideos.org/forum/viewtopic.php?p=468741&highlight=#468741. In short, the time (in frames) is 24 + an RNG-value between 0 and 63.
Speed boost timing
The time window for getting the start boost appears to be linked to the race you're on. The first four races, which are the most important, have the following windows:
- 15
- 15
- 14
- 12
It looks like all the races after #4 (except 25, 28 and 31, which are copies of 1, 2 and 3, respectively) also have a time window of 12 frames for getting the start boost. However, if any of the other cars accelerate before you and within the "start boost time window", they will get the boost and you will not. It seems that the cpus get better and better to react as the game progresses, so it will be more and more difficult to get the start boost for that reason.
- After a race, when the result screens are showing, you only need to press start once. This is possible as soon as the screen turns black after the race.
- Once the map screen has been shown for 10 frames, it can be clicked away by any button. Roughly every third frame is a blank though. So a good idea is to press two buttons almost at once to decrease the chances of getting stuck on blank frames.
- The drag race screen can be clicked away after 47 frames and then (roughly?) every third frame is a blank.
- The tug-o-truck screen can be clicked away after 46 frames and then (roughly?) every third frame is a blank.
- A merchandise can be selected (A or B) two frames before it's selected/shown and then every frame without blanks.
- A motor buy takes at least 55 frames (for the first one available).
- It costs an additional 28 frames for each menu jump, regardless of it's the outer or one of the inner menus.
- After 22 frames on the shop screen, your current motor type will be displayed. If you enter the motor menu after this point, you'll go directly to the next motor upgrade. However, if you enter the motor menu before your current motor type is shown, you'll be at the red motor and will have to navigate more menu items and lose time overall.
RAM addresses
All player-specific stats are for P1. The next three addresses contain the corresponding stats of the other cars.
- 0596 - Car speed
- 05B2 - Zipper boost
- 0748 - Nitros
- 0626/061E/0622 - Nitro boost/phase/counter (see section about nitros)
- 043C - Frame counter giving input to the RNG (letters/line-up/traffic light)
- 0756-0759 - RNG-addresses
- 01CD-01D2 - Letter addresses. 103 - P, 104 - R etc. (see section about letters)
- 06E2 - Traffic light countdown timer
- 0700 - Motor type (0-6, where 0 is the standard motor and 6 is the Mega motor)
- 0704 - Tyre type (0-4, where 0 is the standard tires and 4 is the Scoopers tires)
- 0710 - Car upgrade (0-2, where 0 is standard and 2 is the 2nd car upgrade)
- 05F2/05F6 - Big/Small money earned/collected during a race. The decimal value is multiplied by 10 for a player's earnings during the race.
- 075F/075B - Big/Small money (total). The decimal value is multiplied by 10 for the player's total cash (added up after each race).
- 07A1 - Letters collected. P is worth 64, R 32, O 16, A 8, M 4, the first I 2 and the second I is worth 1. This adds up to 127 (or 01111111 in binary). When you enter the shop with a value of 127, you'll get the first upgrade and the value changes to 128 (or 10000000 in binary). Once you reach 255 (128+127), you'll get the second car upgrade and the value is set to 253 for the rest of the game.
- 0728/072C/0730/0734/0738/073C/0740/0744 - Buckshots/Missiles/Bombs/Lazers/Freezes/Mega Pulses/Shields/Slicks
- 059E - Angle of the car. -33 is N and 33 is E (with reference to the screen, not the isometric view of the track).
- 0531/052C - Big/Small x-position of the car (with reference to the screen). Positive to the right.
- 053B/0536 - Big/Small y-position of the car (with reference to the screen). Positive down.
- 055E/0559/056D - Lap/Segment/sub-segment, these addresses are the game's way of tracking player progress in the race (possibly to prevent any kind of shortcuts or manipulation of the lap counter)
More addresses are listed in http://tasvideos.org/forum/viewtopic.php?t=9164