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;
}
}
}

Wednesday, 12 October 2011

Reviewing Adobe Flash

[The task is to write a 700 word (at the minimum) review on Adobe Flash, here is my review]


Okay now I am going to be reviewing Adobe Flash, first of all the main section of Flash is the ActionScript section. First of all ActionScript two is the basic version, it is easy to pick up and learn but it is slower and more basic, limiting the amount you can do, while on the other hand, ActionScript three is harder to use but it has a better range of things to do, it is quicker and more efficient. The point of ActionScript with gaming is to basically tell the objects what to do, bring up a score system, interact with objects and people, also a click system. ActionScript also has pre-made codes buried in the code snippets.

Flash also has the ability to import bitmap graphics and movies, allowing for easy design for work. You can also take images from Photoshop and import them into flash for quick and easy use. Vector graphics also make an appearance here, you practically cannot be able to ruin the images, as they can be resized without problem, not a single pixel can show, also the size of the files are quite small. The tools in flash are very useful and easy to use, many of the commands are simple, stuff like select and move are simple but come in very handy, and stuff like changing the opacity which can be a bit more complex but really does help.

The range of animations that can be created through flash can have a phenomenal effect on the players for the games created. You can get all sorts of animations, some of my favourites are the collisions, and you can make a variety of different animations from a small white crackling flash or a POW sign to an explosion with all sorts of red, oranges and yellows gushing out. Also based off Asteroids you see the ship fall apart when it collides into an asteroid, the ship literally splits apart. I also like the addition of sound which helps the player focus more, makes them feel like they are playing the game more and helps the player, say you got hit without noticing, then a sound goes off, this way the sound addition can really help. Also flash has the ability to modify the sounds with either fade in or fade out sounds, which is a big help for big explosions with a fade out sound.

Another good thing about flash is the fact you can save objects into a section called the library, which can be used with scripting, to call out an object and put it back in. An example of this is when your character just spawns, the script is telling the character to jump in, and again with scripting, which sets the co-ordinates for where your character may spawn. When the character dies, the script tells the character to jump back in the library, which disappears from the stage. Also another example of this is when your character shoots a bullet or a beam, the script tells the library to move the bullet across the screen from the co-ordinates of where the player is, into a straight line, then disappears either, when it collides into an enemy/object, or when the bullet or beam travels a certain distance, then this is when the script tells the bullet/beam to jump back into the library, ready to be used again.

Flash uses layers and frames. With the frames, you can store all the scripting and information on one frame, this way the whole programme loads quicker and is easier to use. The layers can be used for positioning objects and selecting certain objects, these can also be locked to avoid any mistakes when editing everything.

One thing I like about flash is the ability to jump into one of your objects and edit them on the inside; this means you can add stuff onto the image without worrying about catching any of your other objects. Also flash has the ability to jump through to other files and urls to upload scores, stats, points, you name it, anything that can be compared to with other players online. This can be very helpful for making a game for the competitive players.

Another useful thing that flash can do is add many types of helpful components such as a scroll pane, pop ups and speech bubbles with helpful tips. The pop ups can also be used to announce the player has achieved something, a chat window with a CPU character or like an inventory section to view items that have been picked up at various stages throughout the flash game.

Overall I do think flash is an amazing program, it has many unique actions, easy to use and fun. I can say that flash is going to be one of my favourite game creating programs. I do think the ActionScript can be a bit complicated at first but once used to it, the main problems is forgetting the occasional brackets or forgetting to capitalise certain words due to case sensitivity. Overall though I do recommend this program for anyone to use, new at gaming or professional. Sure people may think it is flash messing up with all the coding, heck even I blamed flash several times but all you have to do is go back through everything, check the brackets are all in order, make sure everything is in the right cases and there you go, all sorted and ready to work. I do love the ability about jumping into the objects and editing them from the inside, I feel that this ability can really help when a mistake has been spotted while the page is littered full of objects that are in position and ready to use. This method is a really clever and easy way to edit. The use of vector graphics or adding in your own work from different programs is a huge help with choosing the method on how to create the game with certain based graphic styles.

[End of review, word count, 1,005] 

Thursday, 6 October 2011

More coding with movements

Today I have done more coding for moving objects. Here is what I have done


var ship:MovieClip=new Ship ();                         These lines tell flash to look in the Library for something
ship.x=275;                                                 called ship and places it in the co-ordinates listed.
ship.y=200;
addChild(ship);


import flash.events.Event;
import flash.events.KeyboardEvent;

var moveRight:Boolean = false                        These scripts tell flash to keep the commands off.
var moveLeft:Boolean = false
var moveUp:Boolean = false
var moveDown:Boolean = false

stage.addEventListener(Event.ENTER_FRAME, moveSquare)

function moveSquare(event:Event) {

if(moveRight==true) {                             all these commands tell flash to turn the commands on if the
square.x+=3;                                           keys are being pressed down.
}
if(moveLeft==true) {
square.x-=3;
}
if(moveUp==true) {
square.y-=3;
}
if(moveDown==true) {
square.y+=3;
}
}
stage.addEventListener(KeyboardEvent.KEY_DOWN,pressKey);
stage.addEventListener(KeyboardEvent.KEY_UP,stopSquare);

function stopSquare(myevent:KeyboardEvent):void{              These codes are turning off the command
moveLeft=false                                                                    when the buttons arent pressed.
moveRight=false
moveUp=false
moveDown=false

}

function pressKey(myevent:KeyboardEvent):void{
if(myevent.keyCode==Keyboard.RIGHT){
moveRight=true;
}
if(myevent.keyCode==Keyboard.LEFT){
moveLeft=true;
}
if(myevent.keyCode==Keyboard.UP){
moveUp=true;
}
if(myevent.keyCode==Keyboard.DOWN){
moveDown=true;
}



}

Wednesday, 5 October 2011

Flash Game Plans

What I am going to do is base my flash game similar to Asteroids. It will be a similar move and shoot game but you cannot go off the screen but the enemies can. Also instead of asteroids I am going to do some sort of enemy. These are going to fly around the screen and you got to shoot them, as you progress through the amount of enemies you kill, more enemies will spawn and they will move faster. I will keep the speed set on a certain level though to avoid the impossible levels and same with the enemies. The main character is going to be a simple triangle but I haven't decided what the enemies will look like yet. Keep checking as I will update this post when more ideas have popped into my head.





















This is what my ship will look like, a nice basic design.





















And this is a close up of the ship. I am going to make it shoot, rotate, move and gain power ups in this game. I haven't decided on a name yet though.