Hi, I have a project I am working on that is very resource intensive, and I need help working on ways to optimize the game while keeping quality as high as possible.
A lot of the stuff in this game is poorly made, hints the extreme lag, and I need help with making them in a way that requires the least resources from users.
Things this project showcases:
Animated trees
Dynamic/Really realistic rain
A seed-based randomly generated layout of a 1024x1024 forest
Unfinished things in the game is sound effects, the rain audio is a placeholder because I plan on adding complex sounds to the dynamic rain to make it as realistic as possible.
Base seed is “1234567890” (not randomized yet for testing implementation of other assets)
If you need to see code from anything I listed above, let me know, and I will PM you the information requested if you are willing to help.
Note: Everything is client sided, the seed based aspect makes it completely mutualistic though.
Decrease the triangle count of the models, and you should also use StreamingEnabled, heres a tutorial from Suphi Kaner
TLDR.: It only renders whatever is infront of you, in a specific radius, thus saving a lot of resources. since you are in a forest, and you cannot see over the trees, it wouldn’t even make the game look bad as the trees cover up the background
Yeah, I understand how StreamingEnabled works and have configured it according to how he explained it. Thanks though as this is a really good tutorial!
I had an idea of instead of having a bunch of parts falling from the sky as rain, I could do something more complex like raycasting or just using attachments, would this help with lag reduction?
You should just make the rain client sided (if it’s not already), and limit how many spawn, and only spawn them inside of the cameras vision (just like streamingenabled)
Yeah, I could just change my current configuration, it’s 75 drops per second (creates 75 parts per second), 150x150 studs (to hide the fact the rain is literally just over you) and 32 studs above the camera
Also yeah you can just make one part, add 2 attachments to the front and the back, and a trail, and then you move it lets say with renderstepped, and clean them up after a specific amount of time (like 1s)
That’s basically what it does, except it just relies on gravity (so it can be effected by wind) instead of something like a complex CFrame animation equasion
Ever so slightly, I just cut the rain configuration in half, also got a screenshot example of what I meant by the rain being able to be effected by wind: