moraguma / GamutoWare

Many developers, many microgames!
https://moraguma.itch.io/gamutoware
GNU General Public License v3.0
19 stars 98 forks source link

Improve RNG for infinite mode #180

Open Gvinfinity opened 3 months ago

Gvinfinity commented 3 months ago

Currently the RNG makes it possible for the same game to appear multiple times in a row, shuffling a vector with all the games should improve this.

moraguma commented 3 months ago

@Gvinfinity Quick correction, so long as there is more than one minigame selected, the selection algorithm will never play the same minigame twice. It can, however, play minigame A, minigame B and then go back to minigame A, but that's just kind of the nature of randomness.

I think there's room to create a selection algorithm that feels more random. Maybe a minigame weight system that determines the chance of each minigame being selected, with each weight increasing the longer a minigame is not selected?

IsaelGabriel commented 3 months ago

I think the RNG algorithm choice depends on the objective the game tries to accomplish. Should it be allowed to present a minigame more than 3 times in an interval of 7 minigames? Or should it only show a minigame after all the others have appeared? You could make a cooldown for games even.

Does the decision of the algorithm depends on a collective decision or an individual decision by its dev?