-
Notifications
You must be signed in to change notification settings - Fork 60
New extension: <Statistics> #1602
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Thank you for submitting an extension. I only gave it a quick look because the example is missing the resources and it's not really usable without them. The extension name "Statistics" sounds a bit generic. It seems that you used the Irwin–Hall distribution. Please, add these 2 links in a comment to help users understand the implementation:
Why did you choose a 5 parts approximation? Is it precise enough? I have a few suggestions to simplify the events:
|
Hello Davy!
!update Statistics.zip As I cannot upload an example ffile, I link the game in GDevelop: |
✅ Successfully updated the extension. |
❗ No updates found. Please check your file. |
!update Statistics Example.zip |
❗ No updates found. Please check your file. |
1 similar comment
❗ No updates found. Please check your file. |
Thanks for your review and feedback!
|
Description
Its main function is the "normal random number generator" (NormalRNG). This function generates a random number that follows a normal (bell-shaped) distribution. Such distribution has a central tendency value (mean) and a margin of deviation (standard deviation). NormalRNG is bounded so that extreme values (abnormally high or small numbers, called outliers) do not ocurr.
This extension also includes a library of common values to check for probability, be it the chance of being above a certain number (one-tailed, "potxx") or the chance of being inside a range (two-tailed, "pttxx") where xx is the chance of success.
How to use the extension
Normal random number generator is an expression that can be used to create a normalized random number, where not all numbers will be as likely. The numbers will follow a normal distribution in which numbers close to a value (called "mean") are more likely to happen. How close or far the numbers appear to the mean is called "standard deviation". For the expression, the input is one standard deviation (also called "1 sigma"). The numbers will appear up to three standard deviations away from the mean. For example, if mean:5 and standard deviation:1, the expression will give numbers between 2 (5-3x1) and 8 (5+3x1). The "equivalent" expression for a flat distribution would be RandomFloatInRange(2,8). In the normal distribution, 5 is likely while the extreme values (2 and 8) are less likely. In the flat distribution, all numbers are as likely to appear. Use this expression to create numbers around a certain value. Real life examples of normal distributions are people height, IQ and walking speed.
Probability check is an expression that tells you how likely a number is to be. Use the OneTail type to find the probability of being above (or below) a goal. A real life example would be a grade list: the top student will be above 100% of their classmates. If you got 8/10... above how many classmates are you? In games, this can be used to check for the rarity of an item, drop or equipment, etc. Uste the TwoTails type to find if something belongs or not to a group, or is inside a range. In real life this is used to determine differences: 100.1 is bigger than 100... but barely so. A game could use this to check if an attack was critical or not, among others.
Note: Normal distributions and Flat distributions have different statistics, so I do not recommend using one for the other (e.g. making a OneTail check of the throw of one dice).
Checklist
What tier of review do you aim for your extension?
Reviewed
Example file
Statistics Example.zip
Extension file
Statistics.zip