3 ms·
The version I played on the ][+ was clearly not the one shown here, it didn't use a rng. The weather/event sequence was the same every time.
by gweinberg 3y ago
The version I played on the ][+ was clearly not the one shown here, it didn't use a rng. The weather/event sequence was the same every time.
- rgmerk 3y agoIt may have been that they used a PRNG and gave it the same initial seed each time. There were all sorts of odd bits of programming in a lot of these early BASIC games; they were often done by self-taught programmers.
- gweinberg 3y agoNow that I think of it, the computer didn't have a clock, didn't really have any source of entropy. So yeah, that's probably right.
- pvg 3y agoThere were memory mapped devices from which you could almost certainly squeeze some out so 'any' is maybe slightly overstated.
- rep_lodsb 3y agoDepends on the system. With only one clock source, and no analog input, everything except for user input and disk access time would be completely deterministic. Not an Apple II expert, but the original IBM PC used a single 14.318MHz crystal to derive every other clock.
- ElevenLathe 3y agoThere were analog inputs though -- the joystick ports, which were equipped for pong-style potentiometer paddles.
- deleted 3y ago[deleted]
- cortesoft 3y agoYeah, my first game I ever wrote was a dog racing game in BASIC when I was 9. I didn’t understand PRNG at all or anything about seeds, but I did notice that the same dog won the same race in order. My solution? At game launch, the game would print “hit space to start the game and then run a right loop over a ‘rand’ call until the user hit space. The entropy was in how long it took you to hit the spacebar!
- dmurray 3y agoI remember this being the recommended way to get random numbers in some programming magazine or textbook, in a BASIC without built-in RAND(). Amazing work to discover this yourself at age 9! And if you squint, using mouse movements as a source of entropy is still used by some modern programs. Some SSH key generators use it, and I'm sure I've had a Linux installer ask me for it too in recent years. I'm not sure whether this is theatre or whether the OS really can't be relied on to provide suitable entropy itself.
- TazeTSchnitzel 3y agoI think old console games (e.g. for the NES) were like this. You can record the inputs for a speedrun dependant on RNG and replay them on a real console, and so long as the timing is maintained exactly, the RNG outputs will be the same. This has been demonstrated with a tool called TASbot.
- boomboomsubban 3y agoI don't think TASbot is a real tool, it's an avatar for any tool assisted speed run using a variety of tools unique to a specific system or game. See https://tas.bot/wiki/Main_Page https://tas.bot/wiki/Main_Page
- thristian 3y agoA little of column A, a little of column B. Generally a key generator does not itself watch for mouse-movements, it just gets random noise from the OS. But the OS gets its random noise from a random number generator, and the random number generator needs to be seeded with genuine randomness. Some CPUs provide a hardware RNG, but older CPUs do not, and some OSs do not trust a hardware RNG implemented in opaque, un-auditable microcode, so they get their randomness from things like the difference between the CPU clock and real-time clock[1] or the relative timing of interrupts... such as those caused by mouse-movement or keyboard key presses. [1]: https://www.finnie.org/software/twuewand/ https://www.finnie.org/software/twuewand/