4/14/2023 0 Comments Spelunky 2 seedsActually, I couldn’t find out much of the history of using seeding for completely repeatable procedural generation as a player-oriented feature, but it doesn’t seem to have been very mainstream before games like Minecraft and Spelunky an earlier example, pointed out to me by Roguelikes discord user esc, is Civ 3. Why player-facing seeding was (and is) hard for DCSSĬrawl wasn’t remotely designed with seeding as a player-facing feature in mind though many roguelikes have used specifiable seeds for testing, the mainstream use as a player feature seems to be quite recent. However, using a good RNG algorithm is only one piece of the picture, and turns out to be probably the least complicated part of this project. In general, if RNG behavior diverges at all, it tends to diverge thoroughly and quickly.ĭCSS has long used the PCG RNG which (like the Mersenne Twister, xorshift, and many others) supports this reproducibility retired dev bh added this in 2015, replacing a hand-rolled implementation of an algorithm from the 80s that was more predictable. Because of unpredicatability, their behavior will diverge extremely rapidly (more on this later). This latter case is when two processes are using the same sequence, but make decisions starting from different points in the sequence. There are, then, two main ways to make this go wrong: mess up the initial conditions, or cause the rng to get out of sync. You can think of the RNG as, given a seed, providing a “code book” of integers that acts random, but as long as you have the code book and the correct rules/constraints (giving you position in the list), you can decode the behavior of the game. This means that if the rules and constraints that draw on the RNG are implemented correctly (we’ll come back to this), the behavior given that seed acts random but is completely replicable. For some kinds of RNGs, if you initialize the generator in the same way, multiple instances will generate the same sequence of numbers in the same order, while still behaving unpredictably and well-distributed as long as the seed is unknown. exact time, external devices) to do this initialization: then, if the adversary doesn’t know the initial state, and the algorithm is unpredictable in the right way, they’re out of luck. For cases where there is an adversary, you want this initial seed to itself be unpredictable, and so common strategies are to use some external state of the program (e.g. They basically all work by initializing the rng state with a “seed”, and repeatedly transforming that state, and the heart of the one we use, PCG, is just 5 lines of code. Unpredictability can be defined in precise mathematical terms that I won’t go into here, but it doesn’t actually mean complicated: some of the best rng algorithms are remarkably simple. What this means is that they aim to (in addition to matching some overall distribution) be unpredictable, which a viewer or adversary will perceive as random. Now, “true randomness” is more of an ideal than anything that can be implemented, so RNGs are really only “pseudo-random”. At the heart of this is a random number generator, which usually takes the form of a function that the programmer can repeatedly call, generating a sequence of numbers. Some process repeatedly draws on a random number generator according to a fixed, predefined set of constraints and rules, making choices that (ideally) generate a coherent, explorable, locale. Procedural level generation happens via constrained randomness. But what does it take for this to actually work? This post goes into the background on what has been involved in doing this retrofitting for DCSS, where it is at, and what the remaining problems are. (Edit: The next challenge begins on Apr 7, per uv4.)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |