What does this mean for me? You will always be able to play your favorite games on Kongregate. However, certain site features may suddenly stop working and leave you with a severely degraded experience.
What should I do? We strongly urge all our users to upgrade to modern browsers for a better experience and improved security.
We suggest you install the latest version of one of these browsers:
Kongregate is a community-driven browser games portal with an open platform for all web games.
Get your games in front of thousands of users while monetizing through ads and virtual goods.
Learn more »
What can I do? I have tried quality, making offscreen mc’s invisible, mute, removing big mcs completely after they play, and making images have a lower filesize. Remember, the filesize isn’t the problem, the lag is.
Also make sure you have no more than one (1) onEnterFrame method running at any given time, which means not using onClipEvents at all (not that you would do that, of course ^^).
I had always believed that if you had a “pool” of objects, (i.e. not removing MovieClips when they are not needed but moving them to -1000x, -1000y and making them invisible), and you also had a mask over your main stage which was applied programmatically, the player wouldn’t try to render those clips. Recently I have heard opinions to the contrary, but I still want to believe :)
Reducing the amount of lines you use is important too. Fills are easier for Flash to render, so try the “convert lines to fills” command on all your stuff too.
And don’t forget, among the other things that people will mention, writing efficient code is paramount to performance. You should know exactly what the player is trying to process on any given frame, so you can keep it reasonable.
This is something I’m also really concerned about, so I would love to see if anyone else has better suggestions :)
Well, you see I have been making this game for a while. 2 and a half years. I was not as good with Actionscript back then, so I placed an onclipevent on just about everything. Would there be a way to replace all instances of onclipevent in flash with whatever else?
You would have to change the whole thing yourself, there’s nothing that just turns onclipevents to enterframes without doing a lot of work. Also, another method of lag reduction is to not have a lot of things with partial transparancy on the screen at the same time, and to turn lots of stuff into bitmaps.
Ah, I see. Well, what you want to do is take all the code out from your various MovieClips, and put it on the main timeline. Then you will need to give the clips instance names and scope all of the code properly to perform at the \_root timeline.
Yeah, Woad is right, also. Alpha transparency really slows things down, so use it sparingly. Also if you are using any filters (such as blur, glow, etc.) try to determine whether you really need them or not, because they are resource-intensive.
Thanks for clarifying that coder ;)
Apparently a good method to use, in lieu of moving things off screen and making them invisible (or in addition to), is setting the timeline of the Movieclip in question to a blank keyframe, so the Flash player isn’t even tempted to render it.
I’m going back right now in my game (over 700 objects in my library total) and adding this functionality to it to see if i can get a performance boost. Fortunately, I used a lot of classes in the game and because of that it will be a lot easier to make changes like this.
I am personally attempting to not use more than 2 movieclips in my current game development, through the use of a blitting / double buffering bitmap class. This is not something you would want to do to an existing game, but I am hoping this method of developement will enable stable frame rates on older computers even with many things on the screen at once.