Menu

#2 engine starts consuming more processor time.

open
nobody
None
5
2004-06-28
2004-06-28
Chris C.
No

Hi,

I have been using Kyra for about 3 weeks now and I like
what I see, however, I am having a problem with my
application consuming more and more processor time.

My application consists of several "screens" (basically
an SDL_Surface, and a new engine.) As the user
progresses through the menus they are given a choice
of several small games. When the game is completed it
is destroyed and removed from my screen stack. (I have
verified that I am unallocating memory each time I
destroy the game screen.) Most of the games work
perfectly.

However, one game scrolls. In this game I have a scene
that has 2 large background sprites on either end of the
background, with 60+ tiles (100x100) between these
large sprites. The first time the game is run it works
perfectly. However, on consecutive calls to the game
which gets recreated every time it takes progressively
more processor time, until after about the 4 to 5 time my
message pump does not get called until after Kyra is
finished the sprite animations. This makes the game run
sluggishly, and will not recover without restarting the
application. If I remove the 60 or so tiles the game runs
fine (20+ consecutive executions).

Any help would be appreciated.

Regards,

Chris Chaffey
Software Developer

Discussion


Log in to post a comment.