Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(2 edits)

All of the above! I admit I didn't do much research on the matter; I'm basically just using a routine I found on devrs.com. It looks a lot like yours and is probably an LFSR. I'm using uninitialized memory as a seed for PRNG, mixing it with DIV and also calling it every time there's player input: https://github.com/tobiasvl/pocket-patrick/blob/master/src/patrick.asm#L1252 (the stuff afterwards is just mapping the random byte from $00-$FF to 0-28). Don't judge my newbie code too much, haha.

I wanted to make the game playable in the browser, but I actually couldn't find a JS emulator that emulated random uninitialized memory! I didn't have time to look very closely, but it looked to me as all of them just initialized with $00. It looks like you're using GameboyOnline? Does it actually have random memory? If so I screwed up, hehe.

> Does it actually have random memory?

Probably not. As you may have noticed, I couldn't even get sound working. I just figured that anything at all was better than nothing.

Also I'm not actually using RNG for very much, just bat movement, which looks "random enough" even if the seed ends up consistent. I'm also advancing the RNG each frame so it's also somewhat dependent on player input.