Open zaphod77 opened 2 years ago
At least two systems have to be implemented, with each mode made to use the appropriate one:
Technically TGM gravity can be implemented perfectly with floating point arithmetic, because all the math operates over power-of-two fractions, which are represented exactly in floating point, but it's done with 32-bit integers originally. Frames-per-row gravity can't be represented perfectly with floating point arithmetic, however.
I don't know if the current base 60 gravity system is even originally used in any of the supported modes, if not then we don't even need it anymore.
it's currently used in everything, and would still need to be used in original and simple modes. And probably also in versus. Though we may be able to remove it form simple modes, if we can get the real guideline timings. but would still need to be there fo original-beginner, master, 20g and doom.
Tomoyo-flash basic woudl use sega system, while the sakura, target and edit woudl use tgm gravity. i'm not sure waht e-heart would use.
old style uses frames per line, and never goes above 1g.
TGM modes effectively use fractions of 128, so it's reasonably simple to change 60 into 128, 59 into 127, and 30 into 64, and use integer math.
segatet can be done with great enough fraction denominator. annoyingly high, but still within the 32 bit limits.
old style GB, forget it. you MUST use frames per gravity unit. too damn many primes.
PLUS, we need to add speedchange level tables, to get all modes cloned from TGM correct. currently changes from them are every 10 levels, and that's NOT how TGM games actually work. Hebo mini does in fact do this in master-extra and devil-quake.
This isn't enough precision to do TGM gravity accurately.
TGM gravity is effectively in fractions of 128.
Converting the gravity system would allow for 100% accurate gravity tables for TGM modes, and allow for more accurate sega old school (though still not perfect). Gameboy old school cannot be done in fractional gravity due to all the prime number gravity framecounts used.
Note that while every gravity can be represented, the timing of the changes require a separate table, as well as an ARE after line clear table to accurately do the modes.