Simple sound physics script

i will try adding that now

@anon53193547 @clustergrowling @PysephDEV as for reverb, im not sure if ill be able to implement functioning reverb with my coding experience, but i will work on it
in the meantime, the github is available for contribution if any of you want to tackle it as well

2 Likes

Man I was about to attempt making something like this until this popped up cause of the message from 2 days ago. Really frickin cool.

Hi there,

There is a huge issue with your script, which is the impact of performance.

I am no experienced scripter to tell you the exact performance-draining elements and functions in the script, but it used up a lot of memory storage and people only received around 16-20 FPS.

For my client, the client memory usage went up to 1.5k

image

The script itself is useful and I wouldā€™ve used it, if not the performance drain.

oh yikesā€¦ thank you for showing me that
im not a very experience scripter either, so i might have overlooked some things in the code that might have caused that

im rewriting some of the script right now; ill see if i can find the problem and fix it

Hi,

I just talked to Shawn, also known as Aotrou.

Both of us investigated my place and found out that future lighting ate most of the performance, so Iā€™m gonna check your script out again and correct myself, if what I said was false.

Here are 2 additional resources regarding the memory leak I experienced:

alrighty

if there are still memory problems afterwards, its likely because it uses value instances to allow for tweening
im going to change the script to lerp attributes instead, because this will use less memory

1 Like

a big update to the script is out, along with the testing place!

the script should now be faster and use less memory, but if there are any problems, let me know and i will work on them

changelog
  • reorganized script settings for readability
  • reorganized code and logic gates to avoid unnecessary declarations/running of code
  • fixed some logic errors in the code
  • renamed ignore_player_obstruction to ignore_players
  • renamed size_threshold to minimum_size
  • renamed transparency_threshold to maximum_transparency
  • renamed default_eq_values to default values
  • added ignore_player_sounds
  • added ā€œWaterā€ to the material list (because of a raycast limitation, underwater sounds can only be dampened if the camera is outside of the terrain; you will need to use Region3 or some other method if you want to dampen underwater sounds while the camera is also underwater)
  • added lerp_alpha
  • added disconnections to player connections
  • removed obstruction_value_tween_time
  • removed material_obstruction_value_tween_time
  • removed value folder and number values in favor of attributes
  • removed debounce values, tweens, and tweenservice in favor of lerping
2 Likes