Hand Functionalities, Menu Navigation, and More!


Greetings, Nevin here with a lot of progress on the programming side of things since my last post.

First...an introduction to all scripts created

Personally, with my time learning how to develop games it took me a while to figure out how to assign certain roles to certain scripts in a neat, concise way, rather than just having one-off scripts that literally only had <10 lines of code. I've gotten better at it and for our game we currently have 6 scripts! (Possibly have one more for SFX but we'll see)

  • For some reason I always like having a Director script, the one that's in charge of monitoring the game state, transitioning scenes, and overall supervises how the game is running. (Inspiration from Left 4 Dead's Director)
  • Game Flow is in charge of, well, game flow. So the elements being search for and discovered, being collected, and being used. The script works side by side with...
  • Player Input (I know I skipped one hold your horses), which focuses on the player's input when pressing the spacebar (which is our button of choice for the jam). It detects single, double, and triple clicks as well as holding and measuring how long it's been held, though our game doesn't have a use for button holding as of this moment.
  • Monster Behavior is mainly just for the monster moving towards the player and coming into contact with them, as well as being one half of the combat portion with its assigned element type.
  • Spawner takes care of spawning and killing monsters. It has a progression system and a "prevent spawn spam" which makes sure that you're not getting bombarded by 20 million fire elementals.
  • UI Manager just takes care of all UI things!

Added Mechanics

Individual Hand Usage

The light blue panel shows the player's inventory (both of their hands).

On the left we have the search and discover portion of the game flow. When an element is discovered, it'll pop up and remind the player to click the spacebar once to collect it. Newly collected elements go on the left hand, and when you collect another the left-hand element moves to the right to give room to the new element. If both your hands are full, your character stops searching. From there you can use the left and right hand individually by double-clicking or triple-clicking spacebar, respectively. This allows for stashing an element for a monster down the line. (In this screenshot, I have the water element prepared to use against the fire elemental right after I take care of the air elemental in front)

Menu Navigation

Staying true to the One Button Game Jam, our menus are also able to be navigated through spacebar only. It's also helpful considering there's not much 'menu' to go through with our game, you just go in, play, and restart or exit if you'd like.

The main way we have it is that single click navigates you through the first option, and double clicking through the second. As of this moment we don't have the main menu just yet, but the code is ready for when it is. The main menu will have "Start Game" and "Tutorial" options, the latter of which will involve only single-clicking that takes you through the tutorial and back around to the main menu. The other menu we'll have is the game over/death screen, where you can single click to restart the game, or double click to go back to the main menu.

Progression System + Spam Prevention

Where I've spent more of my game-design time was with the progression system. Some values I've had to figure out were: 1) how fast should the progression occur? 2) what should the spawn rate start at, how much to decrease w/ each progression, what's the lowest point for it? and 3) same thing but for monster speed. After running through calculations, it takes 4 minutes of gameplay to reach the maximum "difficulty" of the progression curve with a spawn rate of 2.2 seconds and a monster speed of 0.5 seconds. 

Also, the reason that I have monster speed decreasing instead of increasing is to have a bigger horde of monsters showing up on screen simultaneously, giving the player a greater need to manage both their hands for the first and second monsters of the horde. It also gives them very little breathing room as they have monsters constantly on the screen. The only breathing room the player gets is when they get hit, after which they would release a blast that kills all monsters on screen.

Below the Progression Coroutine is the Spam Prevention method. It took me a bit to figure out how to get the spawner to not spawn the same type of monster 3 times because the player's character has to cycle through each element, so it's impossible to cycle through 12 elements to take care of them. Eventually I tracked if the new monster is the same element as the old one, and if that trend happens twice, make that monster type unavailable to spawn next time, after which they become available once again to spawn.

Sound Effects + Closing


I also had extra time to find some sound effects we would need for our game since my teammates are very busy creating the cool models, animations, soundtracks, and UI elements! I solely went through freesound.org searching for the right sounds and compiled a list of sfx for our game! I just need to find one more sfx for when the player presses spacebar in a menu, then we should have everything!

Leave a comment

Log in with itch.io to leave a comment.