Skip to content

Commit

Permalink
Final
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandveech committed Aug 14, 2024
1 parent 28f54f1 commit b6523ee
Show file tree
Hide file tree
Showing 67 changed files with 675 additions and 52 deletions.
11 changes: 10 additions & 1 deletion Loungeware/Loungeware.yyp

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

13 changes: 7 additions & 6 deletions Loungeware/objects/sandveech_bg_obj_arm/Create_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,17 @@
arm_speed = 0;
min_arm_speed = 0;
max_arm_speed = 8;
arm_randx = 0;
arm_randy = 0;
acceleration = 0.09;
held_item = noone;
near = noone;
item = noone;

grab = function() {
var _near = instance_nearest(x, y, sandveech_bg_obj_item)
var _item = instance_place(x, y, sandveech_bg_obj_item);

if (_item) {
_near.isGrabbed = true;
held_item = _near;
if (item) && (near) {
near.isGrabbed = true;
held_item = near;

sprite_set(HAND_SPRITE.GRAB);
state_set(HAND_STATE.GRAB);
Expand Down
15 changes: 13 additions & 2 deletions Loungeware/objects/sandveech_bg_obj_arm/Step_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,17 @@
decelerate();
}

arm_randx = 0;
arm_randy = 0;

if (state_get() == HAND_STATE.GRAB) && (held_item != noone) {
arm_randx = irandom_range(-1, 1);
arm_randy = irandom_range(-1, 1);
}

// out of bounds prevention
xx = clamp(xx, 24, room_width - 24);
yy = clamp(yy, 24, room_height - 16);
xx = clamp(xx, 24, room_width - 24) + arm_randx;
yy = clamp(yy, 24, room_height - 16) + arm_randy;

// smoother hand movement
x = lerp(x, xx, 0.3);
Expand All @@ -28,6 +36,9 @@

#region gamemplay

near = instance_nearest(x, y, sandveech_bg_obj_item);
item = instance_place(x, y, sandveech_bg_obj_item);

// grab item
if (KEY_PRIMARY_PRESSED) {
if (state_get() == HAND_STATE.FREE && held_item == noone) {
Expand Down
37 changes: 37 additions & 0 deletions Loungeware/objects/sandveech_bg_obj_bbq/sandveech_bg_obj_bbq.yy

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

22 changes: 19 additions & 3 deletions Loungeware/objects/sandveech_bg_obj_game/Create_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,30 @@

#region initialize

enum ITEM {
BBQ,
BUN,
CHEESE,
KETCHUP,
LETTUCE,
MAYO,
ONION,
PATTY,
PICKLE,
TOMATO
}

item_list = [
sandveech_bg_obj_bbq,
sandveech_bg_obj_buns,
sandveech_bg_obj_lettuce,
sandveech_bg_obj_cheese,
sandveech_bg_obj_tomato,
sandveech_bg_obj_ketchup,
sandveech_bg_obj_lettuce,
sandveech_bg_obj_mayo,
sandveech_bg_obj_onion,
sandveech_bg_obj_patty
sandveech_bg_obj_patty,
sandveech_bg_obj_pickle,
sandveech_bg_obj_tomato
];

order_list = [];
Expand Down
12 changes: 6 additions & 6 deletions Loungeware/objects/sandveech_bg_obj_game/Draw_0.gml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
for (var i = 0; i < array_length(order_list); i++) {
draw_text(room_width / 2 + 32, room_height / 2 + 16 * i, object_get_name(order_list[i]));
}
//for (var i = 0; i < array_length(order_list); i++) {
// draw_text(room_width / 2 + 32, room_height / 2 + 16 * i, object_get_name(order_list[i]));
//}

for (var i = 0; i < array_length(plate_list); i++) {
draw_text(room_width / 2 - 220, room_height / 2 + 16 * i, object_get_name(plate_list[i]));
}
//for (var i = 0; i < array_length(plate_list); i++) {
// draw_text(room_width / 2 - 220, room_height / 2 + 16 * i, object_get_name(plate_list[i]));
//}
37 changes: 37 additions & 0 deletions Loungeware/objects/sandveech_bg_obj_game/Draw_64.gml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
if (TIME_REMAINING_SECONDS > 2) {
for (var i = 0; i < array_length(order_list); i++) {
var _spr = 0

switch (order_list[i]) {
case sandveech_bg_obj_buns:
_spr = 1;
break;
case sandveech_bg_obj_cheese:
_spr = 2;
break;
case sandveech_bg_obj_ketchup:
_spr = 3;
break;
case sandveech_bg_obj_lettuce:
_spr = 4;
break;
case sandveech_bg_obj_mayo:
_spr = 5;
break;
case sandveech_bg_obj_onion:
_spr = 6;
break;
case sandveech_bg_obj_patty:
_spr = 7;
break;
case sandveech_bg_obj_pickle:
_spr = 8;
break;
case sandveech_bg_obj_tomato:
_spr = 9;
break;
}

draw_sprite(sandveech_bg_spr_icon, _spr, 32 + 48 * i, room_height - 32);
}
}
5 changes: 5 additions & 0 deletions Loungeware/objects/sandveech_bg_obj_game/Step_0.gml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
// sandveech_bg_obj_game.step

var _arm = sandveech_bg_obj_arm;
if (instance_exists(_arm)) {

}

if (TIME_REMAINING_SECONDS == 2) {
if (!check_win()) {
clear_game();
Expand Down

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

2 changes: 1 addition & 1 deletion Loungeware/objects/sandveech_bg_obj_item/Create_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

// scatters item randomly around the play area
x = irandom_range(32, room_width - 32);
y = irandom_range(32, room_height - 32);
y = irandom_range(32, room_height - 128);

vdir = 0;
hdir = 0;
Expand Down
17 changes: 16 additions & 1 deletion Loungeware/objects/sandveech_bg_obj_item/Draw_0.gml
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
// sandveech_bg_obj_item.draw

draw_sprite_ext(sprite_index, 0, x, y, 1, 1, angle, c_white, 1);
var _arm = sandveech_bg_obj_arm;
if (instance_exists(_arm)) {
var _near = _arm.near;
var _item = _arm.item;

if (_item) && (_near == id) {
gpu_set_fog(true, c_white, 0, 0);
draw_sprite_ext(sprite_index, 0, x - 3, y, 1, 1, angle, c_white, 1);
draw_sprite_ext(sprite_index, 0, x + 3, y, 1, 1, angle, c_white, 1);
draw_sprite_ext(sprite_index, 0, x, y - 3, 1, 1, angle, c_white, 1);
draw_sprite_ext(sprite_index, 0, x, y + 3, 1, 1, angle, c_white, 1);
gpu_set_fog(false, c_white, 0, 0);
}
}

draw_sprite_ext(sprite_index, 0, x, y, 1, 1, angle, c_white, 1);
8 changes: 4 additions & 4 deletions Loungeware/objects/sandveech_bg_obj_item/Step_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ else if (hdir != 0 || vdir != 0){
decelerate();

// out of bounds prevention
if (bbox_bottom < 0) {
if (bbox_bottom < 8) {
if (x > (room_width / 2) - 64) && (x < (room_width / 2) + 64) {
var _game = sandveech_bg_obj_game;

Expand All @@ -41,12 +41,12 @@ if (bbox_bottom < 0) {

y = room_height;
}
if (bbox_top > room_height) {
if (bbox_top > room_height - 8) {
y = 0;
}
if (bbox_left > room_width) {
if (bbox_left > room_width - 8) {
x = 0;
}
if (bbox_right < 0) {
if (bbox_right < 8) {
x = room_width;
}

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

Loading

0 comments on commit b6523ee

Please sign in to comment.