Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 55 additions & 6 deletions Loungeware/Loungeware.yyp

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions Loungeware/objects/noah_inflation_obj_hat/Create_0.gml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/// @description HERE










// Inherit the parent event
event_inherited();

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

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

61 changes: 61 additions & 0 deletions Loungeware/objects/noah_inflation_obj_mayor/Create_0.gml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@

button_press_goal = 5 + 2 * DIFFICULTY; // 15 good top difficulty, but too easy at 0
button_press_count = 0
number_of_clicks_text = "0/" + string(button_press_goal);

// Variables for updating his look
button_press_change_tracker = 0;


// Controls swapping his sprites as he grows
percentage_complete = button_press_count / button_press_goal;
number_of_times_he_changed = 0;
list_of_sprites = [
noah_inflation_spr_mayor_2,
noah_inflation_spr_mayor_3,
noah_inflation_spr_mayor_4
]
number_of_sprites = array_length(list_of_sprites)
percentage_until_sprite_change = 1 / number_of_sprites;

// Idle animation values
x_scale_change = 0.25;
y_scale_change = 0.2;
default_scale = 1;
scale_timer = 0;
idle_loop_duration = 0.35;
idle_animation_speed = 1 / (60 * idle_loop_duration);


var _spriteHeight1 = sprite_get_height(noah_inflation_spr_mayor_1);
var _spriteHeight2 = sprite_get_height(noah_inflation_spr_mayor_2);
var _spriteHeight3 = sprite_get_height(noah_inflation_spr_mayor_3);
var _spriteHeight4 = sprite_get_height(noah_inflation_spr_mayor_4);
// Scaling as you progress
list_of_grow_scale_components = [
_spriteHeight2 / _spriteHeight1 - 1 - 0.05,
_spriteHeight3 / _spriteHeight2 - 1 - 0.2,
_spriteHeight4 / _spriteHeight3 - 1,
0,
]
grow_scale_component = list_of_grow_scale_components[0];
scale = 1;
current_milestone_completion = 0;
milestone_increment = 1 / number_of_sprites;


microgame_won = false;
grunt = -1;

var _shakeDur = 1;
shake_timer_speed = 1 / (60 * _shakeDur)
shaking = false;
shake_magnitude = 30;
original_x = x;
original_y = y;
shake_timer = 0;





85 changes: 85 additions & 0 deletions Loungeware/objects/noah_inflation_obj_mayor/Step_0.gml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
if (noah_inflation_obj_pump.is_up) { // the pump is up
if (KEY_DOWN_PRESSED) {
sfx_play(noah_inflation_sfx_pump_down, 1, false);
button_press_count ++;
noah_inflation_obj_pump.is_up = false;
percentage_complete = button_press_count / button_press_goal;
number_of_clicks_text = string(button_press_count)
number_of_clicks_text += "/" + string(button_press_goal)
}
} else { // the pump is down
if (KEY_UP_PRESSED) {
sfx_play(noah_inflation_sfx_pump_up, 1, false);
noah_inflation_obj_pump.is_up = true;
}
}

// check if we won
if (!microgame_won and button_press_count == button_press_goal) {
microgame_won = true
shaking = true;
sfx_play(noah_inflation_sfx_fanfare);
sfx_play(noah_inflation_sfx_rip);
with(noah_inflation_par_parts) {
activate();
}
noah_inflation_obj_prompt.move = true;
noah_inflation_obj_prompt_arrows.move = true;
microgame_win()
}

// scale him up depending on how close to completion
if (percentage_complete >= percentage_until_sprite_change and number_of_times_he_changed < number_of_sprites) {

// Get next sprite
sprite_index = list_of_sprites[number_of_times_he_changed]
button_press_change_tracker = 0
number_of_times_he_changed++
// Play sound depending on stage of completion
switch(number_of_times_he_changed) {
case (1):
var _initialSnd = choose(noah_inflation_sfx_mayor_0, noah_inflation_sfx_mayor_0);
grunt = sfx_play(_initialSnd);
break;
case (2):
if (audio_is_playing(grunt)) {sfx_stop(grunt)}
grunt = sfx_play(noah_inflation_sfx_near_complete, 1, false);
break;
case (3):
if (audio_is_playing(grunt)) {sfx_stop(grunt)}
var _completeSnd = choose(noah_inflation_sfx_complete_0, noah_inflation_sfx_complete_1);
grunt = sfx_play(_completeSnd);
break;

}
grow_scale_component = list_of_grow_scale_components[number_of_times_he_changed];
// Update our percent goal
percentage_until_sprite_change = (number_of_times_he_changed + 1) / number_of_sprites;
}

// scale based on current milestone completion
current_milestone_completion = (percentage_complete - milestone_increment * (number_of_times_he_changed)) / milestone_increment;
scale = 1 + grow_scale_component * current_milestone_completion;





// Run the idle animation timer
scale_timer += idle_animation_speed;
if (scale_timer >= 1 or scale_timer <= 0) {
idle_animation_speed *= -1
}
// Do the idle animation with xscale and yscale
image_xscale = scale + scale_timer * x_scale_change;
image_yscale = scale - scale_timer * y_scale_change;

if (shaking) {
x = original_x + (1 - shake_timer)*random(shake_magnitude);
y = original_y + random(shake_magnitude);
shake_timer += shake_timer_speed;
if (shake_timer >= 1) {
shaking = false;
}
}

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

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

10 changes: 10 additions & 0 deletions Loungeware/objects/noah_inflation_obj_prompt/Create_0.gml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
timer = 0;
period_duration = 0.5
timer_speed = 1 / (60 * period_duration);
base_scale = 1;
scale = base_scale;
scale_grow_max = 0.2;

instance_create_depth(x, y, depth - 1, noah_inflation_obj_prompt_arrows);

move = false;
1 change: 1 addition & 0 deletions Loungeware/objects/noah_inflation_obj_prompt/Draw_0.gml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
draw_self();
18 changes: 18 additions & 0 deletions Loungeware/objects/noah_inflation_obj_prompt/Step_0.gml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/// @description HERE


scale = base_scale + abs(scale_grow_max * dsin(timer * 360));
image_xscale = scale;
image_yscale = scale;

timer += timer_speed;
if (timer >= 1) {
timer = 0;
}



if (move) {
x += 30;
}

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

Loading
Loading