Compare commits

..

2 Commits

Author SHA1 Message Date
00b71cd0ae readme... 2024-08-29 22:19:35 -04:00
a7cb9a7383 the final solution to the randomness problem 2024-08-29 22:16:35 -04:00
6 changed files with 9 additions and 5 deletions

View File

@ -12,7 +12,7 @@ My entry for the 2024 WeightGaming Gain Jam. Action game where you collect stuff
- SDL_ttf
- GLEW
You'll also need the game [resources]((/files/games/frillrun/frillrun-resources-1.0.7z) in the same directory as the executable.
You'll also need the game resources in the same directory as the executable; get that on my site.
### Linux

View File

@ -24,6 +24,8 @@ void jsw_seed ( unsigned long s )
* ( x[i - 1] ^ ( x[i - 1] >> 30 ) ) + i );
x[i] &= 0xffffffffUL;
}
next = 0;
}
/* Mersenne Twister */
@ -70,4 +72,4 @@ unsigned jsw_time_seed()
seed = seed * ( UCHAR_MAX + 2U ) + p[i];
return seed;
}
}

View File

@ -9,7 +9,7 @@ random_seed_set(u64 seed)
void
random_seed_time_set(void)
{
jsw_time_seed();
random_seed_set(jsw_time_seed());
}
f32

View File

@ -92,7 +92,7 @@ game_init(Game* self)
memset(self, '\0', sizeof(Game));
random_seed_time_set();
random_seed_set(0);
resource_shader_read(&self->resources);

View File

@ -227,6 +227,8 @@ level_init(Level* self, ECS* ecs, LevelSettings settings, u32 levelValue)
level_pause_init(self);
level_unpause(self);
random_seed_set(0);
self->settings = settings;
self->medal = LEVEL_MEDAL_NONE;
self->nextMedal = LEVEL_MEDAL_BRONZE;

View File

@ -396,7 +396,7 @@ static const LevelData LEVEL_DATA_DEFAULT[LEVEL_COUNT] =
.time = -1
},
{
.status = LEVEL_STATUS_UNLOCKED,
.status = LEVEL_STATUS_LOCKED,
.score = -1,
.time = -1
},