Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [10:07 PM] gifvex: just info, draw your own conclusions
- [10:08 PM] gifvex: i observed that if you stand still vs take 1 step, the rng after is 8-9 apart
- [10:08 PM] gifvex: i sampled the rng by standing still and at frame 1135 randomadd was 64
- [10:09 PM] gifvex: i then took 22 steps before then and on frame 1135 it was 240
- [10:09 PM] gifvex: 64 + 22*8 = 240
- [10:10 PM] gifvex: on frame 792 randomadd was 243
- [10:10 PM] gifvex: i took 2 steps before then and on frame 792 it was 5
- [10:10 PM] gifvex: (243 + 2*9) % 256 = 5
- [10:10 PM] Dabomstew: how in the hell is it that big of a shift
- [10:10 PM] gifvex: each step seems to offset randomadd by +8-9 and randomsub by -8-9
- [10:11 PM] gifvex: both vertical and horizontal
- [10:11 PM] Dabomstew: oh shit
- [10:11 PM] Dabomstew: copyborderwhatever
- [10:11 PM] Dabomstew: happening before random
- [10:11 PM] Dabomstew: right got it
- [10:12 PM] luck i b&phlosion: yeah
- [10:12 PM] luck i b&phlosion: https://github.com/pret/pokered/blob/master/home/vcopy.asm#L42
- [10:12 PM] gifvex: my conclusion was that this makes the rng seem super predictable
- [10:12 PM] luck i b&phlosion: RedrawRowOrColumn
- [10:13 PM] gifvex: if we had a better idea on what the offset per step was, we could sample the rng for however many frames, identify which frames are a multiple of buffered inputs away, and offset them based on the number of steps it takes to get there
- [10:14 PM] gifvex: it's definitely not a fixed value 8-9 though, but between there from my tests
- [10:14 PM] Dabomstew: yeah that's going to depend on rdiv alignment as usual
- [10:17 PM] gifvex: i tried plotting unknown dungeon rng for 30 seconds
- [10:18 PM] gifvex: offsetting all the sampled values based on how many steps i would have done by that frame
- [10:18 PM] gifvex: walked back/forth on entrance tiles to avoid any early rolls where add was <10
- [10:19 PM] gifvex: then walked 2 up such that 2nd step rolled for encounter when add and sub would be target values based on the formula of (sampled +/- steps * n) % 256 where n was 8-9
- [10:19 PM] gifvex: and was either dead on or within like 5 because of rdiv probably
- [10:23 PM] Dabomstew: huh conveniently redrawrow/col has a completely fixed running time (for each of row or col, anyway)
- [10:23 PM] Dabomstew: jr successcond = jr failcond + inc
- [10:23 PM] Dabomstew: in clocks
- [10:23 PM] gifvex: ooh
- [10:23 PM] Dabomstew: so that could be calculated
- [10:24 PM] Dabomstew: i'm sure that one must take longer than the other
- [10:24 PM] Dabomstew: presumably column longer than row
- [10:24 PM] Dabomstew: because of all those tiny dv shifts
- -
- [8:01 PM] gifvex: if vertical steps and horizontal steps delay random by differing numbers of cycles, if you need to take 5 steps up and 5 steps left, will the RNG state at the end of the 10 steps always be the same, regardless of which order you take the steps in?
- [8:02 PM] Dabomstew: no
- [8:03 PM] Dabomstew: because of rdiv alignment
- [8:03 PM] Dabomstew: and carryflag (for sub anyway)
- [8:03 PM] gifvex: yeah i was wondering that for sub
- [8:05 PM] gifvex: during each of the 10 steps, random can be called at 1 of 2 alignments?
- [8:05 PM] Dabomstew: well it's only for the first non lag frame
- [8:05 PM] Dabomstew: in each step
- [8:06 PM] gifvex: right
- [8:06 PM] gifvex: which means 10 random calls that can either be early or late aligned
- [8:06 PM] gifvex: based on whether that step was vertical or horizontal?
- [8:07 PM] Dabomstew: well horizontal column copy is say 7.9 rdivs and vertical is 8.3 (they are somewhat close to these)
- [8:09 PM] Dabomstew: so then you'd have
- rdiv alignment (no copy) | column copy HRA+ | row copy HRA+
- 0.05 | 7 (7.95) | 8 (8.35)
- 0.40 | 8 (8.30) | 8 (8.70)
- 0.80 | 8 (8.75) | 9 (9.10)
- [8:09 PM] gifvex: why would add be different at the end of the 10 steps? if it's getting an "extra" 7.9 five times and an extra 8.3 five times, shouldn't the order not matter?
- [8:09 PM] Dabomstew: this is one place where it IS actually truncated
- [8:09 PM] Dabomstew: there is no compensation
- [8:09 PM] gifvex: oh yeah
- [8:10 PM] Dabomstew: +7 columns are really rare
- [8:10 PM] Dabomstew: because the cycle count is actually more like 7.95
- [8:10 PM] Dabomstew: so "base" alignment would have to be 0.00~0.05ish (of 256 clock cycles)
- [8:12 PM] gifvex: at the start of 1 vblank for each step, it will be a fixed rdiv cycle?
- [8:13 PM] Dabomstew: well provided each step takes 17 frames and there are no npcs or extra disablelcd then yes
- [8:14 PM] gifvex: would it be then fair to say you could make a chart like so
- [8:14 PM] gifvex:
- step horz vert
- 1 7 8
- 2 8 8
- 3 8 8
- 4 8 9
- [8:14 PM] Dabomstew: yes given the right environment
- [8:15 PM] gifvex: and then would it be fair to say, if you wanted +33 add during your 4 steps in this example table, there are only certain combinations that would get you that?
- [8:15 PM] Dabomstew: yeah
- [8:15 PM] Dabomstew: sub is a lot more complicated but probably still also mappable
- [8:17 PM] gifvex: sub is more complicated, but that's what we want
- [8:18 PM] gifvex: simple add to avoid encounters, and complex sub to target paras
- [8:18 PM] Dabomstew: oh fucking mount moon
- [8:18 PM] gifvex: well for example lol
- [8:18 PM] Dabomstew: if the frames per step is actually consistent in there I guess it's fine
- [8:18 PM] gifvex: i don't expect to be able to map lag easily if at all
- [8:18 PM] Dabomstew: modelling gets a lot more complex without that
- [8:18 PM] Dabomstew: but yeah I feel you
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement