itch.io is community of indie game creators and players

Devlogs

Devlog #4

Keeper Keeper
A downloadable game for Windows and macOS

Keeper Keeper fresh devlog!

This week I worked on adding an on/off toggle button for the keep. It’s not done yet, but it’s getting close. The keep can be turned on and off, and when off it prevents players and the ball from going into the keep or getting points. However, the sprites aren’t in it yet and neither is the button the player will push to toggle this on or off. Basically, it’s almost completely functional, but you can’t see it, thus no new download this week.

Constructing the Keep Toggler

Alrighty, so what’s happening with the keep toggler? How does it work? Right now, in Unity’s Hierarchy is a GameObject for each keep, and on that keep are a couple booleans that can be turned on or off. Those booleans tell all the keep’s children what “features” are currently active, like the bumpers or toggle. 

If the bumpers are active, they allow the keep to slide back and forth along the wall when you push it. The bumpers have to make sure there’s something for you to bump into, so they turn on some colliders you or ball can push against. When you run into the bumpers, the entire goal is moved along a Slider Joint on the wall. There’s probably a better way to do this, but it’s working great for now.

If the toggle is active, the keep behaves as if it’s closed. The back wall of the keep moves forward, flush with the arena wall, and for good measure the keep loses the ability to tell if the ball is in it. This prevents you from accidentally getting points from an “off” keep, just in case. 

Keeps can have multiple of these features turned on or off at once, making it slow to test and make sure that everything is playing nicely together. I ran into problems when I started the game with both the bumpers and toggle enabled, but it was fine if they both started off and were turned on after the game began. To fix this, I switched the toggler to change the GameObject’s tag to something other than what the ball checks for to see if it got a point (like it invisible), when before it turned off the collider with the tag the ball is looking for. When the collider was being turned on and off, the physics system thought the keep needed to be moved to the middle of the arena. Obviously that was no good. Changing the tag was a much “safer” way to prevent the ball from scoring on that keep.

Working with Unity’s built in physics system makes development really convenient most of the time, but it get’s pretty complicated when you’re essentially hot-swapping components. You have to be extremely careful when setting up these sorts of interactions, and test every conceivable combination of starting state or in game modification. Luckily, the toggle and bumpers are now working great, and they’re getting close to being done. 

Next Steps

The toggle isn’t quite done, and aside from adding visual feedback, I’ll be adding a button that can be pushed by the player to toggle the keep on or off. Right now I’m toggling a keep on or off by checking a box in Unity’s Inspector.

Coming Soon:

  1. Ability to win and reset the game.
  2. Player abilities (grab and shoot).
  3. Bug fixes forever.

Coming Later:

  1. Complete animations for keeps, players, the ball, and UI.
  2. Sound effects and music.
  3. Additional arena designs.
  4. Main menu, including settings and controls overview.
  5. Game mode, player, and arena select.
  6. Four player support.
  7. Game cabinet!
Download Keeper Keeper
Leave a comment