Pablo’s Revenge

Engine

Game Maker Studio

Language

GML

Time-span

72 uur

Game Jam

Ludum Dare #33

Downloads

Samenvatting

Pablo is terug... niet dat hij ooit weg was, en dit keer is hij uit op wraak. Speel met Pablo door een wereld vol 'helden' en versla ze met je uitermate sterke lasers. Met als onderwerp 'You are the Monster' en maar 72 uur om een project in elkaar te zetten heb ik mij vooral bezig gehouden met balancing. Naarmate de uren echter verstreken heb ik me ook gefocust op het auditieve en visuele gedeeltes van het spel. Uiteindelijk heeft het zich uit laten groeien tot iets groters.
//Shadow
draw_set_alpha(0.5);
draw_set_color(c_black);
draw_ellipse(x+12,y+48,x+44,y+64,false);
draw_set_alpha(1);
//Body
if(DeathTimer != -1) //On-Death
{
    draw_sprite_ext(spr_hero_body,round(x/8)%4,x+4,y+16,1,1,0,make_color_rgb(255,DeathTimer*10,DeathTimer*10),sin(degtorad(DeathTimer*9)));
    draw_sprite_ext(spr_hero_pants,round(x/8)%4,x+4,y+16,1,1,0,make_color_rgb(255,DeathTimer*10,DeathTimer*10),sin(degtorad(DeathTimer*9)));
    draw_sprite_ext(head,eye,x+8,y-20,1,1,0,make_color_rgb(255,DeathTimer*10,DeathTimer*10),sin(degtorad(DeathTimer*9)));
}
else if(DamageTimer != 0) //On-Damage
{
    draw_sprite_ext(spr_hero_body,round(x/8)%4,x+4,y+16,1,1,0,make_color_rgb(255,100,100),1);
    draw_sprite_ext(spr_hero_pants,round(x/8)%4,x+4,y+16,1,1,0,make_color_rgb(255,100,100),1);
    draw_sprite_ext(head,eye,x+8,y-20,1,1,0,make_color_rgb(255,100,100),1);
}
else //Default
{
    draw_sprite_ext(spr_hero_body,round(x/8)%4,x+4-round((cos((current_time/200)+breath)-1)),y+18-(round((sin((current_time/200)+breath)-1))*2),1,1,0,pant,1);
    draw_sprite_ext(spr_hero_pants,round(x/8)%4,x+4,y+20,1,1,0,shirt,1);
    draw_sprite_ext(head,eye,x+4-round((cos((current_time/200)+breath)-1)*2),y-12-(round((sin((current_time/200)+breath)-1))*3),1,1,0,c_white,1);
}
if(mouse_check_button_pressed(mb_left) && position_meeting(mouse_x,mouse_y,self) && DeathTimer == -1)
{
    //Damage
    part_particles_create(global.ps_main,mouse_x,mouse_y,global.pt_blood,4+irandom(4));
    DamageTimer = 6;
    if(class == 1 || global.tanks == 0)
    {
        if(global.curse == 0)//Check for curse
        {
            if(global.level - level <= -5) 
            {
                hp= clamp(hp-global.damage*0.25,0,maxhp);
                scr_ShowEffect(x+24,y+24,ceil(-global.damage*0.25),30,c_red,1);
            }
            else if(global.level - level <= -3) 
            {
                hp= clamp(hp-global.damage*0.5,0,maxhp);
                scr_ShowEffect(x+24,y+24,ceil(-global.damage*0.5),30,c_red,1);
            }
            else
            {
                hp= clamp(hp-global.damage,0,maxhp);
                scr_ShowEffect(x+24,y+24,ceil(-global.damage),30,c_red,1);
            }
        }
        else
        {
            if(global.level - level <= -5) 
            {
                hp= clamp(hp-global.damage*0.125,0,maxhp);
                scr_ShowEffect(x+24,y+24,ceil(-global.damage*0.125),30,c_red,1);
            }
            else if(global.level - level <= -3) 
            {
                hp= clamp(hp-global.damage*0.25,0,maxhp);
                scr_ShowEffect(x+24,y+24,ceil(-global.damage*0.25),30,c_red,1);
            }
            else
            {
                hp= clamp(hp-global.damage*0.5,0,maxhp);
                scr_ShowEffect(x+24,y+24,ceil(-global.damage*0.5),30,c_red,1);
            }
        }        
        global.vibrate = 2;
    }
    else scr_ShowEffect(x+24,y+24,"Blocked!",30,c_red,1);
    
    //On Death
    if(hp == 0)
    {
        DeathTimer = 10;
        if(global.level - level >= 3 && global.level - level < 5) 
        {
            global.exper += round(max(level*0.75,2*power(1.05,level-11),power(1.09,level)))*0.25;
            scr_ShowEffect(obj_player.x+24,obj_player.y+24,"+"+string(round(max(level*0.75,2*power(1.05,level-11),power(1.09,level))*0.25)),30,make_color_rgb(100,0,200),2);
        }
        else if(global.level - level <= -5) 
        {
            global.exper += round(max(level*0.75,2*power(1.05,level-11),power(1.09,level)))*0.5;
            scr_ShowEffect(obj_player.x+24,obj_player.y+24,"+"+string(round(max(level*0.75,2*power(1.05,level-11),power(1.09,level))*0.5)),30,make_color_rgb(100,0,200),2);
        }
        else if(global.level - level < 5) 
        {
            global.exper += round(max(level*0.75,2*power(1.05,level-11),power(1.09,level)));
            scr_ShowEffect(obj_player.x+24,obj_player.y+24,"+"+string(round(max(level*0.75,2*power(1.05,level-11),power(1.09,level)))),30,make_color_rgb(100,0,200),2);
        }
        global.vibrate = 5;
    }
}
if(DeathTimer < 0 && hp == 0)
    event_perform(ev_other,ev_user0);

DamageTimer = clamp(DamageTimer-1,0,6);
DeathTimer = clamp(DeathTimer-0.5,-1,10);

if(class != 1 && global.tanks != 0)
    part_particles_create_color(global.ps_main,x+irandom(64),y+48+irandom(16),global.pt_effect,c_blue,irandom(2))
    
var i, j=0;
for(i=0; i<sprite_get_number(spr_sidemenu); i++)
{
    if(i == 5 || (round(global.hp) <= 0 && i!= 6)) continue;
    
    if(scr_hover(0,80+(32*j),40+(hover[j]*(string_width(text[i])+12)),104+(32*j)))
    {
        hover[i] = clamp(hover[i]+0.1,0,1);
        if(mouse_check_button_pressed(mb_left))
        {
            switch(i)
            {
                case(0):
                room_goto(global.zoner);
                audio_stop_music();
                audio_stop_all();
                break;
                
                case(1):
                room_goto(rm_map);
                break;
                
                case(2):
                if(ToggleStats)
                    ToggleStats = false;
                else ToggleStats = true;
                break;
                
                case(3):
                room_goto(rm_story);
                audio_stop_music();
                audio_stop_all();
                break;
                
                case(4):
                if(global.music)
                    {global.music = false; audio_stop_music()}
                else 
                    {global.music = true; audio_play_music(snd_menu,true); audio_music_gain(0,0); audio_music_gain(1,1000)}
                break;
                
                case(6):
                game_end();
                break;
                
                default:
                break;
            }
        }
    }
    else hover[i] = clamp(hover[i]-0.1,0,1);
    
    j++;
}

Screenshots

Menu
Map
Story
Pablo's Revenge