Skip to content

Commit

Permalink
v1.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
mxple committed Sep 30, 2022
1 parent 52bc3f2 commit c4eb7fd
Show file tree
Hide file tree
Showing 22 changed files with 104 additions and 24 deletions.
2 changes: 1 addition & 1 deletion objects/game_controller/KeyPress_122.gml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
window_set_fullscreen(true);
window_set_fullscreen(!window_get_fullscreen());
10 changes: 10 additions & 0 deletions objects/o_arrow/Collision_o_player.gml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
if has_hit exit;
if o_player.hp < 0 exit;
if global.game_end exit;
if instance_place(x,y,o_player).do_hit == false exit;
has_hit = true;

Expand All @@ -7,5 +9,13 @@ if condition = CONDITIONS.BLEED {
}
o_player.hp -= damage * max(1,(1.25*sign(o_player.curse)));

if sprite_index = s_arrow_red {
o_gui.red_arrow_dmg += damage;
o_gui.curse_dmg += .25*sign(o_player.curse)*damage;
} else {
o_gui.blue_arrow_dmg += damage;
o_gui.curse_dmg += .25*sign(o_player.curse)*damage;
}

o_player.flash = 4;

1 change: 1 addition & 0 deletions objects/o_ghost_player/Step_2.gml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
exit;
1 change: 1 addition & 0 deletions objects/o_ghost_player/o_ghost_player.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions objects/o_gui/Create_0.gml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
red_arrow_dmg = 0;
blue_arrow_dmg = 0;
red_spike_dmg = 0;
blue_spike_dmg = 0;
bleed_dmg = 0;
curse_dmg = 0;
39 changes: 35 additions & 4 deletions objects/o_gui/Draw_64.gml
Original file line number Diff line number Diff line change
@@ -1,10 +1,41 @@
var c1 = #010101;
var c2 = #62E448;
var x2 = (o_player.hp/global.init_hp) * 69;
draw_rectangle_color(GUI_W/2 - 29, GUI_H/2 + 36 + (225*o_camera.offset), GUI_W/2 + 36,GUI_H/2 + 44 + (225*o_camera.offset),c1,c1,c1,c1,false);
draw_rectangle_color(GUI_W/2 - 30, GUI_H/2 + 37 + (225*o_camera.offset), GUI_W/2 - 30 + x2, GUI_H/2 + 43 + (225*o_camera.offset),c2,c2,c2,c2,false);
var x2 = (o_player.hp/global.init_hp) * 66;
draw_rectangle_color(GUI_W/2 - 30, GUI_H/2 + 33+ (225*o_camera.offset), GUI_W/2 + 36,GUI_H/2 + 41 + (225*o_camera.offset),c1,c1,c1,c1,false);
draw_rectangle_color(GUI_W/2 - 29, GUI_H/2 + 34 + (225*o_camera.offset), GUI_W/2 - 30 + x2, GUI_H/2 + 40 + (225*o_camera.offset),c2,c2,c2,c2,false);

draw_set_halign(fa_left);
draw_set_valign(fa_top);

draw_text_ext_transformed(10,10,"score: "+string(o_patience.frames),1,1000,.5,.5,0);
var c = c_white;
if o_patience.frames > 1800 c = c_lime;

draw_text_ext_transformed_color(10,10,"score: "+string(o_patience.frames),1,1000,.5,.5,0,c,c,c,c,1);
draw_text_ext_transformed(10,40,"fps: "+string(fps),1,1000,.5,.5,0);



if global.game_end {
var c1 = $000000;
draw_set_alpha(0.8);
draw_rectangle_color(GUI_W/2 - 300, GUI_H/2 - 400, GUI_W/2 + 300, GUI_H/2 + 400, c1,c1,c1,c1,false);
draw_set_alpha(1);

draw_sprite_ext(s_arrow_red,0,GUI_W/2 - 250, GUI_H/2 - 300,3,3,0,c_white,1);
draw_text_ext_transformed(GUI_W/2 - 200, GUI_H/2 - 310, string(red_arrow_dmg),1,1000,.5,.5,0);

draw_sprite_ext(s_arrow_blue,0,GUI_W/2 - 250, GUI_H/2 - 200,3,3,0,c_white,1);
draw_text_ext_transformed(GUI_W/2 - 200, GUI_H/2 - 210, string(blue_arrow_dmg),1,1000,.5,.5,0);

draw_sprite_ext(s_spike_red,0,GUI_W/2 - 250, GUI_H/2 - 100,3,3,0,c_white,1);
draw_text_ext_transformed(GUI_W/2 - 200, GUI_H/2 - 110, string(red_spike_dmg),1,1000,.5,.5,0);

draw_sprite_ext(s_spike_blue,0,GUI_W/2 - 250, GUI_H/2 - 0,3,3,0,c_white,1);
draw_text_ext_transformed(GUI_W/2 - 200, GUI_H/2 - 10, string(blue_spike_dmg),1,1000,.5,.5,0);

draw_text_ext_transformed(GUI_W/2 - 250, GUI_H/2 + 100, "bleed: " + string(bleed_dmg),1,1000,.5,.5,0);

draw_text_ext_transformed(GUI_W/2 - 250, GUI_H/2 + 200, "curse (amplified): " +string(curse_dmg),1,1000,.5,.5,0);

draw_text_ext_transformed(GUI_W/2 - 200, GUI_H/2 + 300, "Click anywhere to restart",1,1000,.5,.5,0);
}
1 change: 1 addition & 0 deletions objects/o_gui/o_gui.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
4 changes: 4 additions & 0 deletions objects/o_menu/Other_4.gml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
view_enabled = false;
view_visible[0] = false;

