Views: 336,190 Homepage | Main | Rules/FAQ | Memberlist | Active users | Last posts | Calendar | Stats | Online users | Search 01-22-19 12:18 AM
Guest:

0 users reading Question about gba/ds rng | 1 bot

Main - General chatter - Question about gba/ds rng New reply


Whowatchlist
Posted on 11-10-18 01:22 AM Link | #750
I have used a lot of ds and gba emulators over the years, and one behavior has stood out to me. It is very specific, but an interesting bug. When using fast forward, the Pokemon RNG would be messed up. Things that are highly unprobable would happen all the time. I am not sure if I am trying to find a pattern where there isn't one, but I wanted to ask anyway: Am I the only one who noticed this?

StapleButter
Posted on 11-10-18 06:49 AM Link | #751
this is only a wild theory but maybe the RNG uses the system time, which advances slower than it might expect if you fast-forward

____________________
Kuribo64

Ammako
Posted on 12-29-18 05:10 PM Link | #835
Posted by Whowatchlist
trying to find a pattern where there isn't one


Bingo

lonelyVoxel
Posted on 01-05-19 08:41 PM Link | #842
I have heard that the RNG is based on the system clock, though I could just be misremembering. I heard this from a Werster HeartGold speedrun. However, each different game probably has a different RNG system.

StapleButter
Posted on 01-06-19 08:48 AM Link | #843
dunno what other sources of entropy would be used for seeding a random generator tho.

maybe RAM contents at startup? although the BIOS/firmware seem to clear a lot of it.

____________________
Kuribo64

lonelyVoxel
Posted on 01-07-19 06:41 PM Link | #848
I imagine it's something worth looking into down the line, but I could only speculate with what little I know.

Ammako
Posted on 01-07-19 06:44 PM Link | #849
afaik encounter RNG is seeded once at game start based on system clock; the actual frame count increments independently. Who knows how in-battle RNG works though.

GBA doesn't have a system clock; well, Pokémon R/S/E have an internal clock, and R/S seed according to that internal clock value, but Emerald uses a seed of 0 every time you press Continue on the main menu. FR/LG don't have an internal clock at all, they seed off one of the GBA's timers.

With Gen. III, if you're using fast forward, you're just cycling through the frames faster, no difference there (people use this for reaching very high frame counts on emulator for RNG manipulation.) For the DS games, as far as encounters go, the game doesn't care about system clock anymore once you're loaded your save file.

As far as battles go, even if Game Freak did go through the trouble of making the battle RNG care about how fast/slow the system clock is running compared to the game's cpu clock speed, there's no reason why that would specifically make lucky occurrences more common. If it caused the game to make incorrect calculations, it would either crash, or return valid data that has the same chances of being "lucky" or not as every other valid result would. That's my assumption, anyway.

Sorer
Posted on 01-09-19 11:12 AM (rev. 3 of 01-09-19 11:14 AM) Link | #852
Something I always noted about save states in pre-Gen IV games - in battles , if you use a save state the battle AI may change occasionally.
In Gen IV and later , this won't effect how the AI behave.
I only tried that using Desmume so I don't know if the same occurs on MelonDS as well.


Main - General chatter - Question about gba/ds rng New reply

Page rendered in 0.017 seconds. (2048KB of memory used)
MySQL - queries: 29, rows: 90/90, time: 0.011 seconds.
[powered by Acmlm] Acmlmboard 2.064 (2018-07-20)
© 2005-2008 Acmlm, Xkeeper, blackhole89 et al.