Context
read through this part, it will make stuff way less confusing and teaches about balance.
Imagine your making a big game, and to maximize revenue you need to maximize retention, which can be a huge problem.
Your game can’t be too easy where the player finishes the game in minutes and doesn’t get the chance to spend Robux, nor too hard where the player notices zero progress and doesn’t even see value in putting in progress.
The perfect state of balance is pretty difficult to achieve, many people choose to solve this by writing long and confusing equations that are prone to so many issues to generate (prices, rewards, etc). Others try to write data manually which once more is usually based on your gut feeling which is time-wasting and can result in bad values.
Thats where Dynamics Studio comes in, Dynamics Studio solves all these issues by allowing you to write equations and visualize it as a graph to then be exported as a ModuleScript, so you can easily analyze the game difficulty in an easy to see graph without requiring tons of testing.
Not only does Dynamics Studio have a graph it has way more features like Adaptive mode with weights which allow you to slightly adjust the values mid-game.
Tutorial
Starting off & Graphing
-
Download the plugin
-
Open Dynamics Studio in the plugin tab
-
Write a test equation and a range.
(range is how many values of X should be calculated)
-
Click prop and see your equation graphed
-
Now try on your own, play with the values and click prop to see the results!
Functions & Variables
- When graphing you can use any of the base math functions like
sqrt(x)
- The grapher includes custom functions like:
-
round(number, decimalpoints)
- Round thenumber
withdecimalpoints
-
clip(number, diff)
- Like round but roundsnumber
bydiff
-
or(number, val)
- Ifnumber
is 0 then returnval
(otherwisenumber
) -
nor(number, val)
- Ifnumber
is not 0 then returnval
(otherwisenumber
) -
tor(number, val, case)
- Ifnumber
is 0 then returnval
otherwisecase
-
truncate(number, decimalpoints)
- Truncatenumber
bydecimalpoints
-
approach(number, target, increase)
- Approachnumber
withtarget
andincrease
- Some variables are also accessible like:
x
-
TIME
(the current time) -
PREV
(the previousy
or 0) -
WEIGHT
(the applied weight, if adaptive mode is on)
Exporting
-
To export click the export button in the plugin menu
-
A prompt will show up, simply write the ModuleScript name and click export.
-
Click Close and check workspace to see your ModuleScript has been generated!
Loading
-
(after exporting, and clicking Reset) Lets say you need to open an already compiled graph
-
Click the Load button
-
Select your ModuleScript and click the white Load button.
-
Your original graph has returned!
Adaptive Mode / Weights
-
Click the Adaptive button
-
Change the power of the weight, in my case the maximum the value can be modified is by 10
-
Click Apply
-
You will see 5 lines
Min (-1 weight), MidMin (-.5), Default (0), Max (1), MidMax (.5)
One example usage for this is when you are making a luck system in a simulator, x
is the players level, y
is the luck, and the weight power is how much the boost can modify the the luck.
Using the ModuleScript
- Create a new script and require the generated ModuleScript.
local module = --...
- Use
module.Get(x, weight)
module.Get(2) -- Returns 2, because with the equation 'y=x' 2 will be 'y' with 'x' being 2
- You can also use weights like so
module.Get(2, .5) -- Returns 7, because the weight power is 10 and '10*.5 = 5' so 5 gets added to the result
Anyways, thanks for reading. I hope this plugin does help you.