Does adding textures through the client instead of the server improve performance

I am making a tower defense game, and I want to optimize the “Enemies” so that the game las as little as possible when there’s hundreds of them.

I have already optimized their movement, though it is done from the server since the towers also exist in the server and I am not sure I should change that, especially considering the game is a multiplayer game.

So I was wondering if I could make the “Enemies” transparent, remove all their textures and add them from the client instead, and see a performance boost, or even better, just have them have 1 transparency then change it to 0 in the client.

These types of optimizations are the type that affect rendering. The server doesn’t render. That’s only done on the clients. So any optimization like changing textures or transparency and stuff like that will have no impact on the server.

1 Like

Well if theres hundered of them why not only load the textures for those that are mostly visible and change the rest to be simple shapes. When theres hunderds of them players eyes will blur them anyway. Ofc when one is removed you could then load the texture for the ones around it and are in better view.

How could I determine when one isn’t visible?

Well for example by the timing between spawns, the front and rear will be the original visibles. From there its just changing when removing other ones. Make the majority un textured

1 Like

The server still holds instance references to it so why waste memory.

That memory can be better used for other things and calculations.

1 Like

While I get the desire to optimize this I probably wouldn’t. In this case the why not would be because it takes dev time away for something that will likely just add complexity to your game without noticeable benefits since most of these changes affect only a small amount of server memory usage which most games have plenty extra.

There are certainly optimizations in the vain that will be super effective, but as originally proposed, it won’t really have practical affect. You’d be better off focusing on other things like speeding up rendering or reducing the amount of network traffic (which this optimization as proposed doesn’t do, though could be modified to help some with that)

1 Like

I should note it’s major advantage as proposed is making it so the client can pick what to draw. This can help with rendering but won’t help the server process at all. But depending on how extreme you want to go you could make it so every client only gets data about the ones they will draw to further reduce network traffic. But these types of things should be an as they come type of optimization. That dynamic rendering thing could be super nice for low end pcs though so might be worth integrating just for that.

1 Like