Advanced seedable PRNG library with multiple algorithms, statistical distributions, and noise generators. Perfect for procedural generation, games, and simulations.
A complete toolkit for procedural generation, game development, and statistical simulations.
Choose from Xoshiro128**, PCG32, SFC32, Mulberry32, Xorshift128, and LCG based on your speed and quality needs.
Normal, Exponential, Poisson, Pareto, Beta, Gamma, Zipf, Chi-Squared, Student's t, Von Mises, and more for realistic data.
Simplex, Perlin, Value, Worley, Ridged & Billowed noise with fBm, turbulence, and domain warping for stunning procedural content.
Shuffle, pick, sample, and weighted selection for loot tables, card games, and random content.
Random points in circles, spheres, rectangles, and boxes for spawn systems and spatial distribution.
Save, restore, clone, and fork generators for game saves, replays, and parallel generation streams.
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 |
From indie games to scientific simulations, SeedForge powers reproducible randomness.
Procedural worlds, loot tables, enemy spawns, and replay systems that work exactly the same every time.
Create infinite, reproducible worlds with noise generators, biomes, rivers, and political boundaries.
Monte Carlo methods, statistical sampling, and reproducible experiments with proper distributions.
Create unique, reproducible artworks with consistent color palettes, patterns, and compositions.
See SeedForge in action. Change the seed and watch the values update deterministically.
Real-world examples to get you started in minutes.
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));
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;
}
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;
}
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
Zero dependencies. Works everywhere JavaScript runs.
Join developers using SeedForge for games, simulations, and procedural content. MIT licensed, forever free.