XaiJu
Megan Fox
Megan Fox

patreon


Dungeon Seeds and Dailies

Hola folks! Today's one of those "everyone gets code" sort of updates, since we just launched the game, and I figure everyone gets a bonus for helping us get here: https://pastebin.com/03HBJ8fr

If you somehow missed our launch, tada! https://www.youtube.com/watch?v=8DF4s3bqsJ8

Everyone gets a bonus especially because Spartan Fist, eh, didn't launch like we hoped. I'll be updating it from here, building the game up, expanding the audience, etc, and then we'll do a bigger console launch, but it's all just me now. Team had to split off to other (paying) gigs, since this project didn't made enough to cover external investments yet.

Which means I SUPER appreciate everyone's support. This Patreon now makes up a decent portion of my monthly burn rate. It's hugely helpful. Thank you so much!

Anyways, what you're looking at is, to be perfectly clear, basically just @unormal's code (dev behind Caves of Qud and more). I made it slightly prettier, but really that's it. This is what will form up the basis of Spartan Fist's next update, which will add daily and weekly challenges, with some variants. 30 seconds looking at that code, and you can guess how my weekly vs daily function will look, eh?

The hash is just a double-bonus. If you're doing a string-based seed system, then you need a way to hash that into an int to seed your rand with, so, tada! There's two. The commented out one is what we used before, the Knuth one was what we're going to - again, based on @unormal's recommendation. Our old hash worked fine, but the new one likely has better range.

If you're doing proc-gen, it's actually handy to have multiple hash functions, though! It means you can take the same input seed, and produce multiple strings of consistent-but-unrelated psuedo-random numbers. It can change the... call it, flavor, of your content, same as feeding the rand()'s through different generation algorithms.


More Creators