RipX:
I don't wanna spam this thread up 'cause it's one of the few really good ones at the moment IMHO, but it's a new game ( ColourWorld is long dead ).
It scrolls and it blasts and I'll post an alpha as soon as possible. The very few people who have seen it so far like it, and they are all people whose views I really value, so I'm quite pleased at the moment.
It's my attempt at a AAA game and is far and away the biggest thing I've attempted in Flash.
--- End spam ( And hype ) ---
jtnw:
Prototypes don't have to be for code that is used a lot, you could quite easily write any game you could think of in Flash and never use a prototype. It's just a structured way to increase an objects functions.
Functions don't have to be used locally, you just use them for code that may be repeated in a game. The concept of functions is that you write them generically so they can take arguments and can be re-used.
For example, take a function that does all the collision detection for all the baddies in your game. It can take any baddies x/y position and perform a test and give you back the result. Then later on during development you have this killer idea but it means you need to pass the animation frame to the collision function. 'Cause it's in a function you only have to alter that and all the baddies will use the same code, rather than updating each instance of the collision code by hand.
Performance wise calling a function is actually slower, but there is a cut off point where optimising will just make your code un-readable ( I can't stand seeing code with one letter var names, it's just so easy to screw things up and when you look at that code in a months time it's going to take you twice as long to understand it ).
Also another beauty of using functions is that once it works you can re-use it in every other project you do.
Squize.
