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
40 changes: 38 additions & 2 deletions Loungeware/Loungeware.yyp

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions Loungeware/objects/noah_cheat_obj_chalkboard/Create_0.gml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/// @description Change sprite based on difficulty
image_index = DIFFICULTY - 1;




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

25 changes: 25 additions & 0 deletions Loungeware/objects/noah_cheat_obj_meter/Create_0.gml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/// @description Init Meter and Mashing Tracking

input_count = 0; // how many button presses have been made
meter_fill = 0; // ranges from 0 to 1
max_fill_width = sprite_get_width(noah_cheat_spr_meter_scribble);
fill_bar_height = sprite_get_height(noah_cheat_spr_meter_scribble);
var _difficultyIncrement = 4;
input_goal = 15 + (DIFFICULTY - 1) * _difficultyIncrement;
mashing_duration = 0; // track how long the player has been mashing
mashing_cooldown = 0.2; // the time in seconds that must elapse with no input to exit the mashing state
mashing_cooldown_timer = 0;
currently_mashing = false; // whether the player is mashing

game_active = true; // simple game state manager
game_result_win = false; // outcome of game

init_x = x;
init_y = y;

noah_cheat_scr_shake = function()
{
var _shakeAmp = 3;
x = init_x + random_range(-_shakeAmp, _shakeAmp);
y = init_y + random_range(-_shakeAmp, _shakeAmp);
}
8 changes: 8 additions & 0 deletions Loungeware/objects/noah_cheat_obj_meter/Draw_0.gml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/// @description Draw Meter & Fill

// draw the paper meter background
draw_self();

// draw the progress bar
var _width = max_fill_width * meter_fill;
draw_sprite_part(noah_cheat_spr_meter_scribble, 0, 0, 0, _width, fill_bar_height, x, y);
46 changes: 46 additions & 0 deletions Loungeware/objects/noah_cheat_obj_meter/Step_0.gml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/// @description Handle mashing

/// handle mashing and meter fill if game hasn't been won or lost yet
if (game_active)
{
// handle input
if (KEY_DOWN_PRESSED)
{
input_count ++;
input_count = clamp(input_count, 0, input_goal);
currently_mashing = true;
mashing_cooldown_timer = mashing_cooldown;
}

// run timers
if (mashing_cooldown_timer > 0)
{
mashing_cooldown_timer -= delta_time / 1000000; // decrement seconds
}
else
{
currently_mashing = false;
mashing_cooldown_timer = 0;
}

meter_fill = input_count / input_goal;
}


// check for win
if (meter_fill == 1)
{
game_active = false;
game_result_win = true;
microgame_win();
}

if (currently_mashing and game_active)
{
noah_cheat_scr_shake();
}
else
{
x = init_x;
y = init_y;
}
38 changes: 38 additions & 0 deletions Loungeware/objects/noah_cheat_obj_meter/noah_cheat_obj_meter.yy

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

11 changes: 11 additions & 0 deletions Loungeware/objects/noah_cheat_obj_particle/Create_0.gml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/// @description Insert description here
// You can write your code in this editor


rotation = random(20);
dir = choose(-1, 1);
gravity = 1;
speed = 5 + random(5);
direction = random_range(45, 135);
image_xscale = 0.25 + random(0.5);
image_yscale = image_xscale;
11 changes: 11 additions & 0 deletions Loungeware/objects/noah_cheat_obj_particle/Step_0.gml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/// @description Insert description here
// You can write your code in this editor

image_angle += rotation * dir;
if (y > room_height)
{
instance_destroy();
}



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

4 changes: 4 additions & 0 deletions Loungeware/objects/noah_cheat_obj_prompt/Step_0.gml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
if (KEY_DOWN)
{
instance_destroy();
}
36 changes: 36 additions & 0 deletions Loungeware/objects/noah_cheat_obj_prompt/noah_cheat_obj_prompt.yy

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

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


music_loop = microgame_music_start(noah_cheat_bgm_scribbling_1, 1, true);

intense_music_layer = sfx_play(noah_cheat_bgm_scribbling_2, 0, true);
fade_time = 0.01 * 1000;

final_sfx_played = false;

pencil_scratch_len = audio_sound_length(noah_cheat_sfx_scratching_pencil);
pencil_sound = noone;
49 changes: 49 additions & 0 deletions Loungeware/objects/noah_cheat_obj_sound/Step_0.gml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/// @description Insert description here
// You can write your code in this editor

if (noah_cheat_obj_meter.game_active)
{
var _layerGain = audio_sound_get_gain(intense_music_layer);
if (noah_cheat_obj_meter.currently_mashing)
{

if (_layerGain < 1)
{
microgame_sfx_set_gain(intense_music_layer, 1, fade_time);
}
}
else
{
if (_layerGain > 0)
{
microgame_sfx_set_gain(intense_music_layer, 0, fade_time);
}
}
}
else
{
if (!final_sfx_played)
{
sfx_stop(intense_music_layer, 0);
microgame_music_stop();
if (noah_cheat_obj_meter.game_result_win)
{
sfx_play(noah_cheat_sfx_victory, 1, false);
}
else
{
sfx_play(noah_cheat_sfx_fail_teacher, 1, false);
}
final_sfx_played = true;
}
}

//// Pencil sfx on button press
//if (KEY_DOWN_PRESSED)
//{
// var _trackPos = random(pencil_scratch_len);
// var _pencilSnd = audio_play_sound(noah_cheat_sfx_scratching_pencil, 1, false, 1, _trackPos);
// audio_sound_gain(_pencilSnd, 0, 0.5 * 1000);
//}


34 changes: 34 additions & 0 deletions Loungeware/objects/noah_cheat_obj_sound/noah_cheat_obj_sound.yy

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

8 changes: 8 additions & 0 deletions Loungeware/objects/noah_cheat_obj_student/Other_7.gml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
if (sprite_index == noah_cheat_spr_student_lose)
{
image_index = image_number - 4; // replay effect
}




Loading
Loading