Missing srand call at DraStic startup?

Ask questions about DraStic or discuss compatibility issues here.
Post Reply
vinipsmaker
Posts: 4
Joined: Thu Jul 31, 2014 3:16 pm

Missing srand call at DraStic startup?

Post by vinipsmaker » Thu Jul 31, 2014 3:26 pm

  1. Start Mario Kart DS
  2. Select Single Player
  3. Select VS
  4. Default options for everything but Course
  5. Select Rnadom for option Course
  6. Wario Stadium is "randomly" selected
  7. Close the emulator and repeat the process
Besides random, wario stadium is drawn every time.

Not sure if this is a bug on the emulator or on the game, but I'd love to see an reply from the devs.

For games like Castlevania, where luck is too important, this is a critical bug that my prevent players from unlocking all secrets.

Lordus
Posts: 517
Joined: Mon Aug 05, 2013 9:05 pm

Re: Missing srand call at DraStic startup?

Post by Lordus » Thu Jul 31, 2014 4:23 pm

It's a different course for me every time.
If you're loading from a savestate, you shouldn't.

vinipsmaker
Posts: 4
Joined: Thu Jul 31, 2014 3:16 pm

Re: Missing srand call at DraStic startup?

Post by vinipsmaker » Thu Jul 31, 2014 4:25 pm

Lordus wrote:It's a different course for me every time.
If you're loading from a savestate, you shouldn't.
I'm not loading from a savestate. I'm doing exactly what I described.

PS.:
I'm using the latest Pandora version (2.2.1.0p).

Exophase
Posts: 1715
Joined: Mon Aug 05, 2013 9:08 pm

Re: Missing srand call at DraStic startup?

Post by Exophase » Thu Jul 31, 2014 5:00 pm

There's no random number generator in DS, so nowhere to put an srand. Games may use the RTC as a random seed. RTC is pulled from system time, so it should work the same as the system time does. Can you check with this Watch.nds if the time is set right when you start it?

vinipsmaker
Posts: 4
Joined: Thu Jul 31, 2014 3:16 pm

Re: Missing srand call at DraStic startup?

Post by vinipsmaker » Thu Jul 31, 2014 5:10 pm

Exophase wrote:There's no random number generator in DS, so nowhere to put an srand. Games may use the RTC as a random seed. RTC is pulled from system time, so it should work the same as the system time does.
Thanks for the info.

No I'm not too scared by "wasting luck" on other games, but I still wonder why Mario Kart DS cannot get it right.
Exophase wrote:Can you check with this Watch.nds if the time is set right when you start it?
It's displaying the correct time (the red arrow is the hour-pointer, right?).

Exophase
Posts: 1715
Joined: Mon Aug 05, 2013 9:08 pm

Re: Missing srand call at DraStic startup?

Post by Exophase » Thu Jul 31, 2014 5:25 pm

It's possible that your sequence of inputs are being repeated really deterministically, although it'd be weird if the game had such coarse resolution for this. Could you try waiting very different amounts of time between button presses and see if you still get the same stage? Also, can you confirm that it happens between exiting and entering the emulator and not just resetting the game?

vinipsmaker
Posts: 4
Joined: Thu Jul 31, 2014 3:16 pm

Re: Missing srand call at DraStic startup?

Post by vinipsmaker » Thu Jul 31, 2014 5:35 pm

Exophase wrote:It's possible that your sequence of inputs are being repeated really deterministically, although it'd be weird if the game had such coarse resolution for this. Could you try waiting very different amounts of time between button presses and see if you still get the same stage? Also, can you confirm that it happens between exiting and entering the emulator and not just resetting the game?
I tried different intervals between the presses and different sequences to choose the same previous options, but I still do get the same course, "Wario Stadium".

I found out that if I select "reset game" instead closing the emulator, a different course is chosen (but still predictable), the figure-8 circuit. Selecting to load new game and choosing the same game has the same effect from reset.

I wonder where this "entropy" comes from.

Post Reply