Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with RNG and saves? #739

Open
Machinocheese opened this issue May 4, 2018 · 1 comment
Open

Issue with RNG and saves? #739

Machinocheese opened this issue May 4, 2018 · 1 comment

Comments

@Machinocheese
Copy link
Contributor

Bug Summary

Note that this doesn't happen every time, but it happens to me > 90%, at the very least. What's happening is that whenever I save a file and walk the exact same way, the exact same Pokemon spawns every single time at the same location. Not sure if this is intended behavior.

Steps to Reproduce

Note: As I've been attempting to reproduce this bug, I've noticed it's also time-dependent. If I take a break between a few of the input commands, the RNG is back to actual randomness.

Start a new game. Get a Pokemon from Prof. OAK (Note I've only confirmed this with Charmander and Squirtle, though this shouldn't matter). Beat Gary, then walk out into Pallet Town, and save the game. Reload the save - you should be spawned into the upper leftmost pillar as shown below:
image
Then go right one block, then down one block. Then walk all the way right until you meet this block:
image
Then keep walking up until this block:
image
Take two steps to the right, and you should almost always encounter a Level 2 Pidgey.

@JoshuaKGoldberg
Copy link
Member

...cool.

Did some digging: FSP doesn't override any of the GameStartr settings for createNumberMaker, which by default just passes gameStarter.settings.components.numbers, which is therefore undefined by default. https://github.com/FullScreenShenanigans/GameStartr/blob/8eb1544fd62b035addceeb5675be24fbb2c93d45/src/creators/createNumberMaker.ts#L6

That defaults to new Date().getTime().
https://github.com/FullScreenShenanigans/NumberMakr/blob/3fe7216d29de165fade973d1474b2aa1d18ce133/src/NumberMakr.ts#L139

...so it is in fact randomly seeded with a genuinely different seed each time.

Perhaps the universe is toying with us?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants