Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(3 edits)

[Day 6] Power Mechanic and GUI

Today we will add the power mechanic and a basic GUI for the game scene.

Power Mechanic

As previously mentioned, the power mechanic will help make the game more interesting to the player without adding extra buttons to the game.


The power mechanic will work as follows:

  • Press and hold the SPACE BAR/PRIMARY MOUSE to build up bat power.
  • Release that button to swing the bat with power.

When the button is held, a power meter will fill up. If the player releases the button when the meter is full, then Guzman will hit the ball hard with power! However, if the player holds the button too long, the meter will reset and Guzman may hit the ball weakly, so the player must be careful not to hold the button too long. 

The meter is mathematically represented by a decimal value, 0.0-1.0, which when added to a constant can then be multiplied into the formulas that determine the force of the ball off the bat. The timing mechanic does not need to be changed as the bat speed remains the same regardless of the power. 

To represent this meter, I used an asset that fills from left to right on the bottom of the screen, as seen in the image below. 

An obvious change is that with the introduction of the power meter,  balls that are hit may not necessarily be hit for home runs. This case was already handled previously, however- as programmed in a previous day, balls hit in fair territory but not beyond the outfield walls are already considered foul.

Above: The GUI in the Game Scene

GUI

While I was at it, I created the GUI for the score and balls/time left indicators (see next section for details on these two modes). 

These indicators are simple, as you can see above. The home run counter is on the left. The balls/time-left indicator is on the right.

Other Additions

Placeholder music and two modes were added.

  • Placeholder Music: I was inspired to make this game by Wii Sports and MLB Power Pros. Music from the latter was used as placeholder music until I start working on BGM/SFX.
  • Modes: I modified the ball spawning controller to allow for two modes:
    • Stock: The player gets 10 balls to swing at.
    • Time: The player gets 60 seconds (for now) to swing at balls.

Above: Title screen for the current prototype

Demo

The demo for this prototype is linked here.

Controls:

  • Mouse: Select Options
  • Space Bar: Swing

Next

At this point, we have a good enough prototype to give to others to test the game mechanics. We can gain feedback from the Discord.

Next, I will need to add a character select screen. As you may probably infer, that character selection screen may or may not be a joke, because- well, who wouldn't pick Guzman in Guzman HR Derby? Stay tuned!

-Browntul