Thursday, 31 March 2011

31/03/2011

Yo!
Today me and Steve have been trying to create the final score. After trying for an hour looking at the Avoider Game and Shooturial, we both decided to copy the score text and chnge them to finalScoreText. We also changed it so that the score is only visible when the game over menu is shown.Add Image

All I need to do is change the location and size for the text in the final game.

Wednesday, 30 March 2011

30th March 2011

Yo!

Today I'm working on my flash game again, working on the fine details. The problem I'm having at the moment is the jump. When I start the game I'm in the perfect position, but after I jump, my character falls off the screen so only the head is in the shot. I've changed the character's positioning on the movie clip so the cross in located in the middle of the image and have shaged the shooting so it looks like it's coming from the cross bow.




Following the Shooturial on Kongregate.com, I have managed to add sound to my level. I had to import my sound to the libaray before changing the properties so they can be linked with Action Script. I have three sounds in total, a bullet. explosion and background music. I had to name the bullet ShotSound, the explosion ExplosionSound and the background music BackgroundMusic. I then had to add the simple code of var s = new Explosion/ShotSound(); then s.play(); under the explosion/bullet function. For the Background Music I just had to add static var backgroundMusic = new BackgroundMusic(); under the public class and add backgroundMusic.play(0,1000); under the game function. Now All I really need to do is fix my jump and new game screens!!!!


I have just created a more realistic bullet for my character and enemies and have uploaded them into my game. To change the bullets was really easy, all I had to do was make a Movie Clip and in the properties was call them Bullet before deleting the graphic code used to create the orginal bullets. Here they are in game play and the original artwork










With help off Steve, I've managed to fix the enemy problem, when they run onto the new game screen. To fix this we had to remove the EnemyShipTimer from the Game Function, but keep it in the newGame function. I did this for all the timers, like the miniBoss and PowerUp. I've also gone in change some minor details such as the positioning of all the minibosses, enemies, character and bosses so they all run on the same level. I've also changed the jump with the help of Steve. After trying different code, we ended up using the code if(this.y > 220){this.y = 220}, meaning the jump show go back to the default line instead of disappearing.


The problems left:


JumpUp - I want to make the player have a reason to jump and have a little enemy to jump, so I'm hoping using the PowerUp code and change it so I can use it to make some thing to make the player jump.


Running - At the moment when left or right is holded down, the animation for the run stops on one frame, making it look wrong when playing.


After playing through the game, I decided to copy the code regarding the healthbar from the MiniBoss to the Boss, so now the Boss's health bar is much better and works now.


At the moment, I'm going to add a score on the game over screen to add more competitive game play to the game.


After trying to find out how to create the final score, both myself and Steve couldn't figure out the code, so we've decided to carry on with the game development.


My next weeks targets are:


Final Score - adding my final score onto game over screen and the win screen.


Running - I need to look at the running as when the player presses down the left or right button he stops running


Jump Up - My little jumping teaser still doesn't want to come on, so I'm hoping to improve him and start them coming on and make the player jump.

Wednesday, 23 March 2011

Creating the final assets

Yo!
Today I'm looking for sound effects for my game while waiting for help with my new game menu. I tried to find my sound from my HCI and 2D animation projects from last year, but I couldn't find them, but I did find the link I used from last year. The site was called Sound Dogs and the link was: http://www.sounddogs.com/searchresults.asp?keyword=Medieval
From that website I found three sounds, one music - Monks Chanting, this will be playing in the background as music.
Background sound effects - Battle field, this will be played to enhance the feel of battle
Crossbow firing sound- this is to make the cross bow seem more like a crossbow. I still have to add some little details in the game to make the game seem more realistic.
Pain Scream- this will be used for the explosion
I've managed to create a background animation, where a wave of allies and enemies enter the screen behind the player, running past one another and moving on. This was created by using my run animation and the enemy ship, duplicating the animation and making sure it doesn't link up to the action script. I then placed the two movie clips at 700 and -700 before placing a key frame on frame 60, and move the movie clips to the opposite number, before adding a classic motion tween. Once I created that, I placed them on a new layer before creating a new layer and scaling them down to make them smaller as they go on, making them look further away from the camera.
During testing, I found it too easy to win the game, as when the player ducks, they can shoot and move backwards, without standing, meaning the boss and mini bosses was easy to win when the player can move away from them and continue to shoot.
I decided to change the function move (e:Event). I changed
if(Key.isDown(KEYBOARD.LEFT))
{
this.x= this.x - velocity;
}
to
if(Key.isDown(KEYBOARD.LEFT))
{
this.x = this.x - velocity;
this.gotoAndStop (2);
}
This means every time the player had pressed down and left, the character will now stand back up and play my run movie clip, instead of staying on the duck movie clip. I've also added the this.gotoAndStop (2); to the jump function, meaning what button the player presses will result to the player standing back up. I've also added the this.gotoAndStop(2) to the shooting function, meaning the player now has to time their fires to survive longer. As I have a jump function, I need to create something to make the player jump. At the moment, I'm considering having a random image to jump. I created a random image of someone leing on their side, making them look dead, but trying to make it suitable for all players. I tried using the EnemyShip code, but when I tried it, it didn't work as well as I wanted, so I used the PowerUp code and renamed it JumpUp, but it still doesn't work. I'm going to wait until next week to improve the JumpUp and change the new game screen as it still doesn't work, as I never got around to changing or looking at the code.

