โœจ v1.1.0 โ€” New Release

Reproducible
Randomness for
JavaScript

Advanced seedable PRNG library with multiple algorithms, statistical distributions, and noise generators. Perfect for procedural generation, games, and simulations.

6
PRNG Algorithms
17
Distributions
0
Dependencies
JS
example.js
1 2 3 4 5 6 7 8 9 10 11
const { PRNG } = require('seedforge-prng'); // Create a seeded generator const rng = new PRNG('world-42'); // Generate deterministic values rng.random(); // 0.7364291 rng.int(1, 100); // 42 rng.normal(100, 15); // 94.28 rng.pick(['a','b','c']); // 'b' // Same seed = same results!
Seed
"world-42"
Algorithm
xoshiro128**
Output
0.7364291

Everything You Need

A complete toolkit for procedural generation, game development, and statistical simulations.

๐ŸŽฒ

6 PRNG Algorithms

Choose from Xoshiro128**, PCG32, SFC32, Mulberry32, Xorshift128, and LCG based on your speed and quality needs.

๐Ÿ“Š

17 Statistical Distributions

Normal, Exponential, Poisson, Pareto, Beta, Gamma, Zipf, Chi-Squared, Student's t, Von Mises, and more for realistic data.

๐ŸŒŠ

6 Noise Generators

Simplex, Perlin, Value, Worley, Ridged & Billowed noise with fBm, turbulence, and domain warping for stunning procedural content.

๐Ÿ“ฆ

Array Utilities

Shuffle, pick, sample, and weighted selection for loot tables, card games, and random content.

๐Ÿ“

Geometric Utilities

Random points in circles, spheres, rectangles, and boxes for spawn systems and spatial distribution.

๐Ÿ’พ

State Management

Save, restore, clone, and fork generators for game saves, replays, and parallel generation streams.

Choose Your Engine

Six battle-tested algorithms to match your performance and quality requirements.

Algorithm Period Speed Quality Best For
sfc32Recommended ~2ยนยฒโธ โ˜…โ˜…โ˜…โ˜…โ˜… โ˜…โ˜…โ˜…โ˜…โ˜… Best all-around choice
xoshiro128**Default 2ยนยฒโธ-1 โ˜…โ˜…โ˜…โ˜…โ˜† โ˜…โ˜…โ˜…โ˜…โ˜… General purpose
pcg32 2โถโด โ˜…โ˜…โ˜…โ˜…โ˜† โ˜…โ˜…โ˜…โ˜…โ˜… Simulations, statistics
mulberry32 ~2ยณยฒ โ˜…โ˜…โ˜…โ˜…โ˜… โ˜…โ˜…โ˜…โ˜†โ˜† Maximum speed
xorshift128 2ยนยฒโธ-1 โ˜…โ˜…โ˜…โ˜†โ˜† โ˜…โ˜…โ˜…โ˜…โ˜† Xorshift compatibility
lcg 2ยณยฒ โ˜…โ˜…โ˜…โ˜…โ˜… โ˜…โ˜…โ˜†โ˜†โ˜† Legacy systems

Built for Real Projects

From indie games to scientific simulations, SeedForge powers reproducible randomness.

๐ŸŽฎ

Game Development

Procedural worlds, loot tables, enemy spawns, and replay systems that work exactly the same every time.

Procedural Gen Loot Systems Replays
๐Ÿ—บ๏ธ

Map & Terrain Generation

Create infinite, reproducible worlds with noise generators, biomes, rivers, and political boundaries.

Noise Heightmaps Biomes
๐Ÿงช

Scientific Simulations

Monte Carlo methods, statistical sampling, and reproducible experiments with proper distributions.

Monte Carlo Distributions Sampling
๐ŸŽจ

Generative Art

Create unique, reproducible artworks with consistent color palettes, patterns, and compositions.

Colors Patterns NFTs

Try It Live

See SeedForge in action. Change the seed and watch the values update deterministically.

๐ŸŽฒ Random Value Generator

random()
0.7364291
int(1, 100)
42
normal(100, 15)
94.28
bool(0.5)
true
pick(['๐Ÿ—ก๏ธ','๐Ÿ›ก๏ธ','๐Ÿงช'])
๐Ÿ—ก๏ธ
color()
#7a3f9c

Simplex Noise Visualization

Copy & Paste Ready

Real-world examples to get you started in minutes.

JS
loot-system.js
123456789101112131415
const rng = new PRNG('chest-42');

const lootTable = {
    common: 60,
    uncommon: 25,
    rare: 10,
    legendary: 5
};

// Weighted random selection
const rarity = rng.weightedPickObject(lootTable);

// Gold with Pareto distribution
const gold = Math.round(rng.pareto(1.5, 10));
๐Ÿ“ฆ

Loot Results

seed: "chest-42"
๐Ÿ“ฆ
Chest #1
18 gold
Common
๐Ÿ“ฆ
Chest #2
42 gold
Uncommon
๐Ÿ“ฆ
Chest #3
156 gold
Rare
๐Ÿ“ฆ
Chest #4
847 gold
Legendary
JS
terrain-gen.js
12345678910111213141516
const { Noise } = require('seedforge-prng');

const noise = new Noise.SimplexNoise('world-1');

function getHeight(x, y) {
    // Fractal Brownian Motion
    let h = noise.fbm(
        x * 0.02,   // scale
        y * 0.02,
        null,
        6,         // octaves
        2.0,       // lacunarity
        0.5        // persistence
    );
    return (h + 1) / 2;
}
๐Ÿ—บ๏ธ

Generated Terrain

seed: "world-1"
JS
name-generator.js
123456789101112131415
const rng = new PRNG('village-npcs');

const prefixes = ['Ael', 'Bran', 'Dor', 'Fen'];
const suffixes = ['dric', 'wen', 'mir', 'eth'];
const titles = ['the Brave', 'the Wise'];

function generateNPC() {
    let name = rng.pick(prefixes)
             + rng.pick(suffixes);
    
    if (rng.bool(0.2)) {
        name += ' ' + rng.pick(titles);
    }
    return name;
}
๐Ÿ‘ฅ

Generated NPCs

seed: "village-npcs"
โš”๏ธ
Guard
Aelwen
Level 3
๐Ÿ›ก๏ธ
Knight
Dormir the Brave
Level 12
๐Ÿช™
Merchant
Fendric
Level 5
๐Ÿ—ก๏ธ
Assassin
Galeth Shadowbane
Level 18
JS
dice-roller.js
123456789101112131415
const rng = new PRNG('combat-42');

function roll(count, sides) {
    const rolls = [];
    for (let i = 0; i < count; i++) {
        rolls.push(rng.int(1, sides));
    }
    return {
        rolls,
        total: rolls.reduce((a,b) => a+b, 0)
    };
}

roll(1, 20);  // Attack roll
roll(2, 6);   // Damage roll
๐ŸŽฒ

Combat Rolls

seed: "combat-42"
๐ŸŽฏ
Attack Roll (1d20)
17
Hit!
โš”๏ธ
Damage Roll (2d6)
[4, 6] = 10
๐Ÿ›ก๏ธ
Defense Roll (1d20)
8
Miss
๐Ÿ’ฅ
Critical Check (1d20)
20
NAT 20!

Get Started in Seconds

Zero dependencies. Works everywhere JavaScript runs.

npm

npm install seedforge-prng

CDN

unpkg.com/seedforge-prng

Download

seedforge.js (46KB)

Start Building with
Reproducible Randomness

Join developers using SeedForge for games, simulations, and procedural content. MIT licensed, forever free.