Views: 6,914,326 | Homepage | Main | Rules/FAQ | Memberlist | Active users | Last posts | Calendar | Stats | Online users | Search | 04-25-24 12:12 PM |
Guest: |
0 users reading Question about gba/ds rng | 1 bot |
Main - General chatter - Question about gba/ds rng | Hide post layouts | New reply |
Whowatchlist |
| ||
Newcomer Normal user Level: 2 Posts: 1/1 EXP: 44 Next: 2 Since: 11-10-18 Last post: 1993 days ago Last view: 1989 days ago |
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? |
Arisotura |
| ||
Big fire melon magical melon girl Level: 56 Posts: 234/887 EXP: 1343226 Next: 54950 Since: 03-28-17 From: France Last post: 19 hours ago Last view: 5 sec. ago |
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 |
| ||
Member Normal user Level: 13 Posts: 7/34 EXP: 9855 Next: 412 Since: 07-20-17 Last post: 1578 days ago Last view: 578 days ago |
Posted by Whowatchlist Bingo |
lonelyVoxel |
| ||
Member Normal user Level: 7 Posts: 9/10 EXP: 1400 Next: 48 Since: 12-12-18 Last post: 1934 days ago Last view: 1801 days ago |
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. |
Arisotura |
| ||
Big fire melon magical melon girl Level: 56 Posts: 269/887 EXP: 1343226 Next: 54950 Since: 03-28-17 From: France Last post: 19 hours ago Last view: 5 sec. ago |
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 |
| ||
Member Normal user Level: 7 Posts: 10/10 EXP: 1400 Next: 48 Since: 12-12-18 Last post: 1934 days ago Last view: 1801 days ago |
I imagine it's something worth looking into down the line, but I could only speculate with what little I know. |
Ammako |
| ||
Member Normal user Level: 13 Posts: 8/34 EXP: 9855 Next: 412 Since: 07-20-17 Last post: 1578 days ago Last view: 578 days ago |
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 |
| ||
Member Normal user Level: 23 Posts: 15/116 EXP: 60140 Next: 7583 Since: 12-21-17 Last post: 827 days ago Last view: 740 days ago |
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. |
Arisotura |
| ||
Big fire melon magical melon girl Level: 56 Posts: 274/887 EXP: 1343226 Next: 54950 Since: 03-28-17 From: France Last post: 19 hours ago Last view: 5 sec. ago |
this might also occur in melonDS. the game may use the RTC to seed its RNG. melonDS's RTC emulation just returns the current time regardless of whether you loaded a savestate. ____________________ Kuribo64 |
Main - General chatter - Question about gba/ds rng | Hide post layouts | New reply |
Page rendered in 0.031 seconds. (2048KB of memory used) MySQL - queries: 29, rows: 94/94, time: 0.018 seconds. Acmlmboard 2.064 (2018-07-20) © 2005-2008 Acmlm, Xkeeper, blackhole89 et al. |