Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Rng Laravel Package

christhompsontldr/laravel-rng

Deterministic, stream-isolated RNG for Laravel built on PHP’s Random extension. Seed once to get reproducible sequences across named streams (e.g., seeding vs combat). Includes helpers for int ranges, chance, and pick, plus optional roll logging with audit command.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Enables deterministic random generation for game mechanics (e.g., RPG combat, loot tables) and simulations where reproducible outcomes are critical for debugging and testing
  • Supports roadmap priorities for building player-facing features requiring predictable randomness (e.g., "replayable match history" in multiplayer games) without custom implementation
  • Validates "buy vs build" decision: solves a niche but critical problem (stream-isolated deterministic RNG) with minimal maintenance overhead versus building in-house
  • Critical for test infrastructure: allows consistent test fixtures for random-dependent features (e.g., unit generation factories) by overriding seeds in test environments
  • Eliminates cross-contamination risks between random operations (e.g., combat rolls won't affect loot generation sequences when using isolated streams)

When to Consider This Package

  • Adopt when: Building games/simulations requiring reproducible randomness; needing isolated random streams (e.g., separate combat/loot streams); using PHP 8.4+/Laravel 12+; or requiring deterministic test fixtures. Ideal for non-cryptographic use cases where sequence predictability matters.
  • Look elsewhere when: Needing cryptographic security (e.g., tokens, passwords) – use PHP's Randomizer directly; on older PHP/Laravel versions; for simple non-deterministic random needs where streams aren't required; or if zero dependencies are mandatory (though package size is trivial at <100 LOC).

How to Pitch It (Stakeholders)

For executives: This package gives us a battle-tested solution for deterministic randomness in games and simulations – eliminating hard-to-reproduce bugs and accelerating development of player-facing features like replayable combat systems. It’s a 5-minute integration with zero runtime overhead, directly supporting our roadmap for reliable game mechanics while reducing engineering toil.
For engineering: It’s a lightweight, well-documented tool that solves stream-isolated deterministic RNG out-of-the-box with Laravel integration. We get artisan commands for auditing rolls, seamless test seed overrides, and guaranteed isolation between game systems (e.g., combat vs. loot) – all without reinventing the wheel on a problem we’d otherwise spend weeks debugging.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport