Help in making my game more efficient

I am making a digging game to sum it up where you dig in an allocated area, every time you dig a block it sends an event to the server to render the next surrounding blocks, However, I am having some trouble with overloading it when the player digs faster. Any way I could make this more efficient?



These are the stats when I dig

Thank you

1 Like

Could you show your code? We can’t help without seeing your code.

So I’ve found out that the events firing isn’t really the problem. When I start the game and dig its fine all the stats are good but over time the stats get worse so I checked to see when it was happening and realized as soon as I dig the stats build up to worse and worse but as soon as I stop all the levels go back down to basically 0. Do you have any idea what I could do, I can’t really share too much code at this moment sorry

That is bufferbloat or parts moving.

1 Like

It’s very hard to know your exact issue without more information and code snippets, but i’d like to suggest an alterative approach. Instead of rendering the blocks on the server, render from the client. You can achieve this by sending the necessary data from the server to the client, or to all clients if you want the rendering to be visible to everyone. By doing the rendering from the client, you can reduce the server load, resulting in a smoother overall experience.

Edit: Make sure to do your sanity checks (if you have any) on the server!

I did end up fixing the problem, the problem was double rendering animations

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.