Yo!
Today is the final Wednesday before we send off the game on Fri (6th) And today is the final details and final programming and testing. I've already done the Alpha testing sheet, so I just need the Beta and the final test. Right now I'm editing my sounds. From the first try, I wanted to add a battle sound (You know, sword clashes, cries, that short of thing) And I added it in, but it was too over-powering for the Monk chant of my background music, but now I used Audacity Portable to make the Battle Cries softer and quieter, so it sounds as if its far away. After playing the game with the new sounds, I wanted the music and battle to stop during the game over, and so I wanted to change all the plays to stop, so instead of being: backgroundMusic.play(0,1000); it's now: backgroundMusic.stop;. At the moment I'm having technical difficulties with the battle cry, because it's written like: var s = new Battle_Cry; s.play (0,1000); I have tried to stop the music using the code:
backgroundMusic.stop();
var s = Battle_Cry;
s.stop(); under the gameOver, but, it doesn't like stopping when the game over screen plays, but it might be that the music is the game function instead of the new game function. I tried placing them under the new game function, but every time I started a new game, the music overlapped and made the music louder, so I'm mostly going to place the music under the game function, and not bother with stopping the music.
I've just played the game once more, and my timers are not working, as in if I die, the miniboss timers don't stop. For example, if I kill two minibosses and die, the third one is played as the first mini boss and then the end boss comes on. After debugging, the game has pointed out my stage.addChild(explosion); line and now it's crashed and will close down.....oh no just the debugging program.
Just debugging and looking through the errors, it seems it has problems with killing my boss, all the errors link to the explosions, winning screen the kill function or the kill in Enemy List. Here is a screen shot of the Errors:
With Steve's help, I've fixed the game bugs with the boss. I added the Game.winScreen(); before the for(var i in EnemyShip.list)
{
if(EnemyShip.list[i] == this)
{
delete EnemyShip.list[i];
}
} This is the function to kill the boss, I also have this code in the winScreen function, meaning the boss was being killed twice, making the game error. Steve also helped the boss timer-countdown-thing. It was the easiest fix, all I had to add was bossCountdown = 3; under the newGame Function.
Having playing the game for the final time, I decided to try and make the character look like it's running instead of standing still. I asked Steve to look and he used a Boolean for a var. This var is var keyright:Boolean=false; Later on in the code, where the code is to run and move, he added
if (keyright == false)
{
keyright = true;
if(Key.isDown(Keyboard.RIGHT))
{
this.x = this.x + Velocity;
this.gotoAndStop(3);
}
}
else{
keyright = false;
} (For those that have followed the blog, they'll know that 3 was to go to the duck frame and 2 was for the run frame(I changed them over) Steve has asked me to create the same for the left. To create the run cycle to work backwards, I used the same method, but changed all the keyrights to keylefts, and I had to change one more part of the code. When we was first looking at the code, we tested with left and used the code: if(Key.isDown(Keyboard.LEFT))
{ this.x = this.x - velocity;
this.run.gotoAndPlay(3);
}, but since I'm using a different code, I changed it back to this.x = this.x - velocity; this.gotoAndStop(3);. So now my player runs backwards and forwards, but slower.
So, this is it, my game is done, all that is needed to do is test my Beta and the final game!!!!