I was hoping some really good game creators, or just people wanting to share some things, could just post some helpful hints or tips that you learned while making your games.
I haven't acually made a game yet, and was hoping AG could get some more games with your help.
If your having trouble, be sure to check back here for some of the things others have posted.
I'm still working on my first game, but I thought I'd like to share a rule of thumb that helps me.
If I'm about to add something complicated to my program, something I'm not sure how I'm going to fully implement yet, I will "stub" it. Suppose I have a function that will do complicated calculations and returns a number. I will first have the function simply return the value of one.
public function calculateSomething:Number { return 1; }
I'll compile the program and make sure the program fits in with the game. Then I'll make a small change with the function so that it is slightly more toward how I want it to end up being, and I compile again. I keep compiling after every small change to make sure that I always have a working program. If something really strange happens when I run the program, I'll know it is most likely something I recently coded since the previous version worked.
I kind of like this thread. In hopes that is does well, here is my contribution.
A good tip to help prevent memory leaks in your as3 programming is to always create a deconstructor method for your classes. I personally like to create a function called destroy() in most of my classes that will remove children, remove event listeners, and nullify objects. Another way would be to attach an Event.REMOVED_FROM_STAGE listener and put most of your kill code in there.
Encapsulation Use it. Though it may take some more time to set up the additional structure, it will be well worth it later on when you need to debug and even reuse your code.
Pre-Planning You should always think about what it is you are going to do and how you are going to accomplish it. It helps me most when I layout a graphical representation of my code in a UML style. Example:
Speaking of UML, here is an awesome UML modelling tool that exports actionscript 3 for you based on your diagrams. No package support and code might need some formatting for some, but for larger projects this can save you time.
I learned from the experience I've had as a programmer to make sure your code is organized. A lot of your code can be on the timeline instead of in movie clips.
Also, label your frames. It helps a lot when switching frames (like if you have a flash RPG with a map or inventory screen).