top of page

UNIT 10 Flash Doodle 

For unit 10 we have started lerning coding in flash we started by lerning the basics of using buttons by making a face that can be controlled by a button, with a bit of code that consists of a variable saying that as I press the button then it will play the transformation and then we learned how to move it around the page.

Press the black button to see how this doodle works.

After that we then moved on to a few more basics in which we created an animation for a square that would gradually grow bigger and after making it a movie clip we made the object transparrent and put some coding in that would make it so that everytime you hover over the square it would play the animation and lastly we duplicated this and spread it over a the whole of the screen to create this special effect. 

Roll over the box above this paragraph to see how this doodle works

I am now going to start my ideas and designs for my final game. I have decided to create a shooter game, similar to old arcade games like space invaders and asteriods, the background of my game will be mutant spiders attacking the city and you are the last ship left to save the town. So I will start by researching these old shooter platformers and tutorials for tips on creating scripts for shooting like hit tests and next highest depth then begin the design for my spaceship. 

When Spiders Attack

Here are some examples and research of what I want my game to be like as iv'e been looking at various types of retro spaceships, cities, and spiders to get a feel for how I will design my game, I have also been looking at videos for making shooting games and different types of actionscript that I can use. So I will now go on to design my spaceship and start coding the movements and hit tests for the enemies that I will have. 

I have now finished the design for my spaceship I didnt like the first draft of it so I made a new one and then started adding code for the movements of the ship using the "key is down" function to that it would respond to the keys I am pressing and move in the direction of the axis I have written, then set the perameters for the area that the ship could travel in by using an "onClipEvent" and taking down the dimensions of the walls. I am now going to start the design for my enemies and search for some code I can use to help them move around randomly.

I have finished the design for my spider enemies and found some math code script for moving a movie clip around randomly and changed some of it so that it suits my data mainly using the maths functions and value expressions so that they are directed towards the ship and that when they go out of screen they will reset. I am now going to try to create my bullets design and shooting script. I got the code for my enemies from the virtual instructor at https://www.youtube.com/channel/UCULpiAa8nIl_e68y59VYjHQ

Now that I have got both my ship and enemies moving I can convert it to swf to use as an example of how far I have progressed with my game, use the arrow keys to move around.

 

After some long research and trail and error I have finally finished the working code for shooting bullets from the spaceship, I started by creating a design for my bullet and then turning it into a movie clip with the registration point at the corner, so that I could place it by the ship where the bullets will be coming from and it will look realistic. Next I used 

"getNextHighestDepth" so that it would register my bullets in front of what will my background and my enemies too. The main and hardest part was the using the "hitTest's" so that when my bullets hit the enemies it will dissapear and the enemies will reset, also by using true and false statements to know weather it hits it or not, which involved adding extra code for the ship so that the enemies will reset. Then lastly the coding for the actual shooting of the bullets I used the "_root.attatchMovie" function and "getNextHighestDepth" to link the bullet movie clip to it and using the "_root" and axis to write the direction and speed that the bullets will travel in, and keeping this movie clip in front of all my other layers and clips, I also used another "OnClipEvent", "_root", and "hitTest" so that if the enemy hits me it will reset the ships position and take a life away.      

 

I have now got my bullets enemies and spaceship to succesfully work here is another demo of the full game to show how far I have progressed, after this I will begin to create my background and the coding for a reset button etc. Use the arrow keys to move and spacebar to shoot.

 

My background has now been completed I started by creating an outline for the buildings and windows then filled them in with various colors, after that I turned it into a symbol so that I could write some code in it to get a moving background, and I did this by creating a speed that it would move at then using an "onClipEvent" to say that if the clip reaches a certain point in the grid then it would start it again, making the impression that the spaceship is constantly moving however it is the background. After I simply made a light blue background in which the colors gradually got darker to make it look similar to a sky then just added clouds and put it behind all my layers to act as a horizon, now to finish my game I am going to add a reset button and some text for if you loose the game.

 

I have now finished all the major components of my game, for the ending text I used a seccond keyframe to add the text as the ship would not be in that frame then added a code "gotoAndPlay" so that when the player runs out of lives it will skip to the next keyframe which will show the game over text, and then another of the same code on the seccond keyframe on the replay button so that when you press it will skip back to the first keyframe and start the game again.

 

bottom of page