These skeches are from my first game idea which later i abandoned.
And here is same skeches for the curent maze game.
flashforgames
Monday, 19 March 2012
Wednesday, 7 December 2011
Adobe flash report
Adobe Flash
One of the things that make flash what it is now is vector graphics. Vector doesn’t use pixels it uses points, lines, polygons and shapes. Due to this vector images or animations can be scaled up or scaled down and stay not pixelated this is really useful when creating big posters.
Besides vector graphics you can also import bitmap images as well as video recording. This comes in handy when creating animation in vector graphics and you are using bitmap or video as a reference. Bitmap can also be used in for flash video games for example background image or character. Creating a game using just bit map images is hard when trying to keep games sizes to minimum.
ActionScript is object orientated language which enables user interaction. Flash has prescripted elements for ease of using ActionScript2 even though its slow its easy to learn. ActionScript3 on the other hand is harder to learn but is more efficient. Flash also has tools like compiler which is really useful when your script doesn’t work, it checks script and tells you where you might have made a mistake. Code snippets is also a great help if you need a simple line of code which you forgot it s also very useful for beginners.
Just like PhotoShop Flash has a range of image adjustment tools and filters like glow,blur, drop shadow and other filters that can be applied to movie clips. This allows you to create realistic objects in flash using vector with no need of importing bitmap from Photoshop.
With flash you can create and show animations for game cut scenes or effects in the game for example object collision, explosion. Animations also makes game look more interactive and adds to player enjoyment.
Flash can incorporate sounds which nicely accompanies animations for example object collision or fired bullet. You can also do basic sound editing with your imported sounds. Sounds like animations are really important for players enjoyability of game.
After you create or import an object in Flash you can store it in library and then reuse it many times by dragging it on stage or using actionscript to do that for you instead of creating each object individually, this way you efficiently using memory. And by editing object in library changes you made to the object will apply to all of its copies.
Flash can also access files on internet, meaning if you have a game that uses high score system you can create score boards of all players that gets displayed online.
Flash is similar to other major programs like Illustrator or Photoshop. If you already know how to use Photoshop or illustrator you will have an easier time understanding flash interface. Also similarities between programs allows to transfer objects to flash with ease this saves a lot of ime as you don’t need to use converters.
In flash every single movie clip inside has independent timeline so animating multiple objects at the same time much easier also this makes duplicating, changing, swaping or just removing animations inside movie clip so much easier and with some help of ActionScript you can create the whole game or animation and contain it in a single frame.
Use of layers is really common around today’s programs, but that doesn’t mean its any less usefull. In flash they are essential for depth positioning of a game, animation or even a website. In some works you might be using tens or even hundreds of layers and with such huge amount of layers the ability to put all the layers in folders is really useful for efficient workflow.
Flash also have useful components for ease of use for example scroll plane, progress bar, check box, slider and even a FLV player which you can use to play or stream videos. By having big selection of helpful components flash becomes easy and fast way of creating a websites.
All in all I think flash is a great program for some and a nightmare for others but everyone can agree that flash can be used to create a wide range of material from a simple slideshow or a web banner to a video game, website or animated movie.
Wednesday, 16 November 2011
Idea
After completing flash games research I had to come up with an idea for flash game and then I remembered a game called Missile Game 3D in which you control a missile flying through tunnel in first person view with obstacles that you have to avoid.
In my game I wanted to have 3D feeling that Missile Game has. So I decided to mix three games in one: Missile Game 3D, Space Invaders and Asteroids. The place where game will take place will be space and maybe some deserted planets. The objective of the game would be to get as far as you can by avoiding asteroids rogue planets or other hostile ships. I would like to add some story to the game with animations if there will be enough time left till dead line.
After some experimentation with idea I decided to change my game in order to make it to the dead line. After some thinking i decided to create a maze game. The maze would have mooving parts and the main character would be a cube shaped character. The style of the game will be partialy inspiried by movie tron this will be wisible in games visuals.
In my game I wanted to have 3D feeling that Missile Game has. So I decided to mix three games in one: Missile Game 3D, Space Invaders and Asteroids. The place where game will take place will be space and maybe some deserted planets. The objective of the game would be to get as far as you can by avoiding asteroids rogue planets or other hostile ships. I would like to add some story to the game with animations if there will be enough time left till dead line.
After some experimentation with idea I decided to change my game in order to make it to the dead line. After some thinking i decided to create a maze game. The maze would have mooving parts and the main character would be a cube shaped character. The style of the game will be partialy inspiried by movie tron this will be wisible in games visuals.
collision detection script
after creating two cubes and adding instance names cube1 and cube2 added this code
stage.addEventListener(Event.ENTER_FRAME, checkhit);
//movement
function checkhit(myevent:Event):void {
cube1.x+=3
cube2.x-=3
//
if (cube1.hitTestPoint(cube2.x,cube1.y,true)) {
cube2.alpha=.3;
}
}
also if you change cube2.alpha=.3; with cube2.play(); and after colision will play what ever is inside that movieclip (cube2) .
stage.addEventListener(Event.ENTER_FRAME, checkhit);
//movement
function checkhit(myevent:Event):void {
cube1.x+=3
cube2.x-=3
//
if (cube1.hitTestPoint(cube2.x,cube1.y,true)) {
cube2.alpha=.3;
}
}
also if you change cube2.alpha=.3; with cube2.play(); and after colision will play what ever is inside that movieclip (cube2) .
code to bring object from library to stage
first I created a shape and converted it to symbol with Export for action script ticked. And the deleted shape from stage and used this code
code:
import flash.display.MovieClip;
var ship:MovieClip = new Ship ();
ship.x=275
ship.y=200
addChild(ship);
code:
import flash.display.MovieClip;
var ship:MovieClip = new Ship ();
ship.x=275
ship.y=200
addChild(ship);
smoother movement
score:
import flash.events.KeyboardEvent;
var moveRight:Boolean = false
var moveLeft:Boolean = false
var moveUp:Boolean = false
var moveDown:Boolean = false
stage.addEventListener(Event.ENTER_FRAME,moveShip);
function moveShip(event:Event) {
if (moveRight==true){
ship.x+=3;
}
if (moveLeft==true){
ship.x-=3;
}
if (moveUp==true){
ship.y-=3;
}
if (moveDown==true){
ship.y+=3;
}
}
//listens to keyboard being pressed
stage.addEventListener(KeyboardEvent.KEY_DOWN, pressKey);
stage.addEventListener(KeyboardEvent.KEY_UP, stopShip);
//if not pressed set move ship to false.
function stopShip(myevent:KeyboardEvent):void{
moveLeft=false;
moveRight=false;
moveUp=false;
moveDown=false;
}
//if pressed set move ship to true.
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;
}
}
import flash.events.KeyboardEvent;
var moveRight:Boolean = false
var moveLeft:Boolean = false
var moveUp:Boolean = false
var moveDown:Boolean = false
stage.addEventListener(Event.ENTER_FRAME,moveShip);
function moveShip(event:Event) {
if (moveRight==true){
ship.x+=3;
}
if (moveLeft==true){
ship.x-=3;
}
if (moveUp==true){
ship.y-=3;
}
if (moveDown==true){
ship.y+=3;
}
}
//listens to keyboard being pressed
stage.addEventListener(KeyboardEvent.KEY_DOWN, pressKey);
stage.addEventListener(KeyboardEvent.KEY_UP, stopShip);
//if not pressed set move ship to false.
function stopShip(myevent:KeyboardEvent):void{
moveLeft=false;
moveRight=false;
moveUp=false;
moveDown=false;
}
//if pressed set move ship to true.
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;
}
}
movement with keys
code for movement
import flash.events.Event;
stage.addEventListener(KeyboardEvent.KEY_DOWN, moveShip);
//kompas klausos klavieturos down paspaudimo
function moveShip (myevent:KeyboardEvent):void {
if (myevent.keyCode==Keyboard.RIGHT) {
ship.x+=10;
ship.rotation=90;
}
if (myevent.keyCode==Keyboard.LEFT) {
ship.x-=10;
ship.rotation=270;
}
if (myevent.keyCode==Keyboard.UP) {
ship.y-=10;
ship.rotation=0;
}
if (myevent.keyCode==Keyboard.DOWN) {
ship.y+=10;
ship.rotation=180;
}
}
//key code=button name --> <-- judejimas x y asyje. ruller padeda. rotation tiesiog laipsniai
stage.addEventListener(Event.ENTER_FRAME,bounds);
function bounds(event:Event) {
if(ship.x>=550) {
ship.x=0
}
if(ship.x<0) {
ship.x=549
}
}
// nustatai kur stage ribos/boundarys ir jei pasiekia boundarys gali nustatatyt kur object teleportuosis.
import flash.events.Event;
stage.addEventListener(KeyboardEvent.KEY_DOWN, moveShip);
//kompas klausos klavieturos down paspaudimo
function moveShip (myevent:KeyboardEvent):void {
if (myevent.keyCode==Keyboard.RIGHT) {
ship.x+=10;
ship.rotation=90;
}
if (myevent.keyCode==Keyboard.LEFT) {
ship.x-=10;
ship.rotation=270;
}
if (myevent.keyCode==Keyboard.UP) {
ship.y-=10;
ship.rotation=0;
}
if (myevent.keyCode==Keyboard.DOWN) {
ship.y+=10;
ship.rotation=180;
}
}
//key code=button name --> <-- judejimas x y asyje. ruller padeda. rotation tiesiog laipsniai
stage.addEventListener(Event.ENTER_FRAME,bounds);
function bounds(event:Event) {
if(ship.x>=550) {
ship.x=0
}
if(ship.x<0) {
ship.x=549
}
}
// nustatai kur stage ribos/boundarys ir jei pasiekia boundarys gali nustatatyt kur object teleportuosis.
Subscribe to:
Comments (Atom)
