Be a Supporter!

do frame labels cause lag? as2

  • 368 Views
  • 6 Replies
New Topic Respond to this Topic
Bum-Secks
Bum-Secks
  • Member since: Oct. 12, 2005
  • Offline.
Forum Stats
Member
Level 04
Blank Slate
do frame labels cause lag? as2 2010-05-02 05:55:52 Reply

I'm making a game and trying to be super careful about any lag issues. So i was wondering, will too many frame labels cause lag?

so instead of gotoAndPlay("comboAAA");
i'd just use gotoAndPlay(4);

The game has 16 combos and overall 46 different attacks i want to put labels on, but not if it will cause lag. Anyone experiment with this before?
I'm using as2

Doomsday-One
Doomsday-One
  • Member since: Oct. 28, 2005
  • Offline.
Forum Stats
Member
Level 10
Programmer
Response to do frame labels cause lag? as2 2010-05-02 06:24:33 Reply

Use labels.
Any speed difference would be negligible, and the labels improve the readability of your code dramatically, as well as making it easier to edit the movie clip without having to change every single gotoAndPlay function (imagine adding an extra frame somewhere and then having to find every gotoAndPlay/gotoAndStop in your code and adding one to every frame number - frame labels make your life easier in this respect).
If your game is lagging, there are much larger fish to fry before you even bother worrying about whether this would cause a difference. Flash changes most frame labels into numbers when you make the .swf file anyway, so there is often no difference.


Doomsday-One, working on stuff better than preloaders. Marginally.

Bum-Secks
Bum-Secks
  • Member since: Oct. 12, 2005
  • Offline.
Forum Stats
Member
Level 04
Blank Slate
Response to do frame labels cause lag? as2 2010-05-02 08:17:57 Reply

At 5/2/10 06:24 AM, Doomsday-One wrote: Flash changes most frame labels into numbers when you make the .swf file anyway, so there is often no difference.

Oh good =D Thanks for the reply

Wolfos
Wolfos
  • Member since: Jan. 19, 2008
  • Offline.
Forum Stats
Member
Level 25
Game Developer
Response to do frame labels cause lag? as2 2010-05-02 11:41:43 Reply

I never use labels, and lag is usually caused by the flash built-in player.

zrb
zrb
  • Member since: Aug. 8, 2006
  • Offline.
Forum Stats
Member
Level 11
Blank Slate
Response to do frame labels cause lag? as2 2010-05-02 12:29:15 Reply

At 5/2/10 11:41 AM, robin1232 wrote: lag is usually caused by the flash built-in player.

And noobs who don't know how to optimize their codes.


School Sux ! || As :Main || As3: Main || Animation: Main || Flash Tutorials ||

BBS Signature
ThatGreenAlien
ThatGreenAlien
  • Member since: Mar. 27, 2010
  • Offline.
Forum Stats
Member
Level 10
Artist
Response to do frame labels cause lag? as2 2010-05-02 13:12:05 Reply

At 5/2/10 11:41 AM, robin1232 wrote: I never use labels, and lag is usually caused by the flash built-in player.

Sorry for being off topic, but that may be why my animations always lag, because it happens only when I watch it on the Flash player, not on like Spamtheweb or here.


Bang!

KynetiK-27
KynetiK-27
  • Member since: Jul. 23, 2006
  • Offline.
Forum Stats
Member
Level 10
Blank Slate
Response to do frame labels cause lag? as2 2010-05-03 02:45:15 Reply

Thats why you test on various platforms before inflicting it on the public.

Frame labels are an absolute godsend.