Advertisement
entrpntr

RedrawRowOrColumn (horiz vs vert movement)

Nov 20th, 2016
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.49 KB | None | 0 0
  1. [10:07 PM] gifvex: just info, draw your own conclusions
  2. [10:08 PM] gifvex: i observed that if you stand still vs take 1 step, the rng after is 8-9 apart
  3. [10:08 PM] gifvex: i sampled the rng by standing still and at frame 1135 randomadd was 64
  4. [10:09 PM] gifvex: i then took 22 steps before then and on frame 1135 it was 240
  5. [10:09 PM] gifvex: 64 + 22*8 = 240
  6. [10:10 PM] gifvex: on frame 792 randomadd was 243
  7. [10:10 PM] gifvex: i took 2 steps before then and on frame 792 it was 5
  8. [10:10 PM] gifvex: (243 + 2*9) % 256 = 5
  9. [10:10 PM] Dabomstew: how in the hell is it that big of a shift
  10. [10:10 PM] gifvex: each step seems to offset randomadd by +8-9 and randomsub by -8-9
  11. [10:11 PM] gifvex: both vertical and horizontal
  12. [10:11 PM] Dabomstew: oh shit
  13. [10:11 PM] Dabomstew: copyborderwhatever
  14. [10:11 PM] Dabomstew: happening before random
  15. [10:11 PM] Dabomstew: right got it
  16. [10:12 PM] luck i b&phlosion: yeah
  17. [10:12 PM] luck i b&phlosion: https://github.com/pret/pokered/blob/master/home/vcopy.asm#L42
  18. [10:12 PM] gifvex: my conclusion was that this makes the rng seem super predictable
  19. [10:12 PM] luck i b&phlosion: RedrawRowOrColumn
  20. [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
  21. [10:14 PM] gifvex: it's definitely not a fixed value 8-9 though, but between there from my tests
  22. [10:14 PM] Dabomstew: yeah that's going to depend on rdiv alignment as usual
  23. [10:17 PM] gifvex: i tried plotting unknown dungeon rng for 30 seconds
  24. [10:18 PM] gifvex: offsetting all the sampled values based on how many steps i would have done by that frame
  25. [10:18 PM] gifvex: walked back/forth on entrance tiles to avoid any early rolls where add was <10
  26. [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
  27. [10:19 PM] gifvex: and was either dead on or within like 5 because of rdiv probably
  28. [10:23 PM] Dabomstew: huh conveniently redrawrow/col has a completely fixed running time (for each of row or col, anyway)
  29. [10:23 PM] Dabomstew: jr successcond = jr failcond + inc
  30. [10:23 PM] Dabomstew: in clocks
  31. [10:23 PM] gifvex: ooh
  32. [10:23 PM] Dabomstew: so that could be calculated
  33. [10:24 PM] Dabomstew: i'm sure that one must take longer than the other
  34. [10:24 PM] Dabomstew: presumably column longer than row
  35. [10:24 PM] Dabomstew: because of all those tiny dv shifts
  36. -
  37. [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?
  38. [8:02 PM] Dabomstew: no
  39. [8:03 PM] Dabomstew: because of rdiv alignment
  40. [8:03 PM] Dabomstew: and carryflag (for sub anyway)
  41. [8:03 PM] gifvex: yeah i was wondering that for sub
  42. [8:05 PM] gifvex: during each of the 10 steps, random can be called at 1 of 2 alignments?
  43. [8:05 PM] Dabomstew: well it's only for the first non lag frame
  44. [8:05 PM] Dabomstew: in each step
  45. [8:06 PM] gifvex: right
  46. [8:06 PM] gifvex: which means 10 random calls that can either be early or late aligned
  47. [8:06 PM] gifvex: based on whether that step was vertical or horizontal?
  48. [8:07 PM] Dabomstew: well horizontal column copy is say 7.9 rdivs and vertical is 8.3 (they are somewhat close to these)
  49. [8:09 PM] Dabomstew: so then you'd have
  50.  
  51. rdiv alignment (no copy) | column copy HRA+ | row copy HRA+
  52. 0.05 | 7 (7.95) | 8 (8.35)
  53. 0.40 | 8 (8.30) | 8 (8.70)
  54. 0.80 | 8 (8.75) | 9 (9.10)
  55.  
  56. [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?
  57. [8:09 PM] Dabomstew: this is one place where it IS actually truncated
  58. [8:09 PM] Dabomstew: there is no compensation
  59. [8:09 PM] gifvex: oh yeah
  60. [8:10 PM] Dabomstew: +7 columns are really rare
  61. [8:10 PM] Dabomstew: because the cycle count is actually more like 7.95
  62. [8:10 PM] Dabomstew: so "base" alignment would have to be 0.00~0.05ish (of 256 clock cycles)
  63. [8:12 PM] gifvex: at the start of 1 vblank for each step, it will be a fixed rdiv cycle?
  64. [8:13 PM] Dabomstew: well provided each step takes 17 frames and there are no npcs or extra disablelcd then yes
  65. [8:14 PM] gifvex: would it be then fair to say you could make a chart like so
  66. [8:14 PM] gifvex:
  67.  
  68. step horz vert
  69. 1 7 8
  70. 2 8 8
  71. 3 8 8
  72. 4 8 9
  73.  
  74. [8:14 PM] Dabomstew: yes given the right environment
  75. [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?
  76. [8:15 PM] Dabomstew: yeah
  77. [8:15 PM] Dabomstew: sub is a lot more complicated but probably still also mappable
  78. [8:17 PM] gifvex: sub is more complicated, but that's what we want
  79. [8:18 PM] gifvex: simple add to avoid encounters, and complex sub to target paras
  80. [8:18 PM] Dabomstew: oh fucking mount moon
  81. [8:18 PM] gifvex: well for example lol
  82. [8:18 PM] Dabomstew: if the frames per step is actually consistent in there I guess it's fine
  83. [8:18 PM] gifvex: i don't expect to be able to map lag easily if at all
  84. [8:18 PM] Dabomstew: modelling gets a lot more complex without that
  85. [8:18 PM] Dabomstew: but yeah I feel you
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement