Monday, 31 January 2011

Evaluation of my Flash Game

My Flash Game:

My flash game turned out how i wanted it to turn out the graphics were all vector and the text was a font i downloaded called capture it and it added to the feel of the game. The music in the background of the game made it more exciting as well. The scripting for the game was quite hard at the start but then after a while i started getting use to it and started putting code in places it would work better i successfully created the game with an external source and also a score and timer which was explained on the brief.
Overall my game turned out very good but i would change a few of the graphics if we had longer next time and i also would like to build levels so it starts easy and gets harder along the game and then also add a main boss because all platform games have a big boss.
For all the game built in flash the graphics turned out just the way i wanted them to.

Coding for my game last scene

This is the script for the last scene:


This is my last scene script the stop(); stops the play from playing all the scene's.
The channel1.stop stops the main game sound track.
The myTimer.stop(); stops the timer so that you can save your result.
i have created an add event listener for the scoreboard and also i created the function for the scoreboard.
in the function there is the same code we had in the main game so then it knows when to save the score and timer.
Then at the bottom there is a sound script and button i have already discussed, but this button go's to the bottom and plays the game again.

Coding for my main game part 2

This is a carry on from my last blog post.
 Up the top it removes the spitfire from the main game scene by placing it at -200 which is off the screen. And then it tells the game when your character has been hit go and play the last scene which is (4). The we have function Marley which is exactly like the bob function but this time it adds a bullet to your character. Then down the bottom it says if your bullet hits the enemy enemy play and remove the spitfire bullet and then place the enemy back at the beginning and add 1 to your score which is scoreNumber++.


The part down the bottom says if up arrows pressed spitfire on the y axis = y + the speed variable and then the same is repeated for the down arrow and then right at the bottom is when you press space it plays function marley which was the bullet.


A lot of code but it makes my game work perfect after doing the screen printing i found a few things i could improve on and i have improved the code a bit.

Coding for my game main game

This script is quite a long script so i will describe parts of the script that are important.
This script is for the main game stage.

 At the top of the script we are creating all the variables we need in the game for example, the enemy speed which is 10 and also the UP Arrow, Down Arrow etc.

Then under the variables we have a script for get current Date, time, hour and this makes the background change if its greater than or equals 12 its blue and if its less than or equal to 11 it plays gray, this is by using a 24 hour clock.


At the top of the screen there are event listener's one for, key pressed down and key pressed up and then another one for a restart game function.

Then after the event listeners there is the restart game function and in here it restarts the actionscript to what it was at the start of the game.

Then under the restart game function there is the script to when keys are pressed down so this involves 2 keys and a space bar.

Then here is the script for key press up its the same as the other one just key pressed up. So this means there will be no key's playing when you don't press the key's.

Then you have a function I created called game control and in here there is the enemy movement and also you have a score script which creates the score numbers.
Under this you have got a script which makes the random fire of the enemy's then it says if enemy fire is more than 100 play a function called bob.
Under that you have the bob function which adds the enemy's bullets, the enemy bullets are in the library and are a child when they are added to the stage. Then after the child it positions the bullet so it comes out of the enemy plane.
Then it adds an event listener of enemy fire and then the function come straight after, and then in this function it makes the bullet go - 3 on the x axis the reason for this is because the bullet is going backwards.
 Then if the bullet is greater than 400 it disappears off the stage and 400 is off the stage anyway but it removes the child and then the event listener.


The next part of the script is saying if the bullet hits my character Gameover becomes true which means it removes the bullet off the stage and removes 2 event listeners which are enemy fire and game control. And then it move's the characters straight off the screen so you can't see them.

Coding for my game Instruction Screen

In the instruction screen for my game I have a small script to start the game with a button and also stop the sounds for the menu's because I have different music for the main game.
There is a (stop();) on the first line to tell the script to stop on this frame, then under that we have
exactly the same actionscript as the first button script but we have called it begin instead and the button is called startbtn1. Then the new item in this script is (channel.stop();) this stops the sound we created in the first frame but i have put it in the button so when we go to the next scene the sound would be removed.

Sunday, 30 January 2011

My Game Check it out!!!

This is the link to my website with the game on it http://dacconcept.co.uk/idat102.html .
I am really happy with the outcome of the game, even though the deadline was quite short to make a game also to learn the scripting, it did help partly by my knowledge of scripting before.
I have got some feedback from friends and family and they said they liked the game and most of them said "they couldn't build that" so overall i was really happy with the way the viewers liked the game.



Last scene for the game

For the last scene in the game i have decided to keep it quite simple and follow parts of my drawings.
This is quite an important screen because it displays your score and the timer to see how far you got.

This is the drawing:

This is the actual game footage:
I removed the image because i wanted the viewer to pay more attention to the soundtrack which is Winston Churchill saying "never give up".
As you can see on the page there is the time you lasted in the game and the score you got in the game.
And then a short segment of Churchill's speech in the scene.
Then right at the bottom there is the retry button, which takes the game back to the beginning.
I thought about this page a lot this is through the soundtrack in the background a very inspirational speech.