zorpastaman / random-generators Goto Github PK
View Code? Open in Web Editor NEWRandom generators for Unity is a collection of random generators, different distributions, modificators and filters.
License: MIT License
Random generators for Unity is a collection of random generators, different distributions, modificators and filters.
License: MIT License
Is your feature request related to a problem? Please describe.
I find probability and statistics confusing and unintuitive; This library is easy, it's just a thin wrapper over ideas that mostly aren't. I'm already getting a lot out of some of the simpler concepts (like weighted distributions), but I bet that someone with a deep understanding of the math would get a lot out of this library.
I assume you have this deep understanding, since you wrote the thing. In college I got a C in probability.
Describe the solution you'd like
Documentation for each distribution (or other interesting aspect of this library) that outlines some game-related scenarios in which it would be useful. Doesn't need to be exhaustive, a couple of sentences would suffice.
Describe alternatives you've considered
A probability textbook.
Additional context
I'm assuming that you're developing this library for use in your own projects? In that case, simply writing about the things you're using this library for would go a long way.
The main impetus for me opening this issue is that I'm trying to model a particular event in my game but don't know which distribution to use. (The details probably deserve a separate thread.)
I opened #1 with a clear idea of my needs, but not of how they relate to this package. So I'll describe what I'm trying to do, and I'd appreciate your insight in how your library can be used for it.
I'm making a falling-block puzzle game (think Tetris or Puyo Puyo or Columns) with multiplayer. Each block has a different shape, and each shape in turn is made of pieces from a fixed set of colors. These shapes and colors are represented in my game as ScriptableObject
s.
The set of possible shapes and colors expands at fixed intervals; this is currently done by replacing the active probability distribution with a new preset one (as opposed to modifying it in-place).
The shapes and colors are determined randomly, but in multiplayer mode both players must get the same sequence of pieces (including color and shape). It's still random, but both players get the same seed at the start of the game and both RNGs are running at the same rate.
It's okay if colors and shapes use different RNGs, or even different seeds; however, both players must get the same set of seeds at the start of the game.
I have a gut feeling that Random-Generators will better fit this use case than my current implementation, but I don't know what that would look like in practice. What would you suggest?
Hi there. I'm strongly considering using this library for probability distributions in my own game. However, I need to be able to set the initial seed for all distributions; I can't rely on UnityEngine.Random
except for that initial seed. Is it possible to explicitly provide a seed (or a System.Random
instance) for each generator to use?
Describe the bug
When NaughtyAttributes and Random-Generators are both installed in a project, the inspector for WeightedGeneratorProvider<T>
s and WeightedGeneratorDependentProvider<T>
s do not draw the weights and values of the provider's distribution.
To Reproduce
WeightedGeneratorProvider<T>
or WeightedGeneratorDependentProvider<T>
from the Assets menu. In my case, I used IntWeightedGeneratorDependentProvider
, available through Assets/Create/Random Generator Providers/Discrete Distributions/Weighted Distribution/Int Weighted Generator Dependent Provider.Expected behavior
This:
Actual behavior
This:
Unity Editor:
Additional context
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.