Random Number Generation Suite

Seeded randomness with Gaussian distributions, Perlin noise visualization, and interactive seed control.

🎲 This example showcases random generation capabilities of the play.ts library

Random Floats (0-100)

Random Integers (1-100)

Random Booleans

Random Choices

Gaussian Distribution (μ=50, σ=15)

Range: Infinity - -Infinity | Count: 0

2D Noise Visualization

50x50 grid showing Perlin noise values (darker = lower values)

Key Concepts Demonstrated

  • Seeded Random: Reproducible random sequences
  • Random Floats: Continuous values within a range
  • Random Integers: Discrete values within a range
  • Random Booleans: True/false values with equal probability
  • Random Choice: Selecting from a list of options
  • Gaussian Distribution: Normal distribution with mean and standard deviation
  • Perlin Noise: Coherent noise for natural-looking randomness

Usage Tips

  • • Use the same seed for reproducible results in testing
  • • Gaussian distribution creates more natural-looking variations
  • • Noise functions are perfect for procedural content generation
  • • Random choice is ideal for picking from predefined options