Saturday, 14 January 2012

Evaluation

The aim for this unit was to learn how to use Action Scripting in Flash to be able to develop my own Flash game. The class worked on this using Action Script 3

We begun by researching into existing Flash games, analysing the differences between each other and how their gameplay makes them uniquely made. This helped me realised the complexity of some of the Flash games that have been developed. A great site for Flash animations and games is Newgrounds, which people of all professions can upload their animations and games to. This was a great way to see different levels of development in all sorts of genre of games. This helped decide what kind of game I wanted to create, what its gameplay would be based on and what mechanics will be used.

Next we begun to develop simple game scripting in the style of the classic "Asteroids" game. This would give me an understanding how Flash is used for game development through the use of Action Scripting and tools. The coding given to us through demo would then be there for me to use for my own game or allow to me to tweak and modify the coding to fit my game and its gameplay mechanics. My game varied quite a lot from the Asteroids game, and required a lot of tweaking to the existing coding taught through demo's for example, instead of having objects simple fall down the stage, I instead had the objects spawning randomly outside the stage area and then proceed to follow the player's controlled object. Because of the amount of experimentation and unique coding introduced into my game, this involved a lot of trial and error and ending up eating a lot of time designing my game

Tuesday, 29 November 2011

Flash As An IDE

(More to add)
Flash is a great integrated development environment
Flash is a multimedia programme that is used to create animations, video, flash games and interactive web pages.
Flash is also frequently used to create advertisements which can be found on websites with banner advertisements.

There are many advantages of using Flash programme, especially for animation or flash game development.
One advantage of using Flash with the Adobe Creative Suite is that any creations made in programmes like Photoshop or Illustrator can easily be transferred into Flash. For example graphics made in Illustrator can be easily transferred into Flash for a game you're creating. However Flash itself has tools to create simple objects and image manipulation tools to edit them, some examples could be shape tools, text and free transform tool which I feel is quite an important tool as you can reshape an image for example to the size you desire.
Vector images which is what Illustrator is used to create, 

Games developed in Flash have been very popular and this is often a choice for people who want to create games and be possible game developers as flash is a good start for new beginners and a great way to understand how to utilise their games and how game play works. Flash games work heavily on scripting with coding with ActionScript, the most recent version of this is As3 which is more efficient than it's predecessors.

Sound can also be incorporated into flash which can be used to add music or sound effects to a game. Sound effects can also be coded to only play at certain points or triggered by a certain event, for example a gun shot sound effect will only play when the fire key is pressed in a game.

Objects like images for a character or enemies can be stored in the flash library which allows the image to be reused again, this makes for efficient use of memory.

Like other Adobe software like Illustrator and Photoshop, Flash can also use layers which can allow more depth to be put into work, and keep things organized to a certain layer making it easier to organize and maintain

Coding can be used on just a single frame, so an large portion or possible an entire animation, game or other flash production could be done entirely on a single frame.

Through the use of scripting, MovieClips and Flash library, certain events can be triggered in an animation or game and then be brought from the Flash library onto the stage, for example a bullet from a gun, once the button is pressed to fire the gun, the bullet image can be brought on stage from the library and then the animation plays with the bullet moving across the stage and finally disappearing off stage once finished. This will then be repeated everytime the fire button is pressed. This is a great way to organise an animation or event into one area in the library which will then only be brought into action when called upon by scripting.   

Wednesday, 23 November 2011

Flash Game Development

The development of my game has so far been productive but quite difficult at times. But so far I feel I am on track to making the game to how I planned. I have been experimenting and learning new coding for my script that hasn't been taught throughout our class demo's. This has made a few problems while trying to piece coding together which has slowed down development a little, but overall it hasn't completely stalled and therefore the development is still going successfully.


Here is an example of how I managed to create coding so the zombies will spawn outside of the stage and then proceed to follow the Survivor(blue dot in the image).

Here is a screen grab of my experimentation of my attempt to make a gun for the survivor which became attached to the Survivor and therefore would stay on the Survivor when it would move. The coding in the script menu is an example of making the guns rotation, this is an example of how complex and complicated some of the coding can be. This allows the black gun to rotate to face where ever the mouse cursor is.

Thursday, 17 November 2011

Flash timer

var time:int=300

var myTimer:Timer = new Timer(1000, 300); //This is making the clock countdown one second from the clock, the 1000 represents 1 second and the 300 is for how many times it will countdown a second.
myTimer.addEventListener(TimerEvent.TIMER, runOnce);
myTimer.start();

function runOnce(event:TimerEvent):void {
time--
clock.text=String(time);
}

Thursday, 3 November 2011

Scripting

var blockArray:Array=new Array();

var Ship:MovieClip = new ship();
addChild(Ship);

Ship.startDrag(true)
Mouse.hide();


for(var i:int = 0; i < 15; i++) {
//Will duplicate the cube 15 times
var cube:MovieClip = new Box();
//This is looking for a new box in the libary
cube.x=Math.random()*550
//This is loading new cubes randomly on the x axis
cube.y=Math.random()*400
//This is loading new cubes randomly on the y axis, this works alongside the x axis too
addChild(cube);
//This is bringing a duplicate of the cube from the libary onto the stage

blockArray[i]=cube;

}

stage.addEventListener(Event.ENTER_FRAME, checkhit);
//Listen to the stage on every frame
function checkhit(myevent:Event):void {
for (var i:int = 0; i < 15; i++) {
//Creates a loop to create blocks 15 times.
if (blockArray[i].hitTestPoint(mouseX,mouseY,true)){
//If any of the cubes get hit by the mouse in it's x or y direction, true means the i from blockarray is following the cubes, so the cube that is hit by the mouse will cause the transparency(alpha) down.
blockArray[i].alpha=.3;

}

blockArray[i].y+=3;

if (blockArray[i].y>450){
   blockArray[i].y=-50;
   blockArray[i].x=Math.random()*550;

}
}

}


Wednesday, 19 October 2011

Flash game design

My idea for a flash game revolves around a zombie survival. This involves the player's character(The Survivor) having to survive wave after wave of increasingly difficult zombies that continue to chase the Survivor around the stage. The Survivor has to evade the zombies by moving around the stage and killing them off by shooting them. There will be multiple zombies on the screen at once. I have yet to decide whether the punishment for coming in contact with a zombie will be instant death or just rapidly deplete a health bar. I am also deciding whether the game will allow you to acquire new and better weapons. Much of what I would like to add to the gameplay will depend upon the time it takes to create the more necessary parts of my game, as I would be learning lots of new coding that haven't been taught to me through demo's.