Wednesday, 27 April 2011

27th April 2011

Yo!
Back from Half Term and good news.......my game is in next week!! Today is really me fixing little bugs, which include, text, when the enemy dies, and the winning screen, such as when the game ends the player can still shoot and get points when there is now enemies, and finally the run, they still have a static run when the player pressing down the left or right. My sound is also a little out, as the enemies cries are out a little.
I've changed the positioning of the sound in the Explosion Code, as it was like:

function Explosion()
{
addEventListener("enterFrame", enterFrame);
}
function enterFrame(e:Event)
{
if(this.currentFrame == this.totalFrames)
{
removeEventListner("enterFrame", enterFrame):
stage.removeChild(this):
var s = new ExplosionSound();
s.play();
} This meant the sound played after it had gone, so I changed it so it is now under the function Expolsion() after the addEventListener("enterFrame", enterFrame);, so now when the Explosion is on the screen, then the sound is played, the way it's meant to be.
I just debug my game (again) and it has the same problem as when I last debug (try and read Easter Half Term - 11/04/2011 blog for information on the errors (or if you are too lazy to read the blog post they are :
Boss/kill, Boss/takeDamage, Game$/winScreen and Bullet/enterFrame)
To stop the player to keep shooting, I decided to add the code ship.visible = false; meaning the ship will disappear after the Winning screen has been shown, but the player can still shoot and get more points. Also the power up timer still runs. I've fixed the score update, all I had to do was change the fonts......really? Wow, so simple and it's took me this long to fix!!!! Yeah, so I had to change the font from comic to Lucida Calligraphy that was it, fixed instently.
I've managed to fix the winning screen bug with the player getting more points after the game, this was a simple adding of code which was if(Game.ship.visible == true) I then added this under the if(Key.isDown(Keyboard.SPACE) && shootLimiter >15) {
Like the image below




The only bug left to fix is the run and that is it!

Monday, 11 April 2011

Easter Half Term - 11/04/2011

Yo! For the next two weeks is Easter Half Term, and after that we have two weeks of College before the final date of the 6th (okay one week of those is the same week as the 6th), so it;s really only four weeks to go. So far my game is nearly complete (yeah!) with only a few bugs, mainly the end game and the running bug, so I've came into college during my holidays to complete some of the bugs. Right now I'm working on my game, trying to get the winning screen to come on, right now, it's not working. I did find one bug, I misspelt a line instead of putting winScreenMenu I put winScreenuMenu; With that fixed I tryied again, deciding to rebug my program and getting this message: TypeError: Error #1009: Cannot access a property of a null object reference. at Boss/Kill() at Game$/gameOver() at Ship/kill() at Ship/takeDamage() at EnemyBullet/enterFrame() as well as other errors such as TypeError: Error # 1009: Cannot access a property or method of a null object reference. at Boss/takeDamage() at Bullet/enterFrame() TypeError: Error #1009: Cannot access a property or method of a null object reference. at Explosion/enterFrame() TypeError: Error #1009: Cannot access a property or method of a null object reference. at PointDisplay/enterFrame() I also found that after debugging, I now have two health packs arrive at the same time, this might have something to do with the code I tried, as I was trying to get another element into my game, it works like the pick up, coming in randomly, but takes damage if the player avoids it, but since it didn't work, I decided to drop it and I must of forgot to change the code back. I fixed the double health pick up, I deleted all the code that refered to my seco0nd 'pick up'. Finally!!! I've got my winning screen to appear after the boss is dead!!! Yeah!!! But......the game still plays in the background and button to restart doesn't quite work, so now the screen does show, I will now tweek it slitly to make it work. I found out mu problem, it's really stupid and easy to fix, but I missed it......I kept putting winScreenMenu instead of the winScreen, dope! I'm now really confused, I was just testing my game, when I died, I restarted the game and the next enemy was the boss........alright, what's going on now, in my first game I did beat all three minbosses before the boss was surpose to come out, but when I restarted the game the boss was the first boss and when I killed him the winning screen came on, but the game still continued to play the game. I am really really confused. At the moment, I will try to compare the winning screen to the game over code and see if the problem is there, if not, then I will look into other areas of the code. I'm now having problems with my new game screen, it comes on, but it doesn't want to play and run the game. I've debugged my game again and this is the problem in the output Fonts should be embedded for any text that may be edited at runtime, other than text with the "Use Device Fonts" setting. Use the Text > Font Embedding command to embed fonts. Attempting to launch and connect to Player using URL E:\College\Steve Rich\Programming\Fenrir Game\Game.swf [SWF] E:\College\Steve Rich\Programming\Fenrir Game\Game.swf - 2543328 bytes after decompression....what? I have no idea what is going on. For now I might use my back-up file I created just before I tried to change anything and try again. I loaded up my back up, and I now have to create the Winning Screen again, but now I know the problem it should be a quick fix, and now I can fix that as well. I've fixed the winning screen, it now comes on when the boss is killed and restarts the game and disappears, the problem was I forgot to write the code, winScreenMenu.visible = false under the newGame function (whoops) but now that works, but now I have a bigger problem, after the defeat of my boss, the bullets start to miss fire (so to speak) and getting a shorter range. The output has placed this error out now TypeError: Error #1009: Cannot access a property or method of a null object reference. at Boss/takeDamage() at Bullet/enhterFrame() I just debugged (again) and I looked through all the Errors here they are: TE:#1009: Caapomoanor (Should know what it means by now) at Boss/kill() [E:\C\SR\P\FG\Game.as:224] - stage.addChild(explosion); at Game$/winScreen()[E:\C\SR\P\FG\Game.as:224] - EnemyShip.list[i].kill(); at Boss/kill() [E:\C\SR\P\FG\Boss.as:81] - Game.winScreen(); atBosstakeDamage() [E:\C\SR\P\FG\Boss.as:44] - kill(); atBullet/enterFrame() [E:\C\SR\P\FG\Bullet.as36] - EnemyShip.list[i].takeDamage(1); At the moment, I have no idea what I am doing with this and will mostly leave it to when I'm next with Steve, but on the plus, I now have a winning screen, even if it doesn't work yet.

Wednesday, 6 April 2011

Gaz' reply

Yo! Today I had an email off Gaz regaurding my game from the 23rd March. Between then I had made a few adjustments, so a few of Gaz's recommendations have already been completed, but here are the recommandations Gaz had for my game:

  • Fire - The player needs to shoot faster, as the Enemies shoot faster than the player. I didn't notice this until Gaz said.

  • Sounds - I've added the sounds last week (30th March 2011)

  • Health Bar - Apparently, my health bar is twice as big as it should be.

  • Adding new enemies, wepaons and pickips - At the moment I'm still trying to get my jump up to work, so I will consider more.

Right now, I'm going to change my shoot speed and make it up to speed. I've changed the speed of the bullets, so now they run at the same speed (Maybe faster) as the enemies.


I'm also trying to add another 'power up' but one that does damage rather than heal the player. I tried following the shooturial, but I might try the this.gotoAndStop(); again.


Just tried it (after filling in my Alpha testing sheet) and found the problem still doesn't work! I might change it again and I might look into creating it like an enemy.


I just realised I need to end my game. At the moment you defeat 3 mini bosses to bring the boss, and the defeat of the boss, the game should end, so I'll need to create a code to tell the game to stop when the boss is kill, much like the game over menu. I could use the code from that. I added the this.visible=false; Game.gameOver();, so now, anytime the boss is killed the Game Over screen comes on. Now all I need to do is change the Game Over screen to a Win screen. I have managed to create a function for the win screen. After trying to create the function, I managed to get it to work, but I keep getting this message in the output:


Type Error #1006: value is not a function.


at Boss/kill()


at Boss/takeDamage()


at Bullet/ enterFrame()


As I only have five minutes left of the lesson, I don't know what to do, so I'll try to finish it within the next few weeks, as next week is Easter for two weeks, back on the 27th April 2011.