The Armor Games website will be down for maintenance on Monday 10/7/2024
starting at 10:00 AM Pacific time. We apologize for the inconvenience.

ForumsProgramming ForumSlow Game Speed

12 5498
andyhunter
offline
andyhunter
30 posts
Nomad

When I first started my game it went pretty fast, but now it's really slow. my game's size is only 515 KB and it's set to run at 30 FPS.
Does anyone know how to fix this?

  • 12 Replies
maffegozer
offline
maffegozer
64 posts
Nomad

So you are saying it is lagging?
Have you used big images and resized them?

andyhunter
offline
andyhunter
30 posts
Nomad

yes its lagging, and I think I did but i can't remember. also do you think that adding a preloader would help? because it doesn't lag in the menu's just when I get into the game.

Hectichermit
offline
Hectichermit
1,828 posts
Bard

what was the last thing you did to make it lag?

pft
offline
pft
574 posts
Grand Duke

i lag quite a bit usually. the best thing to do is only use what you actually need remove anything on your computer that you don't need. doing scans and configurations will help reduce unwanted things and increase mb making computer faster. if your computer is usually faster then make sure you got the best java/flash player for it. also go to task manager there is a little thing called seaport that appears in there that can cause your computer to go slow and isn't needed at all to run anything.

andyhunter
offline
andyhunter
30 posts
Nomad

My game is lagging not my computer. I don't know what I did to make it lag. But it works a little better when I run it on low Quality.

Hectichermit
offline
Hectichermit
1,828 posts
Bard

it has to be from graphics if its the quality issue, you need to make sure you don't have too many images repeating or too much color variance.

Darkroot
offline
Darkroot
2,763 posts
Peasant

You might have an infinite loop or some element might be creating itself repeatably, significantly slowing the game down. Since only the game has a problem it has to do with poor optimization in your game alone.

maffegozer
offline
maffegozer
64 posts
Nomad

Yes well, the problem is you used big images and resized them to fit in your game.
The images will stay big in filesize, but are smaller.
Thing you need to do: Open the image in photoshop or something. Resize it. Save it as a new file. Voila. Smaller file size but the same result.

andyhunter
offline
andyhunter
30 posts
Nomad

I have a car Movie clip that gets attached to the stage about 6 every second but gets deleted a few seconds later, so there are about 12-15 on stage at a time. I think that might be it. The pic's size is 43.9 KB. I will resize it in Photoshop and see if that works.

Darkroot
offline
Darkroot
2,763 posts
Peasant

I don't think just removing the car works without removing reference to it. But I'm not sure what code you are are using, also if your worried about the fps you can check that too. With a textbox or just tracing stage.frameRate

andyhunter
offline
andyhunter
30 posts
Nomad

how would you do the stage.frameRate in AS2? I tried this:
_root.fpsText.text = stage.frameRate;
but that didn't work.
The code I use to remove the cars is this:
if(_y > 610)
{
this.removeMovieClip();
}

Darkroot
offline
Darkroot
2,763 posts
Peasant

Oh your using AS2 frameRate probably won't work for that version of actionscript. Try this component instead then.

Also AS2 uses soft references so I don't think it should be a problem with your movieclips then.

Showing 1-12 of 12