At 12/21/09 11:06 PM, zrb wrote:
1) Would a game written entirely in separate .as files have a higher performance than one written in as3 but solely in the .fla? If so by a lot or just a bit ?
Not directly, what you get out of that is organization, which can be a vessel for optimizations. You'd be surprised how much extra a little organization lets you do.
For Tetraform, I had 3 types of classes, "Attractable", which contained a graphic class (flash-generated), and an AI class. It allowed me to pretty much combine different things together to create my enemies, and a couple of them use the same class but with a different graphic and attractable parameters.
Midway through development, we were like "hey we need life bars". Bam, edited it into the attractable class, and everything got appropriate lifebars. Super fast addition there that would have been way too much of a pain to do if all the enemies were distinctly separate. It also meant, when I needed to fix something about attractable, or the enemy base, I knew right where to look and didn't have to dig through thousands of lines of frame code to find it.
2)Would using only 1 frame in your .fla and clearing the screen and putting new graphics be dumb as opposed to having separate frames and have your game just go to the different frames ?
(all codes written in external files)
A combination of both is usually best IMO. Flash is great for menus and stuff, so take advantage of that when you can.