surface_resize(application_surface, 1288, 1008);
3 changes: 2 additions & 1 deletion objects/o_menu/o_menu.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion objects/o_patience/Step_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,6 @@ if reset_delay == 0 {

shoot_delay -= 1;
reset_delay -= 1;
frames += 1;
if !global.game_end {
frames += 1;
}
6 changes: 4 additions & 2 deletions objects/o_player/Draw_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,18 @@ if keyboard_check_pressed(ord("W")) or keyboard_check_pressed(ord("A")) or keybo
// animation speed
image_speed = spd/60;

image_xscale = 0.85;
image_yscale = 0.85;
// shaders etc
var texture = sprite_get_texture(sprite_index, image_index);
var pixelH = texture_get_texel_height(texture);
var pixelW = texture_get_texel_width(texture);
shader_set(shd_pixel_outline);
shader_set_uniform_f(shader_get_uniform(shd_pixel_outline, "texel"), pixelW, pixelH);
draw_sprite_ext(sprite_index, image_index, x,y, 1, 1, -1 * o_camera.rotation, c_white, image_alpha);
draw_sprite_ext(sprite_index, image_index, x,y, image_xscale, image_yscale, -1 * o_camera.rotation, c_white, image_alpha);
if flash {
shader_set(shd_flash);
shader_set_uniform_f(shader_get_uniform(shd_flash, "texel"), pixelW, pixelH);
draw_sprite_ext(sprite_index, image_index, x,y, 1, 1, -1 * o_camera.rotation, c_white, image_alpha);
draw_sprite_ext(sprite_index, image_index, x,y, image_xscale, image_yscale, -1 * o_camera.rotation, c_white, image_alpha);
}
shader_reset();
20 changes: 11 additions & 9 deletions objects/o_player/Step_0.gml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// death
if hp < 0 {
global.game_end = true;
exit;
}

check_input();

// find direction of movement
Expand All @@ -16,7 +22,6 @@ if place_meeting(x,y,o_void_water) {
hp -= 2;
}


// move in the x-direction
hsp = lengthdir_x(vel, dir);
hsp_remaining = abs(hsp);
Expand Down Expand Up @@ -54,14 +59,11 @@ if !place_meeting(x,y+sign(vsp)*vsp_remaining,o_wall) {
// bleeding and curse
if bleed > 0 {
bleed = max(0, bleed - 1);
hp -= 0.3
if hp > 1 {
hp -= 0.3;
o_gui.bleed_dmg += 0.3;
}
}

curse = max(0, curse - 1);
flash = max(0, flash - 1);


// death
if hp < 0 {
game_restart();
}
flash = max(0, flash - 1);
1 change: 1 addition & 0 deletions objects/o_player/Step_2.gml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hp = clamp(hp, -1, infinity);
1 change: 1 addition & 0 deletions objects/o_player/o_player.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions objects/o_room_controller/Other_4.gml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ if global.mode == MODES.GROUP {
spd = global.init_spd;
walk_speed = 8 * (4 + 5.6 * (global.init_spd / 75)) / 60;
}
with instance_create_layer(129,64,"player",o_ghost_player) {
with instance_create_layer(139,64,"player",o_ghost_player) {
angle = 180;
spd = global.init_spd;
walk_speed = 8 * (4 + 5.6 * (global.init_spd / 75)) / 60;
Expand All @@ -26,4 +26,4 @@ with instance_create_layer(0,0,"controllers",o_patience) {
}
instance_create_layer(0,0,"controllers",o_fog);

game_set_speed(30,gamespeed_fps);
global.game_end = false;
6 changes: 6 additions & 0 deletions objects/o_room_controller/Step_0.gml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
if global.game_end {
if mouse_check_button(mb_any) {
room_goto(menu);
global.game_end = false;
}
}
1 change: 1 addition & 0 deletions objects/o_room_controller/o_room_controller.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion objects/o_shade/Create_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ shoot = function(_shot) {
speed = .5;
damage = _shot.damage;
lifetime = 260;
condition = _shot.damage;
condition = _shot.condition;
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion objects/o_shade/Draw_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@ var pixelH = texture_get_texel_height(texture);
var pixelW = texture_get_texel_width(texture);
shader_set_uniform_f(shader_get_uniform(shd_pixel_outline, "texel"), pixelW, pixelH);

draw_sprite_ext(sprite_index,image_index,x,y,1.35,1.35,-1*o_camera.rotation,c_white,1);
image_xscale = 1.3;
image_yscale = 1.3;
draw_sprite_ext(sprite_index,image_index,x,y,image_xscale,image_yscale,-1*o_camera.rotation,c_white,1);
shader_reset();
10 changes: 9 additions & 1 deletion objects/o_spike/Collision_o_player.gml
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
if has_hit exit;
if o_player.hp < 0 exit;
if global.game_end exit;
if instance_place(x,y,o_player).do_hit == false exit;
has_hit = true;
if condition = CONDITIONS.PIERCE {
o_player.hp -= damage + max(1,(1.25*sign(o_player.curse)));
o_gui.blue_spike_dmg += damage;
o_gui.curse_dmg += .25*sign(o_player.curse)*damage;
} else {
o_player.hp -= max(damage - o_player.def, damage / 10) * max(1,(1.25*sign(o_player.curse)));
o_player.hp -= max(damage - o_player.def, damage / 10) * max(1,(1.25*sign(o_player.curse)));
o_gui.red_spike_dmg += max(damage - o_player.def, damage / 10);
o_gui.curse_dmg += .25*sign(o_player.curse)*max(damage - o_player.def, damage / 10);
o_player.curse = 180;
}


o_player.flash = 4;
2 changes: 1 addition & 1 deletion options/windows/options_windows.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c4eb7fd

Please sign in to comment.