Home Link

Monday, August 9, 2010

Saucer Destruction 3 - Behind the Scenes

Today I'm going to bring you behind the scenes in my game Saucer Destruction 3: Armageddon. Many, many hours went into the making of this game so I thought I would share some of the creative process with you. (Click on the pictures to make them larger)


Here you can see Flash Professional CS4, the program which I used to create the game. On the right you can see the library, which holds all of the items used in the game. This game uses 197 symbols (items) in order to run. These vary from people, space ship parts, even start buttons, and police sirens. These symbols are the interactive and non interactive parts of the game. On the top, you can see the timeline. This is where I animate everything in the game.


Here is about 30 of thousands of lines of code that program the game and tell it what to do. This specific segment here tells the barrel of the enemy tank to point towards the saucer. For example it says "rad = Math.atan2(sy-y,sx-x)+(Math.PI/2);" This uses basic trigonometry to find the arctangent of the angle created by the two sides of an imaginary triangle that locate the saucer and the tank. After finding this angle its converts it from radians to degrees in the next line. It then limits it to a certain range so that the barrel can't point downward. Then it applies this angle to the barrels rotation.


Here is a screenshot of the file hierarchy. Theres a few dozen files and folders that hold all the parts of the game. Within the actionscript, I told it to go through these folders to find parts and to put the game together.