Frame rate issue

All topics about ZGameEditor goes here.

Moderator: Moderators

Post Reply
jinxtengu
Posts: 122
Joined: Wed Oct 14, 2009 2:05 pm
Contact:

Frame rate issue

Post by jinxtengu »

Hi there, I've been making a game in Z-game editor (this is actually a different one to the last game I mentioned on these forums) but I’ve run into a little problem and I’m not sure of the cause.
So first a bit of background, The game is a first person perspective game and if the player dies (from a hazard or whatnot) then the game removes all models and runs a game over appstate (game over screen) From the game over screen you can restart the level. Anyway this all works fine and there are already several levels, however with the latest level Iv'e noticed a problem (as of today) which goes like this. Loading the level is no problem, everything works fine, dieing and loading the game over screen is also not a problem, but on returning to the level the second time (and sometimes strangely on the 3rd death), the frame rate drops considerably. I have no idea why this is occuring, (since all the other levels work fine, with multiple deaths), this level is particularly large but still I have no idea. I was thinking what might be the cause is that some models are defining variables which have already been defined (and thus clogging up the memory) but other than that I have no idea.
There are a few invisible models (that don't render anything) which spawn fire like particles.
Here's a screenshot of the game, and the level btw.Image
Any thoughts?
User avatar
VilleK
Site Admin
Posts: 2274
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Re: Frame rate issue

Post by VilleK »

Nice image, please post version here later when you want to show it :)

The only reason I can think of is models that are not destroyed correctly (even though you write that you remove all). I would run it in designer and watch the "Models: " count in the log window. Does it appear somewhat stable between reruns of that level, or does it become larger suddenly?
jinxtengu
Posts: 122
Joined: Wed Oct 14, 2009 2:05 pm
Contact:

Re: Frame rate issue

Post by jinxtengu »

I’ll certainly post it on here when it’s complete :)
The framerate is stable and then suddenly (when the levels loaded again)
it becomes slower, then upon leaving the level (entering other game states) the speed goes back to normal. It doesn’t seem to get any slower either. Another thing I noticed, sometimes it doesn’t “become slow” after dieing and restarting the level perhaps 8 or more times, it seems to happen almost randomly. Yes perhaps, because there are so many models, it’s not removing all of them before loading the next level. I’ll try removing all models twice and see how that goes.
Post Reply