GameStone Gradius Home World Dark Style GHW

Blank Gradius

Blank Gradius | Player Animations | Stages

Player Animations

I've started with Gradius Gaiden sprites as they have lots of details and are still pixel based.

Player Movements - Up, Down, Left and Right

My 8 way movement GML script also stops you flying off the edges of the screen.

This script has the ship flying at one speed only (5 pixels).

Step Event - obj_vv

// 8 Way movement script

if keyboard_check(vk_up)
{
if y>15
{
y-=5;
}
}

}if keyboard_check(vk_down)
{
if y<room_height-15
{
y+=5;
}
}

if keyboard_check(vk_left)
{
if x>30
{
x-=5;
}
}

if keyboard_check(vk_right)
{
if x<room_width-40
{
x+=5;
}
}

Up and Down Animation

Vic Viper is made up of 9 frames, frame 4 being the flying along frame

Create Event - obj_vv

// Up and Down animation

image_index=4; // First frame displayed
image_speed=0; // Animation Speed

Step Event - obj_vv

This script pans the ship up and down when the Up or Down keys are pressed.

// Up and Down animation

if keyboard_check(vk_down)
{
if image_index<8 image_index+=1/4;
}
else if image_index>4 image_index-=1/4;

if keyboard_check(vk_up)
{
if image_index>0 image_index-=1/4;
}
else if image_index<4 image_index+=1/4;

Vic Viper Up Frames Down Frames Flying Frames Flame Ships Light Frames

PS Gradius Gaiden
PS Gradius Gaiden

4 4 1 4 5

Ships Lights

This script cycles the light colours through the 8 frames and also pans the lights animation with the ship when you fly up and down.

Create Event - obj_vv_light

// Up and down animation

image_index=4; // First frame displayed
image_speed=0; // Animation Speed

// Ships lights colour cycle variable

var_light=1;

// Ships lights RGB codes

var_light1=make_color_rgb(49,0,0); // 01 - brown
var_light2=make_color_rgb(132,0,0); // 02 - dark red
var_light3=make_color_rgb(222,74,0); // 03 - dark orange
var_light4=make_color_rgb(255,123,0); // 04 - orange
var_light5=make_color_rgb(255,181,0); // 05 - yellow
var_light6=make_color_rgb(255,123,0); // 06 - orange
var_light7=make_color_rgb(222,74,0); // 07 - dark orange
var_light8=make_color_rgb(132,0,0); // 08 - dark red

Step Event - obj_vv_lights

// Sets the light on top of vv sprite

obj_vv_light.x=obj_vv.x-0;
obj_vv_light.y=obj_vv.y-0;

// Ships light script

if var_light=1
{
image_blend=var_light1;
var_light+=1;
}
else if var_light=2
{
image_blend=var_light2;
var_light+=1;
}
else if var_light=3
{
image_blend=var_light3;
var_light+=1;
}
else if var_light=4
{
image_blend=var_light4;
var_light+=1;
}
else if var_light=5
{
image_blend=var_light5;
var_light+=1;
}
else if var_light=6
{
image_blend=var_light6;
var_light+=1;
}
else if var_light=7
{
image_blend=var_light7;
var_light+=1;
}
else if var_light=8
{
image_blend=var_light8;
var_light-=7;
}

// Up and Down light animation

if keyboard_check(vk_down)
{
if image_index<8 image_index+=1/4;
}
else if image_index>4 image_index-=1/4;

if keyboard_check(vk_up)
{
if image_index>0 image_index-=1/4;
}
else if image_index<4 image_index+=1/4;

Ships Flame

The flame has four frames of animation and should be at the back of the ship.

Create Event - obj_vv_flame

// Flame animation speed of 0.7 frames per second

image_index=0;
image_speed=0.7;

Step Event - obj_vv_flame

// Sets the flame to the back of the ship

obj_vv_flame.x=obj_vv.x-31; // Sets the flame 31 pixels behind the vv sprite
obj_vv_flame.y=obj_vv.y+0;

 

Ships Shot

Working but not quite happy with it.

Ships Options

Not yet implemented

 

[T O P]

Games | Cameo | Art Work | Multimedia | Cheats | Emulation | Downloads | Forums | Links | Contact


Gradius Home World Created 26th July 1997 © 1997 - 2008 GameStone
Database MySQL/PHP Scripts by GameStone
上、上、下、下、左、右、左、右、B、A
All trademarks and copyrighted material are the property of their respective owners