Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 08-28-2004, 12:43 PM   #1
Registered User
Join Date: Aug 2004
Posts: 1
Question Preformance issues...


Just started out with flash but i have programming experiance from java...

Okey... here is the problem...

I'm developing a game in flash just for fun, but when I'm have to much graphics and moving stuff, I allways seems to run in to some preformance issues and evertings starts to lagg badly. But I have seen games with waaay more objects doing fine...

The framerate is 24fps.

Like i said i dont have much flash experiance but some resons I can think of:
1. everything is in vector graphics (is that a preformance issue?)
2. The flash is quite large compared to others. (800x550 px)

Here is an URL to the game:

Here are also some cut outs from the as if these hav.
This is the script that generates the units.
	var name = "enemy"+game.currentEnemies;
	var temp =new game["Tankp1"]();
	duplicateMovieClip("tank",name, 10001+game.currentEnemies);
	_root.game.enemies[name] = _root[name];
	_root[name] = undefined;
	_root.game.enemies[name].vars = temp;
	_root.game.enemies[name]._x = game.windowStartY + random(500)+25;
	_root.game.enemies[name]._y = game.windowStartY - 20 - random(500);
	_root.game.enemies[name]._visible = false;
This is the script that is moving the units forward (is placed inside every unit).
onClipEvent (enterFrame){
	_y += vars.speed;
	if(_y > _root.game.windowEndY-25){
		_root.score += vars.lostPoints; 
	if(_y > (_root.game.windowStartY - 20)){
		_visible = true;
So if someone have any idea I would be glad.

Last edited by icanubis; 08-28-2004 at 01:35 PM.
icanubis is offline   Reply With Quote
Old 09-03-2004, 10:44 PM   #2
Shy Boy Extroadinair
Join Date: Sep 2004
Posts: 21

first of all... awesome game.

i think the problem is that you're just using to many enemies, the excess amount of movie clips on the stage make the game slow, nothing about how you're doing the script. Also that many tanks can make the game unfun. and also, the start button needs to have a box around it so you don't have to click the thin letters. and also, the weapon firing thingy could use an upgrade, it fires to slow to be effective against the tanks. but nothing wrong with the script. oh and, try not to use gradients or complicated textures, they tend to cause lag to.
roguebot989 is offline   Reply With Quote
Old 09-03-2004, 10:50 PM   #3
Shy Boy Extroadinair
Join Date: Sep 2004
Posts: 21

now that i think about it, it's definintly the gradients, a single color makes the rendering of the game quick and easy. for games you want anything that moves to be a simple and as small a file size as possible. leave gradients for things like the loading pages or movies. and i'm assuming you're only using vector images right? not bitmaps?
roguebot989 is offline   Reply With Quote
Old 09-06-2004, 08:58 AM   #4
Dr Warm
Getting there(in flash)
Join Date: Feb 2004
Location: Australia
Posts: 131

Yeah those explosion circles must have the max amount of gradients, not very wise! Yeah i find that the vector based engine can be annoying especially with hitTests and stuff, but depends what you want, i like making tile-based games, good tutorials here :
HTML Code:
infact very good everyone can learn something (or maybe i'm just total noob)
Dr Warm is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

All times are GMT. The time now is 04:42 PM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.