Is it the engine or my code?

Posted By: Generik

Is it the engine or my code? - 08/25/04 03:05

Heres just a general question i really wanted answered.... I have a simple code pretty much just picking up a weapon calling on its action with a pickup function creates a new model in the hands. When you pick the gun up the pc runs incredibly slow and sometimes it will run out of memory. Could just be my pc but just wondering what it could be.

SPECS:

Pentium 4 14.ghz
128 Ram (Im guessing it could be this)
ATI Radeon 9600 se
Windows Xp Pro
A6.30 Comm

Any ideas?
Posted By: Phantom88

Re: Is it the engine or my code? - 08/25/04 03:13

128MB is way too low for Windows XP, but i can't tell you if thats the problem... Good that I have 1GB ram ;D

~Phantom88~
Posted By: Grimber

Re: Is it the engine or my code? - 08/25/04 06:11

sounds like you got an infinate function call ( the slow down in performace and ultimatly out of memory problems) i.e. inside a while loop you call a function that itself has a while loop that doesn't end


function do_this()
{
while(1)
{
wait(1);
}
}

action entity_do_that
{
while(1)
{
do_this();
}
}


this is an infinate function call. Your createing an indless stream of do_this functions that will bog down the cpu and eventualy eat up your ram

Posted By: Generik

Re: Is it the engine or my code? - 08/25/04 11:25

i think its just my ram my code has no while.
Posted By: Grimber

Re: Is it the engine or my code? - 08/28/04 07:44

you may want to check the flow of the code though, your running an ent create create nmodel in the plaeyrs hands) make sure its not continualy generating new models.

even with some a few BIG poly count models won't eat up 128 meg of ram or cause an out of memory problem unelss you got apps also running eating up allot of that ram in the first place.
© 2024 lite-C Forums