4 Replies Latest reply on Mar 18, 2008 8:29 PM by Blindgator

    Game Lag

    Blindgator Level 1
      In my game there is this thing that shoots these bullets at stuff falling. When I first shoot for a while without anything else going on the game plays fine. Then after a few seconds when there is nothing new going on in the game it starts to lag. Theres only like probably 20 objects on stage at once and each set of ten performing hit tests. I know I delete the objects after they go off stage. What could be causing the lag after it runs fine for a while?
      Thanks for the help.
        • 1. Re: Game Lag
          rlc5611 Level 1
          Do you clear any of your intervals that you set? If you have any onFrame events or intervals running, you should remove them when you no longer need them.
          • 2. Re: Game Lag
            Blindgator Level 1
            Yeah I clear them, but some of them are re set so that the next action like making a bullet is repeated in x seconds.
            • 3. Re: Game Lag
              rlc5611 Level 1
              First I recommend you put a trace in those events for testing. Just have the trace display some text. Sometimes I forget to clear intervals or do it incorrectly and have a trace is great feedback to see whether an interval is still running or not.
              • 4. Re: Game Lag
                Blindgator Level 1
                Actually I was perusing through my script and found that the function to make bullets had its clear interval blocked out. lol I have no idea why the hell it was blocked out, but it sure made a difference! and ill remember to put a trace in there next time.