Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Sometimes it's worth putting any dialogue on a loop (with maybe an odd randomly selected comment thrown in every so often) because the chances are, due to how randomness works, that the player won't see the full range of responses you've spent ages writing if it's just down to chance.

Regarding random background responses, there are basically three approaches:

1. Purely random.

2. Cycle through them.

3. A combination of 1 & 2.

I like to use method 3. It works like this. You have a list of responses stored in something like a string array. You shuffle the indexes of the array then cycle through the shuffled responses. When you get to the end of the cycle, you shuffle the indexes again and repeat the process. This works really well. It guarantees that you get to see every response at least once before you start repeating them, but they appear to be random once you start repeating them. I'm not sure if you can do this sort of thing in Adventuron (and I certainly won't be doing it for the CaveJam), but I'm sure it's possible.

Exclusive random! You could definitely do this in adventuron, but it'd be a massive bulk of code and a stack of booleans.