|
-
w00t
mc.setMask()'s dont help speed up.. At least in the test's I've done.. I'd like to beleive they do, but I havent seen proof. I've seen them as being slower, cause flash draws the entire MC, then masks it out.
Squize, you got most of it not much to elaborate on..
I found that the more Key.isDown(Blah)'s you use it can slow it down... Strange that...
(condition ? action : else) I dont beleive is faster, I think when you compile it breaks it up to flash's native if statement..
Keeping all your code in one place is not only good coding, but it can be faster, because code lookups dont have to go through MC's, plus you usually recycle more code that way.
Setup collision arrays instead of having 1000x enterframes, or having to evaluate a string 1000 times. You can use them like this:
for(i = 0;i < collisionArray.length;i++){
if(hitTest(collisionArray[i])){
//OMFG IM DEAD?!?#!
break;
}
}
I might work a tutorial to do that, its ALOT faster than any other method IMHO..
for in is quick, but you have to sort out what you want to use.. it doesnt differentiate between variables, arrays or mc's.. so you have to do it for it..
I gotta go to work.. I'll think of some more.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|