Vector Flight

Engine

Game Maker Studio

Language

GML

Time-span

+600 uur

Dutch Game Award 2015

Best Student Game Design

Downloads

Samenvatting

Vector Flight is een topdown-endless-shooter waar je met local co-op samen met je vrienden cyberspace moet verlossen van een hardnekkig virus. Kies je eigen vliegtuig en kleur en begin je avontuur.
var vox ,voy ,vx ,vy ,vd ,tdir ,tdelta;
vox = argument[0]; //origin x
voy = argument[1]; //origin y
vx = argument[2]; //vertex x
vy = argument[3]; //vertex y
vd = argument[4]; //vertex direction

tdir = point_direction(vox,voy,vx,vy);
tdelta = point_distance(vox,voy,vx,vy);

tdir-=90;

if(argument_count==5)
    return draw_vertex(vox+cos(degtorad(tdir+vd))*tdelta,voy-sin(degtorad(tdir+vd))*tdelta);
else if(argument_count==7)
    return draw_vertex_color(vox+cos(degtorad(tdir+vd))*tdelta,voy-sin(degtorad(tdir+vd))*tdelta,argument[5],argument[6]);
else show_error("dsc_vertex: Argument_count = out of range",true);
    //---front qube---//
    rad = clamp(size[i]*4,minsize,maxsize+(cos(current_time/100)*4));
    //Fill
    draw_set_alpha(1);
    draw_set_color(make_color_hsv(color_get_hue(color[i]),color_get_saturation(color[i]),color_get_value(color[i])/10));
    draw_primitive_begin(pr_trianglefan);
    for(q=qrot[i]; q<360+qrot[i]; q+=90)
    {
        draw_vertex_color(ix+(cos(degtorad(q))*(cos(degtorad(30))*rad)),(iy-(rad/2))-(sin(degtorad(q))*(rad/2)),draw_get_color(),point_distance(ix+(cos(degtorad(q))*(cos(degtorad(30))*rad)),(iy-(rad/2))-(sin(degtorad(q))*(rad/2)),ix,iy)/rad)
    }
    draw_primitive_end();
    draw_primitive_begin(pr_trianglestrip);
    for(q=90+qrot[i]; q<450+qrot[i]; q+=90)
    {
        if(sin(degtorad(q))>=0.7) continue;
        {
            draw_vertex_color(ix+(cos(degtorad(q))*(cos(degtorad(30))*rad)),(iy-(rad/2))-(sin(degtorad(q))*(rad/2))+rad,draw_get_color(),point_distance(ix+(cos(degtorad(q))*(cos(degtorad(30))*rad)),(iy-(rad/2))-(sin(degtorad(q))*(rad/2))+rad,ix,iy)/rad);
            draw_vertex_color(ix+(cos(degtorad(q))*(cos(degtorad(30))*rad)),(iy-(rad/2))-(sin(degtorad(q))*(rad/2)),draw_get_color(),point_distance(ix+(cos(degtorad(q))*(cos(degtorad(30))*rad)),(iy-(rad/2))-(sin(degtorad(q))*(rad/2)),ix,iy)/rad);
        }
    }
    draw_primitive_end();
    
    //Lines
    draw_set_color(color[i]);
    draw_set_alpha(0.75);
    draw_primitive_begin(pr_linestrip);
    for(q=qrot[i]; q<=360+qrot[i]; q+=90)
    {
        draw_vertex(ix+(cos(degtorad(q))*(cos(degtorad(30))*rad)),(iy-(rad/2))-(sin(degtorad(q))*(rad/2)))
        if(sin(degtorad(q))<=0.7)
            draw_line(ix+(cos(degtorad(q))*(cos(degtorad(30))*rad)),(iy-(rad/2))-(sin(degtorad(q))*(rad/2)),ix+(cos(degtorad(q))*(cos(degtorad(30))*rad)),(iy-(rad/2))-(sin(degtorad(q))*(rad/2))+rad);
    }
    draw_primitive_end();
    draw_primitive_begin(pr_linestrip);
    for(q=90+qrot[i]; q<450+qrot[i]; q+=90)
    {
        if(sin(degtorad(q))>=0.7) continue;
            draw_vertex(ix+(cos(degtorad(q))*(cos(degtorad(30))*rad)),(iy-(rad/2))-(sin(degtorad(q))*(rad/2))+rad);
    }
    draw_primitive_end();
var angleA, angleB, dif, step;
angleA = argument[0]; //Origin Angle
angleB = argument[1]; //Target Angle
step = argument[2]; //Maximum Displacement

//If distance < Target
if(abs(angleB-angleA) <= step || abs(angleB-angleA) >= (360-step))
    angleA = angleB;
else //Else Move towards
{
    if (abs(angleB - angleA) > 180)
    {
        //Wrap
        if (angleB < angleA)
            angleB += 360;
        else angleB -= 360;
    }
    if(angleB > angleA)
        angleA += step;
    else if (angleB < angleA)
        angleA -= step;
}
return angleA;

Screenshots

Player Select
Menu
in-game
Vector Flight