PROJECT OVERVIEWStay In The Loop in a puzzle-platformer submitted to the 2024 GMTK Game Jam under the theme: loop. The player is in a time loop with various others wandering around the randomized levels. You must find and run into the single NPC in each level who is in the timeloop with you by analyzing everyones movements until you find one repeating the same set of actions over and over. Avoid running into all other NPCs as they will set you back 15 seconds. You must do this before the time limit runs out or else your time loop will break!
GAME ELEMENTSThe five day development cycle was focused on player movement, NPC behavior, designing levels, and visuals such as UI and animations. I needed to make sure players had movement options to accurately avoid the non-loop NPCs. I have the player a jump, wall jump, and a grapple mechanic allowing them to shoot towards grapple points in the level. The NPC behavior I developed is split into three types: preset, random calm, and random energetic. All NPCs in each loop are randomly chosen as each of these, except for the one always has a predetermined move set that loops. That move set is chosen randomly from a list of movements I defined. I designed the UI and visual style to be as simple and responsive as possible to allow players to focus on watching the NPCs movements. Screen transitions are fluid from one to the next concealing the seams between levels.
REFLECTIONSI learned and grew a lot during this game jam. During game jams I tend to unintentionally leave little to no time for playtesting. With each game jam I participate in I hold it to myself to break this habit. This time around I managed to hold a couple of playtests halfway through and on the final day. It's not where I want it yet, but it's an improvement and something I'm excited to keep working on.
NPC AI SYSTEMSThe NPC behavior system is divided into three types: Preset, Random Calm, and Random Energetic. At the start of each behavior loop, NPCs are randomly assigned one of these types, except for one NPC that always runs a predetermined moveset on a loop. NPCs using the random behaviors make moment to moment decisions about how to move through the space, such as whether to stay on their current platform, jump to another, or perform wall jumps. These choices are influenced by their assigned behavior type and allow them to navigate complex geometry in a controlled but unpredictable way. For the preset behavior, the NPC executes a fixed sequence of movements that is randomly selected from a list of authored movement patterns, giving consistency while still maintaining variation across loops.

Levels are designed to accommodate many NPCs while allowing the player to enjoy traversal and easily and locate the target. I used a grapple point mechanic to allow players to soar over the NPCs giving them a dynamic traversal option, the choice to stay in the air, and a chance to aim for the right NPC. Grapple points were each intentionally placed based on many tests on each map to see where I might have a hard time reaching the correct NPC or avoiding the rest of them, and where they were the most fun to use.
level design: loop-01
level design: loop-02
level design: loop-03
level design: loop-04
level design: loop-05
level design: loop-06
PRESET NPC LOGICThe preset NPC behavior is determined by a list of predetermined movement patterns that I authored. Using a 2D array, I defined each element: [movement state, state duration], and the NPC executes each movement in order for the specified duration before looping back to the start of the list. I use a variable called npcPath to randomly assign one of these predetermined paths to the preset NPC each loop, giving it a consistent but varied behavior each time.
NPC DESCISION MAKING BEHAVIOURRandomized NPC calm and eratic behavior is determined by a set of rules given to each type. Calm NPCs are restricted to idleing, walking, sitting, and jumping, with curated randomization deciding range of time spent in each state. Eratic NPCs can do all of those actions in addition to running, and all state transitions and time spent in each state is not curated to allow for a more unpredictable and chaotic behavior.
NPC DECIDE JUMP TO PLATFORM Calculates and determines if NPC should jump to a platform, based on current speed, horizontal distance to platform, and platform height relative to NPC position.
NPC DECIDE TO TURN AROUND Calculates and determines if NPC should turn around, based on a grounded check, distance away from ledge, and a max drop height the NPC is allowed to drop down from.
NPC DECIDE TO WALL JUMP Determines if NPC should wall jump, based on a check for a wall in front of the NPC, and a 50% chance of NPC deciding to wall jump.