for & lag?
- Yambanshee
-
Yambanshee
- Member since: Oct. 5, 2008
- Offline.
-
- Forum Stats
- Member
- Level 11
- Blank Slate
i was just wondering, how much do for loops make flash lag? for example, if everyframe i had a for loop running (lets say) 150 times, will it cause any lag?
- dELtaluca
-
dELtaluca
- Member since: Apr. 16, 2004
- Offline.
-
- Forum Stats
- Member
- Level 20
- Blank Slate
At 3/22/09 06:52 AM, Yambanshee wrote: i was just wondering, how much do for loops make flash lag? for example, if everyframe i had a for loop running (lets say) 150 times, will it cause any lag?
flash isn't that pathetic :P
- Denvish
-
Denvish
- Member since: Apr. 25, 2003
- Offline.
-
- Send Private Message
- Browse All Posts (15,977)
- Block
-
- Forum Stats
- Member
- Level 46
- Blank Slate
Really depends what you're doing inside the loop. If you're simply incrementing a number, it doesn't make much difference whether you loop 15 or 15000 times
- Yambanshee
-
Yambanshee
- Member since: Oct. 5, 2008
- Offline.
-
- Forum Stats
- Member
- Level 11
- Blank Slate
sounds good. Basicly what im doing is at the moment i have a top view shooter. I decided that instead of a bunsh of for loops, ill make a mc with a alpha of 100 go to the bullet's path. Its also the total size of what the bullet is going to cover. This method worked great, but now that ive introduced 4 typed of weapons, that means a if statment with about 20 odd lines per weapon. IM guessing this in its self aint great for anti lag...


