GithubHelp home page GithubHelp logo

chanibal / randomgenerator Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 13 KB

A helper class designed to help with pseudo randomness in dynamic media such as games or visualisations.

License: BSD 2-Clause "Simplified" License

C# 100.00%
randomgenerator game range interval hacktoberfest

randomgenerator's Introduction

RandomGenerator

A helper class designed to help with pseudo randomness in dynamic media such as games or visualisations. The generator is designed to be deterministic (have the same results) across platforms if needed. You can use it to make words the same from just one seed value or to send far fewer data through network.

The generator is written in C# and is made to work with the Unity Game Engine (Unity3d) but can also be used standalone without dependencies. I also had once a JavaScript 1.5 fork, but it is currently unmaintained and not released.

Use: instantiate as many RandomGenerators as you want, a good idea is to keep one for each entity that requires randomness (world generator, AI, enemy generator etc).

Pseudo random generation is based on the 32 bit Tiny Mersenne Twister (c) by Mutsuo Saito and Makoto Matsumoto.

The home page for the random generator is https://github.com/chanibal/RandomGenerator

Features

  • Easy to use random generator to be used without almost any higher maths knowledge. More advanced features are named by usage and not the name of long dead famous mathematicians.

  • Generates uniform 1D, 2D, 3D and 4D values in useful combinations: float and int ranges; vectors in unit squares, cubes, circles and spheres and on their surfaces/edges; quaternions.

  • Generates time based probabilistic events in a simple manner - just ask it every frame if the event with given probability per interval has happened this time.

  • Generates helpers to create distribution intervals and ranges.

  • Provides extensions to shuffle and retrieve random elements from generic collections.

  • Is fairly fast and tested.

Installation

Clone, download or add as a submodule this so it rests in the Assets/ChanibaL/RandomGenerator directory.

License

License: BSD 2-clause "Simplified" License.

randomgenerator's People

Contributors

chanibal avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

randomgenerator's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.