Thursday, 12 January 2012

Evaluation

Right, so now I have done the research on flash games. I have done research by looking into the mechanics of flash games, I have played flash games and I have also recreated certain parts of games such as movement and shooting just to test out. Some of the main games I have been researching is Asteroids, Super Smash Flash 2 and Pacman. Asteroids is a simple birds eye view shooting game, you just move with the arrows and shoot with the space bar. Avoid asteroids and blow them up with the occasional UFO. Super Smash Flash 2 is a more complicated fighting game which is set on a side scroll view where two-four characters fight it out on a stage, increasing damage and knocking out your opponent. Finally Pacman is simple, only uses the arrow buttons for movement and collect all the dots without getting hit. I reckon I could have done more research but I am happy with the amount I have done.

Next I have managed to do my games, both are in the Asteroids style, but this time, you have to avoid the falling objects, this is easily done by moving right and left, but as time progresses, the objects speed up. I do think I could have done better with more practise, the game is just so basic really. I have spent alot of time making the background through Photoshop which was nice to do. The rest such as the ship, life icons and enemies had to be basic due to making them on flash.

The game is functional and easy to pick up, I have put in alot of time into this game but I do feel like I am lacking alot from it. I am happy with what I have done though. If I had flash at home I would be doing tutorials at home and improving my skills. Apart from that though I am happy with my progress within the making of flash games and am happy to do more of it again.

Thursday, 24 November 2011

bullet

function mouseclickHandler(e:Event):void {
shootBullet();
}


function shootBullet() {

var bullet:MovieClip = new Bullet();
bullet.x = Ship.x;
bullet.y = Ship.y;


addChild(bullet);

bullet.addEventListener(Event.ENTER_FRAME,moveBullet);
}


function moveBullet(e:Event):void {
e.target.y -= 5;

if (e.target.y <= -10) {

e.target.removeEventListener(Event.ENTER_FRAME, moveBullet);
removeChild(MovieClip(e.target));
}


}

function keydownHandler(e:KeyboardEvent):void{
if (e.keyCode == Keyboard.SPACE) {
shootBullet();
}
}

stage.addEventListener(Event.ENTER_FRAME, checkhit);
function checkhit(myevent:Event) :void {
for (var i:int = 0; i < 15; i++) {
if (blockArray[i].hitTestPoint(mouseX,mouseY,true)) {
blockArray[i].alpha=.3;
Ship.play();
}

Wednesday, 9 November 2011

Flash Games research

I have been researching about flash games over the past few months, one game in particular is a flash game called Asteroids. To play this game, you need to avoid getting hit by the asteroids and space ships. You defend yourself by breaking apart the asteroids with your gun and shooting down the space ships, when you clear the area, you advance to the next level where everything gets harder. You lose a life when you have been hit. You have a total of three lives. You earn a life when your score exceeds 10,000 points. The controls are quite good, you move forward with the up arrow, you rotate left and right with the left and right arrow keys and you shoot with the space bar. The ship as a slight drift after you have been moving which shows more reality about playing a game in space. All the graphics are basic, the ship is a basic triangle which has an exploding animation when hit. Also when moving you can see a flame shoot out from the ship to show the rocket booster. Overall I think this is a great and addicting flash game which was made a long time ago and still remains fun. I am hoping to make a game similar to this just so I can take one step forward in the gaming world.



Wednesday, 19 October 2011

Game artwork

Now here, I am going to be putting all the designs into this post, this will be updated everytime i finish a design.

Ship






Bullet







Life Icon






Background



















Others to come.

Checklist for coding

I am going to be updating this post everytime I have accomplished something, here is the list of what I got and what I need to do.


Codes

Got:
Movement
Array
Attach Library
Collision
Score

Need:
Rotate left and right with arrow keys and move with the up key
Explosion coding
Need to make objects disappear and reappear after getting hit
Lives


Designs

Got:

Ship
Bullet
Life Icon
Background

Need:

Enemies

Thursday, 13 October 2011

Collision

After that we have done some collision work, this is the coding we have done.


stage.addEventListener(Event.ENTER_FRAME, checkhit);
function checkhit(myevent:Event) :void {

cube1.x+=3       //cube1 goes at the speed of three to the right
cube2.x-=3        //cube2 goes at the speed of three to the right

if (cube1.hitTestPoint(cube2.x,cube2.y,true)) {       //if cube1 and cube2 collide, cube1 fades
cube2.alpha=.3;
}
}

Array

Now we have been using the array script, here is the coding and what it does.


var blockArray:Array=new Array();
//create an array called block array


for (var i:int = 0; i <15; i++) {    // This tells that i = 0, and if i is less than 15, then 15 of the object is created.
var cube:MovieClip = new box ();     //this takes box from the library and calls its actions as cube.
cube.x=Math.random()*400      //this spawns cube on a random number on the x axis
cube.y=Math.random()*400      // this spawns the cube on a random number on the y axis at the same time
addChild(cube);


blockArray[i]=cube;
//i is the number and keeps adding until the limit above which is 15

}

stage.addEventListener(Event.ENTER_FRAME, checkhit);
//listens to command
function checkhit(myevent:Event) :void {
for (var i:int = 0; i < 15; i++) {
//create a loop
if (blockArray[i].hitTestPoint(mouseX,mouseY,true)) {
//check if any of the cubes get hit by the mouse in either x direction or y direction, it is a hit.
blockArray[i].alpha=.3;
}
}
}