I have written this article as a basic primer to flash game programming. In this article I will cover how basic programming can be applied to creating flash games. This article will not cover graphic design or drawing. If you are already proficient in another programming language this article will certainly help in the transition to flash game programming.
This article is aimed at people will very basic programming knowledge. An interest in flash games is certainly a bonus when learning to program them. Programming languages of any king will help you to understand this article and its terminology relating to flash game programming. I will be using very general programming terminology.
The very first thing I am going to cover is variables. A variable is a place where either a number, string(text) or a Boolean(true or false) can be stored. Variables can be changed at run time this means during game play. For example number of ammo in a weapon can be stored as a variable. As the user shoots the weapon the variable is degreased. A very symbol way in programming syntax would be: On press decrease the ammo variable by one.
The next thing I'm going to discuss is hit tests. A hit test is performed to detect when two symbols make contact. When these symbols make contact a true value is returned while the objects are not in contact a false value is returned. As you can imagine this very simple function has many uses where game programming is covered. An example of this could be when bullet hits its target play an animation of the enemy's death and remove them from the screen. So the basic in programming terms to this would be: if bullet and enemy's hit test is equal to ?true? then activate function enemy death that takes the value of the enemy's unique identifier. Inside the function would be syntax to display the animation and remove the symbol from the screen.
Displaying a life car can be achieved by first creating a small rectangle graphic. Next make the rectangle a movie clip and sets its identifier to a name of your choice. After this create a variable and set the variables values to ?100? and strict data style it to a number. Once you have done this, open action script and set the rectangles .length property to the variable you just created and set to ?100?. This way when the variable is increased or decreased the bar will change lengths. So when the variable is high the bar is longer and when the variable is low the bar will become shorter. Remember variables can be changed at run time there for so can the bar. Using a simple hit test to increase and decrease the variable which in turn changes the bars length. Producing a working bar that shows how much value the variable contains. This can easily be added into a game where the length of the bar resents the amount of life a player has remaining.
I hope this article showed you just how simple the elements that make up a flash game can be. Games may look daunting but once you break down there elements they become a lot simpler than they may first appear. If you have no yet tried making a game using flash then I strongly suggest you give it ago. The best way to learn flash is by experimenting and creating working scripts.
Many people got a chance to play the very popular elf game during Christmas 2006, created by Office Max, where a user could upload any face image, which would replace the elf’s default face. The result was about a thirty-second elf song and dance that provided hours of fun and laughs. Some of these creations can still be viewed by searching for the terms ‘elf yourself’ on Youtube.
Does anyone remember how bad we treated substitute teachers in school? Honestly, it seems pretty cruel to think of how students act when there is a sub in the classroom. Spitballs slapped the chalkboard, pencils stuck down from the acoustic ceiling tiles, and even disgusting sounds were made behind the teacher’s back. These are just a few of the classroom assault tactics that we are familiar with. I mean, think about it. Your boss or teacher is driving you nuts. In fact, they are annoying just about everyone. What better way to have some fun at their expense than by pasting their faces on a dancing elf? Now that we are armed with free weapons of ridicule on our PC that give us a harmless, yet hilarious platform for hours of endless fun, we can put down the erasers and let everyone in on the joke.
These types of flash games are fun for a small audience. But why stop there? We can now feature a bald Britney Spears, or a jailed Paris Hilton in our spoofs, for the entire world to see on sites such as Youtube. Why limit the viewing audience to a small handful? It is much more fun for millions of people to see our creations. Isn’t having your productions seen by the world, the new wave of the internet?
What is yet to come in flash media? 3d flash games are just around the corner. There’ll be nothing like being ‘in the game’. While sporting a nifty pair of 3d glasses and experiencing animation like never before, the PC gamer will get to see quite an improvement since the Jaws 3d movie debuted. Hopefully with the purchase of a PC Gamer magazine, we’ll get to play shorts created by the likes of Halo and Starcraft animation teams. These companies, who are already leading the pack in the design of action console games, will give you a 3d glimpse of their games in flash format to reach out to new online customers.
What is already here? Current technology has recently been responsible for design of a powerful development library, which allows creation of Macromedia Flash and Java based flash games and applications with advanced motion detection capability. In simple terms, this means users can play 80s classic Breakout, using only their hands to bat the ball and hit the blocks. Other games let you play simply by waving your hand in front of a webcam, such as an Air Drums game.
Flash game designers are ready and willing to try anything that gamers desire. Companies like Animated Marketing, are asking flash gamers to send their ideas for consideration to be created into flash media animation and free games. Apparently no idea is too outlandish. They want to provide more of what people are looking for in flash games and media.
Whether you want to see your boss dancing around in a monkey’s body, or play classic Breakout without a keyboard or mouse, flash programmers are giving online users hours of free, addictive fun.
Both Ashley Peach & Bryan Robinson are contributors for EditorialToday. The above articles have been edited for relevancy and timeliness. All write-ups, reviews, tips and guides published by EditorialToday.com and its partners or affiliates are for informational purposes only. They should not be used for any legal or any other type of advice. We do not endorse any author, contributor, writer or article posted by our team.
Ashley Peach has sinced written about articles on various topics from Dog Care, web development and Pets. Ashley Peach's websites include , and. Ashley Peach's top article generates over 49500 views. to your Favourites.
Bryan Robinson has sinced written about articles on various topics from web development, Video. Bryan Robinson, President of Animated Marketing, created the , Be the Monkey, which is featured at. Bryan Robinson's top article generates over 49500 views. to your Favourites.