Alright, it's time to go over "Concepts and Corrosion" of games. Let me explain in detail what each one is before we move along.
Concept:
A "Concept" is your basic idea for a game. Games generally spawn from simple ideas such as "Some stupid thing that looks like a yellow pizza, dropping pills so he can get high and eat the ghosts" to "Italian plumber who is hard up for some sex trying to fight dinosaurs and mushrooms in an acid induced dreamland in an attempt to find a princess he thinks he'll score with."
With a simple concept like one listed above, you can form the building blocks of an actual game franchise. If it's properly implemented, of course. Concepts are only part one of making a truly awesome and memorable game. The second step, implementing it is much more difficult... especially when coupled with:
Corrosion:
So, you have everything planned out. Your notebooks and desktop are overflowing with flowcharts, logic lines and snippets of codes and partially completed functions. Everything looks like an Arial view of a giant labyrinth, flooded with deadly "if" statements. Awesome, you're on the right path! You have a guy moving left, and right and jumping! Holy hell! He's jumping! Corrosion is when all of that goes wrong... and how to fix it.
Your code is correct!
if(Key.isDown(Key.RIGHT)){ _x += _root.hero.speed; gotoAndPlay(2)}
if(Key.isDown(Key.LEFT)){ _y -= _root.hero.speed; _xscale = -100}
if(Key.isDown(Key.SPACE)){_root.jumping();
}
Only one problem. He keeps bouncing. The little bastard just bounces if you hold down the space bar. Alright, no big deal. We can get through this.
First, research Key listeners for about 2 days. Check everywhere. Newgrounds, actionscript.org, flashkit.com even google. Once you find something for key listeners, try and implement that into your code by simply cutting and pasting it. There's plenty of time to learn that later, for now, just get the game working.
You plug it in, and it doesn't work. It's time to write a thread on NG asking for help. First, try not to sound like a complete tool. Things such as:
"OMFG!! my C0de izn Wokin!" followed by pressing submit, will not help you accomplish your goal of game creation dominence. Typing like that, and not showing examples of what you have so far will definitely get you flamed. If you try and back up the flames with:
"hehaha duMbaas, you spelt itenger Rong!" You will most surely be ignored for eternity and people who code and do voodoo on the side will cast hexes on you and give you AIDs.
After asking the question like a reasonable human being, someone replies to you and helps you out. Sweet! Make sure you fix the code, once again by cutting and pasting, because you're ABSOLUTELY sure to not run into problems by doing it that way. Who cares that the Key.isDown had an "!" in front of it. Figure out what it does later.
((Part II coming up in a minute, as soon as I can repost))