A downloadable game for Windows

This prototype game was one of my first made with GameMaker Studio 2. Collect shells and return them to the two NPCs to complete the game.

All assets and code were created by myself within the space of a single week.

Controls:

  • A/D or Left/Right to move
  • J or Space to jump
  • K or Enter to pick up and interact

The code for this one isn't anything particularly interesting -- just some basic platforming and randomization with the pickups. The most notable code is for the NPCs, listed below.

The code works with two objects in tandem: the NPC itself that gets determines the accurate textbox and a GUI object that actually outputs the text associated with the correct textbox.

Relevant NPC code:

// textbox & interaction handler
if (obj_pl1.key_interact && distance_to_object(obj_pl1) <= range)
{
    switch (obj_pl1.quest1)
    {
        case 0:
            obj_pl1.quest1 = 1;
            textbox = 1;
            break;
        case 1:
            if (obj_pl1.shells < shellsNeeded)
            {
                textbox = 2;
            }
            else if (obj_pl1.shells >= shellsNeeded)
            {
                obj_pl1.quest1 = 2;
                obj_pl1.shells -= shellsNeeded;
                textbox = 3;
                instance_create_layer(x + 16, y, "Interactables", obj_sandcastle);
            }
            break;
        case 2:
            textbox = 4;
            break;
    }
}

Relevant GUI code:

// npc1 textbox
switch (obj_npc1.textbox)
{
    case 1:
        draw_sprite_ext(spr_npc1, 0, 42, 540, 2, 2, 0, c_white, 1);
        draw_text_ext_color(64, 525, "I sure wish I had some seashells to finish my sandcastle! Bring me " + string(obj_npc1.shellsNeeded) + " shells so I can get to work!", 18, 525, c_black, c_black, c_black, c_black, 1);
        break;
    case 2:
        draw_sprite_ext(spr_npc1, 0, 42, 540, 2, 2, 0, c_white, 1);
        draw_text_ext_color(64, 525, "Hmmmm... Looks like you don't have enough shells yet. As a reminder, I need " + string(obj_npc1.shellsNeeded) + " shells if I'm going to finish my masterpiece!", 18, 525, c_black, c_black, c_black, c_black, 1);
        break;
    case 3:
        draw_sprite_ext(spr_npc1, 0, 42, 540, 2, 2, 0, c_white, 1);
        draw_text_ext_color(64, 525, "Wow! You brought all the shells! Watch me build the best sandcastle ever!", 18, 525, c_black, c_black, c_black, c_black, 1);
        break;
    case 4:
        draw_sprite_ext(spr_npc1, 0, 42, 540, 2, 2, 0, c_white, 1);
        draw_text_ext_color(64, 525, "Thanks again for the shells you brought! Now to draft up plans for an even better castle!", 18, 525, c_black, c_black, c_black, c_black, 1);
        break;
}

Download

Download
ShellPlatformer-Windows.zip 2 MB

Install instructions

Run executable to play.

Leave a comment

Log in with itch.io to leave a comment.