by danshapiro on 7/1/15, 4:01 AM with 74 comments
by perlin on 7/1/15, 4:49 AM
Perlin Noise is still used to this day for generating clouds, natural-looking terrains, and other textures that are pleasing to the human brain.
Python implementation: https://github.com/caseman/noise/blob/master/perlin.py
Excellent talk by its creator: http://www.noisemachine.com/talk1/
by pdw on 7/1/15, 8:18 AM
First, check out Catacomb (1989). I think this is the oldest of Carmack's games for which source code has been released. This game uses a lagged fibonacci generator:
https://github.com/FlatRockSoft/Catacomb/blob/master/CATASM....
This makes sense, it's a generator that requires little memory and no expensive operations such as multiplications. You'll probably also find it in Softdisk's Apple II releases.
Carmack's first 3D game is Hovertank 3D, released in 1991. The LFG still exists, but now a "table-based RND generator" also appears. This seems to be the first appearance of the "Doom RNG".
https://github.com/FlatRockSoft/Hovertank3D/blob/master/IDAS...
The LFG is used when setting up the map, while the table-based is used for enemy AI during gameplay. Obviously every cycle counts when trying to do 3D on a 286.
The same year also saw the release of Keen Dreams, in which only the table-based RNG survives:
https://github.com/keendreams/keen/blob/master/id_us_a.asm
(The state variables of the LFG are still defined, but the code is missing.)
by paulannesley on 7/1/15, 4:23 AM
by pgy on 7/1/15, 7:40 AM
by GaiusCoffee on 7/1/15, 4:23 AM
by sytelus on 7/1/15, 8:39 AM
by tbrake on 7/1/15, 4:22 AM
If there's a purpose behind the table being constructed with those omissions/repetitions it's lost on me.
by megablast on 7/1/15, 7:25 AM
by frontfor on 7/1/15, 9:23 AM
https://github.com/ValveSoftware/halflife/blob/master/dlls/u...
Note that this is only used for certain parts of the game. For others it uses a closed source non-table based generator.
by TomGullen on 7/1/15, 8:52 AM
by userbinator on 7/1/15, 5:49 AM
by kdrakon on 7/1/15, 4:23 AM
by vortico on 7/1/15, 6:40 AM
by i_have_to_speak on 7/1/15, 5:15 AM
by xiaq on 7/1/15, 8:37 AM
by netheril96 on 7/1/15, 7:28 AM