Memory Cost of using weapons in-game..

Soul_RiderSoul_Rider Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
I was working on GorgeCraft, and had task manager open on a 2nd screen to check for memory leaks, spikes in usage etc. I was running a listen server, so I am aware that the load includes both server and client.

I found out that in my mod, when I healsprayed, memory usage jumped by 8mb, then lowered again, and when I fired spit, memory usage increased by 12mb then reset. This intrigued me, especially as my healspray code doesn't contain any of the checks for enemies or players, and doesn't actually heal. So I loaded up an ns2server with cheats, got a Gorge and did the same test. This time both Spit and Healspray gave approx 18mb increases in memory usage. I am currently using high setting etc, but surely this needs to be looked at?

If a single healspray fired by me adds a load of 18mb to memory usage, how much does that impact a server in an online game? I have yet to check the memory usage of other weapons, but it seems to me the crashes on firing weapons may be just out of memory crashes caused by the extra memory load required when firing.

Is there a way to reduce the overhead of firing weapons? I mean 18mb for Healspray (combined server and client) is a big hit. It doesn't affect GorgeCraft, I can ultimately remove the spray, as it only resets the build menu's in the mod, it has no other impact, but for NS2, are there methods we can look at to reduce the over heads. It would seem the main usage is the texture/image, rather than the game logic, although, ns2 game logic added 50% to the memory usage of my mod.
Sign In or Register to comment.