Skip to content

Commit

Permalink
0.90
Browse files Browse the repository at this point in the history
  • Loading branch information
Skirlez committed Jul 6, 2024
1 parent 9b2281d commit ed69196
Show file tree
Hide file tree
Showing 43 changed files with 895 additions and 72 deletions.
2 changes: 1 addition & 1 deletion objects/obj_ev_add_statue_window/Create_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ function create_base_buttons(mode) {
empty_text : "Branefuck Program",
txt : add_properties.pgm,
allow_alphanumeric : false,
exceptions : ".+-[]><?0123456789#",
exceptions : ".+-[]><?0123456789",
char_limit : 260,
opened_y : 72,
base_scale_x : 8,
Expand Down
16 changes: 9 additions & 7 deletions objects/obj_ev_after_erase/Draw_0.gml
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
if !surface_exists(erasing_surface)
erasing_surface = surface_create(224, 144)
surface_set_target(erasing_surface)
draw_clear(c_black)
draw_clear_alpha(c_black, 0)
var surface_x = x - room_width / 2
var surface_y = y - room_height / 2

var t = start_time - time
draw_set_color(c_white)

draw_set_alpha(outer_circle_alpha)
draw_circle(112, 72, outer_circle_size, true)
draw_circle(112, 72, outer_circle_size - 1, true)
draw_circle(112, 72, outer_circle_size + 1, true)
draw_circle(x - surface_x, y - surface_y, outer_circle_size, true)
draw_circle(x - surface_x, y - surface_y, outer_circle_size - 1, true)
draw_circle(x - surface_x, y - surface_y, outer_circle_size + 1, true)
draw_set_alpha(1)

if t < 60 {
draw_circle(112 + irandom_range(-2, 2), 72 + irandom_range(-2, 2), max(dsin(t * 3) * 8, 1), false)
draw_circle(x + irandom_range(-2, 2) - surface_x, y + irandom_range(-2, 2) - surface_y, max(dsin(t * 3) * 8, 1), false)
}
else {
else if !grube {

draw_set_alpha((t - 60) / 60)
draw_set_font(global.ev_font)
Expand All @@ -35,4 +37,4 @@ else {
}

surface_reset_target()
draw_surface(erasing_surface, 0, 0)
draw_surface(erasing_surface, surface_x, surface_y)
5 changes: 5 additions & 0 deletions objects/obj_ev_after_erase/Step_0.gml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
time--;

if time == 0 {
if grube {
instance_destroy(id)
exit
}
audio_play_sound(asset_get_index("snd_voidrod_place"), 10, false)
audio_stop_sound(global.goes_sound)
room_goto(asset_get_index("rm_ev_editor"))
Expand Down
4 changes: 3 additions & 1 deletion objects/obj_ev_after_erase/obj_ev_after_erase.yy

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

12 changes: 2 additions & 10 deletions objects/obj_ev_copy_button/Other_10.gml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,6 @@ event_inherited()
if (lvl == noone)
exit
var str = export_level(lvl);
try {
var file = file_text_open_write(global.levels_directory + generate_level_save_name() + "." + level_extension)
file_text_write_string(file, str);
file_text_close(file)
ev_notify("Copied!")
}
catch (e) {
show_debug_message(e)
ev_notify("Couldn't copy level!")
}
clipboard_set_text(str)
ev_notify("Copied to clipboard!")

67 changes: 67 additions & 0 deletions objects/obj_ev_credits/Create_0.gml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
event_inherited()

grube_mode = false
grube_button = instance_create_layer(200, 30, "WindowElements", asset_get_index("obj_ev_executing_button"), {
txt : "Grube",
base_scale_x : 1.2,
base_scale_y : 0.9,
count : 0,
func : function () {
var grube = instance_create_layer(200 + irandom_range(-20, 20), y + 42, "Grube", asset_get_index("obj_ev_grube"))
grube.window = window;
array_push(window.grubes, grube)
count++;
if count == 5 {
window.grube_mode = true;

if global.compiled_for_merge {
audio_sound_gain(global.music_inst, 0, 1000)
global.music_inst = noone
ev_play_music(asset_get_index("msc_stg_extraboss"))
audio_sound_gain(global.music_inst, 0, 0)
audio_sound_gain(global.music_inst, 1, 1000)

}
else {
audio_sound_gain(global.music, 0, 1000)
global.music = noone
ev_play_music(asset_get_index("msc_stg_extraboss"))
audio_sound_gain(global.music, 0, 0)
audio_sound_gain(global.music, 1, 1000)
}

instance_create_layer(mouse_x, mouse_y, "Plucker", asset_get_index("obj_ev_plucker"))

with (window) {
var t = instance_create_layer(200, 72, "Textbox", asset_get_index("obj_ev_textbox"), {
opened_x : 112,
opened_y : 72,
txt : "Stack the grubes!\nLeft click to grab, right click to destroy. "
+ "You can scroll with the scroll wheel or the up/down keys."
+ "\nCAREFUL: Grubes under too much pressure may be destroyed...\n"
+ "Try to keep a modest amount."
,
layer_num : 0,
allow_deletion : false,
char_limit : 0,
})
add_child(t)
}
}


}
})
add_child(grube_button)

max_stack = 0;
grubes = []
dense_check_timer_max = 2;
dense_check_timer = dense_check_timer_max;

highest_stack = global.highest_grube_stack;
timer_hold_highest_stack_max = 300;
timer_hold_highest_stack = 0;
potential_new_highest_stack = 0;

scroll_accel = 0;
86 changes: 86 additions & 0 deletions objects/obj_ev_credits/Draw_0.gml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@

if grube_mode {
draw_set_font(global.ev_font)
draw_set_halign(fa_center)
draw_set_valign(fa_top)
var highest_str = string(highest_stack) + "\n"
if potential_new_highest_stack != 0 {
highest_str += "CHECKING STABILITY\n"
repeat ((global.editor_time / 3) % 3 + 1) {
highest_str += "."
}
}

var camera_y = camera_get_view_y(view_camera[0]);
draw_set_color(c_black)
ev_draw_rectangle(20, camera_y + 5, 25, camera_y + 30, false)
draw_set_color(c_white)
var elevation = camera_y / -5700

var slider_height = 5;
var slider_y = lerp(30 - slider_height, 5, elevation)


ev_draw_rectangle(20, camera_y + slider_y, 25, camera_y + slider_y + slider_height, false)

var txt = "STACK THE GRUBES\nSTACK: " + string(max_stack) + "\nHIGHEST: " + highest_str;
var size = 0.5

var gy = camera_y + 5;

draw_set_color(c_black)
draw_text_transformed(112 + size, gy, txt, size, size, 0)
draw_text_transformed(112 - size, gy, txt, size, size, 0)
draw_text_transformed(112, gy + size, txt, size, size, 0)
draw_text_transformed(112, gy - size, txt, size, size, 0)

draw_set_color(c_white)
draw_text_transformed(112, gy, txt, size, size, 0)


draw_sprite(asset_get_index("spr_ev_tools"), 0, mouse_x, mouse_y)

exit
}

draw_set_font(global.ev_font)
draw_set_halign(fa_left)
draw_set_valign(fa_top)




var long_text =
@"Development:
Skirlez
KyuuMetis
Pyredrid - Branefuck functions
Meepster99 - GBAStranger export
gullwingdoors - Pencil Icon
juliascythe - Helping with eventually creating the Grube

Music Credits:
Sunday - crappyblue - astra_jam (...ad astra)
Monday - Skirlez - Monsday (Greedy Groove)
Tuesday - 8bitavo - Tail's Lullaby (Tail, Affection Air, Void)
Wednesday - gooeyPhantasm - Blossom (Dancing lesson, Blossom chime)
Friday - gooeyPhantasm - Endless Void (Voided)
Thursday/Saturday - eebrozgi - Stealie Feelies (slowed down)

";




var draw_y = 5

var size = 0.35
draw_set_color(c_black)
draw_text_transformed(4 + size, draw_y, long_text, size, size, 0)
draw_text_transformed(4 - size, draw_y, long_text, size, size, 0)
draw_text_transformed(4, draw_y + size, long_text, size, size, 0)
draw_text_transformed(4, draw_y - size, long_text, size, size, 0)

draw_set_color(c_white)
draw_text_transformed(4, draw_y, long_text, size, size, 0)

5 changes: 5 additions & 0 deletions objects/obj_ev_credits/Other_5.gml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
if grube_mode {
audio_stop_sound(global.menu_music)
global.highest_grube_stack = highest_stack
ev_save();
}
121 changes: 121 additions & 0 deletions objects/obj_ev_credits/Step_0.gml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
event_inherited();
if !grube_mode
exit

var ypos = camera_get_view_y(view_camera[0])
if mouse_wheel_down() || ev_get_vertical_held() == 1 {
ypos += 6 + scroll_accel
scroll_accel += 0.25
}
else if mouse_wheel_up() || ev_get_vertical_held() == -1 {
ypos -= 6 + scroll_accel
scroll_accel += 0.25
}
else {
scroll_accel = 0
}

ypos = clamp(ypos, -5700, 0)

camera_set_view_pos(view_camera[0], camera_get_view_x(view_camera[0]), ypos)
grube_button.y = ypos + 30
var cache = ds_map_create();

function find_grubes_above(grube, cache) {
static grube_object = asset_get_index("obj_ev_grube")

if !ds_map_exists(cache, grube) {
var above_grube = noone
with (grube) {
var list = ds_list_create()
instance_place_list(x, y - 16, grube_object, list, true);
var arr = ds_list_to_array(list);
ds_list_destroy(list);

for (var i = 0; i < array_length(arr) && above_grube == noone; i++) {
if (arr[i].y > grube.y)
continue;
if (abs(arr[i].y - grube.y) < 12)
continue;
if (arr[i].death_timer != -1)
continue;
above_grube = arr[i]
}


}

if above_grube == noone || above_grube.y > grube.y {
ds_map_add(cache, grube, 0)
return 0;
}

var above_above_value = find_grubes_above(above_grube, cache);
ds_map_add(cache, grube, above_above_value + 1)
return above_above_value + 1;
}
return ds_map_find_value(cache, grube);

}
max_stack = 0
for (var i = 0; i < array_length(grubes); i++) {
var grube = grubes[i];
if !instance_exists(grube) {
array_delete(grubes, i, 1)
i--;
continue;
}
var value = find_grubes_above(grube, cache) + 1
if value > max_stack
max_stack = value;
}


ds_map_destroy(cache);

dense_check_timer--;
if dense_check_timer <= 0 && array_length(grubes) != 0 {
dense_check_timer = dense_check_timer_max;
var random_grube = grubes[irandom_range(0, array_length(grubes) - 1)]
if random_grube.death_timer == -1 {

var max_close_grubes = 8;
var close_dist = 30;
var close_grubes = 0;

for (var i = 0; i < array_length(grubes); i++) {
var grube = grubes[i]
if grube == random_grube
continue;
if point_distance(grube.x, grube.y, random_grube.x, random_grube.y) < close_dist
close_grubes++;
}
if close_grubes >= max_close_grubes {
for (var i = 0; i < array_length(grubes); i++) {
if grubes[i] == random_grube {
array_delete(grubes, i, 1)
break;
}
}
random_grube.die()
}
}
}

if max_stack > highest_stack && max_stack > potential_new_highest_stack {
potential_new_highest_stack = max_stack
timer_hold_highest_stack = timer_hold_highest_stack_max;
}
if potential_new_highest_stack != 0 {
timer_hold_highest_stack--;
if timer_hold_highest_stack <= 0 {
highest_stack = potential_new_highest_stack;
potential_new_highest_stack = 0;
}
if max_stack < potential_new_highest_stack {
potential_new_highest_stack = 0;
timer_hold_highest_stack = 0;
}

}

Loading

0 comments on commit ed69196

Please sign in to comment.