Wednesday, 16 March 2011

game development

Yo!

Today I'll be working on my start and game over screen. I'll be placing my crossbow into the screen. I'll also be working on my programming as well. I have now placed my duck, so that the arrows miss the player, but now I have come across another problem, the player can shoot and kill all enemies from ducking, losing no health. I now have to decide what to do with the player and duck, at the moment I'm thinking the player has to press down to duck, as of now the player just has to press down once and the duck function stays down. I did try to animate the duck so it stands after, but the animation kept looping making him stand, run and duck at the same time.

I've changed the game over screen, which now includes and title of the game.

With help, I had added my new game menu. I read their code for the menu and have added it to mine. I needed to add a static var newGameMenu:NewGameMenu; before adding some more code under my game's public function. This code was:
newGameMenu = new NewGameMenu ();
newGameMenu.x = 0;
newGameMenu.y = 0;
addChild(newGameMenu);
newGameMenu.visible=true; before adding an EventListener for the play button to the code to allow the play button to work. The only problem now is that the new game menu comes on but the game works behind the menu, making it complicated. My next task is to make the new game menu work before the game, not during the game.

Wednesday, 9 March 2011

assets

Yo!

Today I'm going to create the start and game over screen for my crossbow shooter.

I've changed my score font to Lucida Calligraphy, this font is being used for my subheading on my game and it suits the theme of the game. I've also changed my game a little bit, as now my mini boss' health bar now decucts at the right pase of my game, as they take five hits, the health bar decuces at 0.2 each hit.

I've now uploaded all my assets into my game. I've only got some little problems, one being the boss' health bar, as it decreases outside the bar.

Wednesday, 2 March 2011

Game Alpha develpoment

Yo!
I've still got problems with my mini boss and their health meter. I can now kill the mini boss, as I've cut his health down from 10 hits to 5, but his health bar is really slow at cutting down and is still visible even after he's defeated. The game is suppose to have five mini bosses before the final boss, but the mini boss only comes once and only regular enemies come. I'm still having problems when the player dies and the game over screen comes on, instead of everything stopping, the enemies reach a certain point and stop, while the mini boss keeps walking and the game doesn't restart properly, the game continues where the player left off, just starting the background and resetting the score, the enemies are where the player died.

I've just looked at the code from the shootorial, and I've fixed the game over code! So now everything stops including the mini boss, all I needed to do was add miniBossTimer.stop(); and powerUpTimer.stop();, I also found out I actually commented out

for(var i in EnemyShip.list)
{
EnemyShip.list[i].kill();
} after I removed the //, and retried the game, all the enemies and power ups stopped and the game restarted without any problems. Now I need to recode my mini boss, at the moment, I have used the code from the shootorial in my game, but now I'm going to read it through and fix my code.

I've managed to fix the code for my mini boss and my boss. The problem was due to my coding, there was little mistakes, like not putting them in the right order, writing the same code in different places. Going through the shootorial code has helped my coding and my game. Right now, my code is complete, with no real bad or stupid mistakes, now all I need to do is load my code into my new game and add my assets, I also need to create a new game screen, for my proper game.

I've now just done all the assets into my final game. I've converted them all into a PNG. With the assets and code completed, now all I need to find is sounds and music for my game, as well as create both start and game over screen. This image is off my game so far and the library, with all my enemies, bosses and minibosses as well as the character all in their movie clip with the same name as the code, ready for me to complete.
Hopefully next week, I can start getting the start and game over screen designed and ready to go!
Code left to do:
I really need to work on my score. All I need to do is change the font to make the code work, but that's it really on the code.