flash games have a reputation of being short and fun. The graphics in flash games tend to be quite simple, this is good because there is not to get distracted by when play the game. also the controls are basic to make the game play as easy as possible. most flash games use a three life system, when you loose three live it game over and then you need to start again. this is good for quick game play.
Flash for Game
Wednesday, 30 November 2011
Wednesday, 23 November 2011
scrolling background across
//set up variables.
var blockArray:Array = new Array();
var bGspeed:Number = 6
var gameover:Boolean = true;
var BgLeft:Boolean = false;
var BgRight:Boolean = false;
// set up and run a game control function.
stage.addEventListener(Event.ENTER_FRAME, gameControl);
function gameControl(myevent:Event):void
{
if (BgLeft == true)
{
if (bGround.x <-((bGround.width/2)-bGspeed))
{
bGround.x = 0;
}
else
{
bGround.x -= bGspeed;
}
}
if (BgRight == true)
{
if (bGround.x >= 0)
{
bGround.x = -( bGround.width/2)+bGspeed;
}
else
{
bGround.x += bGspeed;
}
}
}
// listen to keyboard being pressed.
stage.addEventListener(KeyboardEvent.KEY_DOWN, moveBg);
stage.addEventListener(KeyboardEvent.KEY_UP, stopBg);
// if not pressed set move bGround to false.
function stopBg(myevent:KeyboardEvent):void
{
if (myevent.keyCode == Keyboard.RIGHT)
{
BgRight = false;
}
if (myevent.keyCode == Keyboard.LEFT)
{
BgLeft = false;
}
}
// if pressed set move bGround to true.
function moveBg(myevent:KeyboardEvent):void
{
if (myevent.keyCode == Keyboard.RIGHT)
{
BgRight = true;
}
if (myevent.keyCode == Keyboard.LEFT)
{
BgLeft = true;
}
}
Thursday, 17 November 2011
Flash clock
import flash.utils.Timer;
import flash.events.TimerEvent;
var seconds:int=0
var min:int=0
var myTimer:Timer = new Timer(1000);
myTimer.addEventListener(TimerEvent.TIMER, runOnce);
myTimer.start();
function runOnce(event:TimerEvent):void {
seconds++
if (seconds<10){
clock.text="0"+String(min)+":"+"0"+String(seconds);
}
if (seconds>9){
clock.text="0"+String(min)+":"+String(seconds);
}
if (seconds>=60){
min++
seconds=0
}
}
import flash.events.TimerEvent;
var seconds:int=0
var min:int=0
var myTimer:Timer = new Timer(1000);
myTimer.addEventListener(TimerEvent.TIMER, runOnce);
myTimer.start();
function runOnce(event:TimerEvent):void {
seconds++
if (seconds<10){
clock.text="0"+String(min)+":"+"0"+String(seconds);
}
if (seconds>9){
clock.text="0"+String(min)+":"+String(seconds);
}
if (seconds>=60){
min++
seconds=0
}
}
Flash Timer
import flash.utils.Timer;
import flash.events.TimerEvent;
var time:int=300
var myTimer:Timer = new Timer(1000, 300);
myTimer.addEventListener(TimerEvent.Timer, runOnce);
myTimer.start();
function runOnce(event:TimerEvent):void {
time--
lee.text=String(time);
}
import flash.utils.Timer;
import flash.events.TimerEvent;
var time:int=0
var myTimer:Timer = new Timer(10, 3000);// 1 second
myTimer.addEventListener(TimerEvent.TIMER, runOnce);
myTimer.start();
function runOnce(event:TimerEvent):void {
time++
clock.text=String(time);
}
Wednesday, 9 November 2011
Wednesday, 19 October 2011
game aspects
This is a screen shot of the game i am using for reference. I have come over a couple of problems during the make of my flash game. For example when to cars move from lane to lane the angle of the car view changes, this will be to difficult to do with out a 3D model. So I think I am going to make to game from a top view to make to game easier to make. Also I am going to make it 2D birds eye view to give it a retro feel. For the game I am going to make a scoring system go up during the time that you play, so the longer you last the more point you gain.
Subscribe to:
Comments (Atom)







