Enums and UI decisions (featuring color-blindness)

January 8, 2017Better Ballistix

I learned a neat trick today: you can sort of assign indexes to your enums in Unity’s C#.

Real example:

public enum PaddleController { AI = 0, Input1 = 1, Input2 = 2, Input3 = 3, Input4 = 4 };

This allows you to do stuff like refer to “Input2” like so:

(PaddleController)2

It turns out I don’t actually end up taking advantage of this, but probably beneficial to add it to my C# toolbox.

I also spent way too much time today thinking about how to handle the character selection screen. I realized that most fighting games wouldn’t make for a good model, because they almost always max out at 2 players, as opposed to 4. I also looked up footage of recent Mario Kart games, but ultimately ended up going with something similar to the original Ballistix:

Notice that the P2 always occupies the top-right of the portrait, the P3 icon is at the bottom-left, etc. This removes the problem seen when using colored outlines, etc.

Please excuse the placeholder character portraits (and names)

Picking the colors for the four players was simple enough: I used this cool online tool called iWantHue to identify four colors that were as visually distinct as possible, while also accommodating color-blindness.

Anyway, I’m fairly certain that all the setup menus are actually more or less behaving as expected, meaning the immediate next step is to start the gameplay scene with all the correct parameters, such as Game Speed (which I might just remove, or use as a multiplier for ball movement speed) and Time Limit.

“Pong 4 Pals” (working title)

January 8, 2017Better Ballistix

First off, Happy New Year!

That’s right, “Better Ballistix” will be going by “Pong 4 Pals” for now. It doesn’t have great Google-ability, but it’ll do.

I’ve been working on the menu and setup system, as most of the gameplay part will be relatively straightforward (and much more fun to work on). Turns out controller inputs are kind of a headache, but here’s what I’ve got so far:

Some new things on the technical side that I’ve touched for the first time:

  • A “RulesManager” game object, which is a stripped-down singleton implementation that’s much simpler than any I’ve used before
  • Realizing you can just place a public enum outside of the class so that it becomes global (duh)
  • Get and Set, with data validation checks for Set
  • Loading screens

I believe the game setup is 90% of the way there, before I can start working on the following gameplay items:

  • Repel feature (have to confirm whether it belongs in the game)
  • A better AI
  • How newly spawned balls will actually get onto the board
  • Swapping in the correct character depending on the player

Stay tuned!

The solo struggle

November 14, 2016Better Ballistix, Jaunty Journey, Stab

It’s a real wake-up call when I want to make a new blog post and WordPress lets me know that I have 12 plugin updates to make. It’s been another half-year of (mostly) inactivity, sad to say.

Since my last post, I’ve shelved Jaunty Journey for a few reasons, and did a substantial amount on laying the groundwork for a Stab revival. In short:

Most of what I wanted to get out of Jaunty Journey was already done. The bulk of the goal with this game was to come up with the “three minigames, two play styles” thing elegantly, and I feel I accomplished it with my rough prototypes. Artwork struggles and time/energy/lifestyle constraints kept it from going much further.

As for Stab: I actually spend some weeks in August/September fleshing out behavior trees and actually implementing (!) them in Unity, with A* pathfinding and all. This Gamasutra article by Chris Simpson (I also had a good brief time playing some Project Zomboid over the summer), Panda BT, and TileTool2D deserve an enormous amount of thanks from me in getting it started. I may come back to post a more substantial snapshot of where I left off, but my notes indicate that my latest problem was solving this branch: “Get a stack of Rooms in this Building that we want to search.

A bit more tangentially, I also got a Raspberry Pi and built a sort of “silent doorbell” residing in a black rectangular box made of plastic. When you press this large white arcade button on it, a blink(1) LED light on my desk flashes bright orange to get my attention. I definitely spent way longer on it than I should have, but it was quite rewarding to get my hands dirty on the hardware side and complete the project front to back. (more…)

Bacon takes damage and adheres to a grid

June 7, 2016Jaunty Journey

The title says it all, for the most part.

  • Bacon takes damage each time an enemy touches him
  • Gameplay now takes place on a grid, so it’ll be possible for me to design levels on graph paper, etc.
  • At the start, the enemy movement patterns are shown at regular speed; after that, the movement happens twice as fast to cut down on waiting time (and increase excitement!)

Besides making new levels, soon I’ll also be:

  • Adding a visual indicator to show that it’s your turn to move
  • Adding a “goal” zone for each level, that actually won’t be on the far right, as I’ve determined

How to use a pig’s brainpower to dodge predators

May 24, 2016Jaunty Journey

As mentioned last time, the “Surviving Predators” minigame (the second of three aspects of your daily routine on this journey) has been on my mind for a while. I was drawn to the idea of movement patterns and something similar to chess puzzles. So Bacon would be sort of like a quarterback reading the defense, trying to figure out how exactly he’s about to get blitzed before gracefully dancing around the enemies to get to the other side.

At one point, I considered a tactics-based approach, involving a random set of 3-5 cards in your hand that you could use to move in predetermined patterns. I thought of Mega Man Battle Network, or the more recent Swap Cops mobile game. For example, you could choose to move up one square, then jump over one square to the left. On your next turn, you could play the card that lets you “guard” for one turn (survive an incoming attack if an enemy is adjacent).

But I think the problem with that is the level of complexity involved that might not seem obvious. How would you decide which cards to give the player, and which ones to “deal” in subsequent turns? What if certain combinations of boards simply don’t have an optimal solution given the cards dealt?

For now, I’m settling on this idea of memorizing (and juggling) several incoming enemy movement patterns in your head, and timing your navigation correctly. I’ll let this animated GIF illustrate what I mean:

survivepredators-v1

When the level starts, you get one chance to see how each predator moves. Ideally, you’d commit it to memory, because each turn, they’re going to simply repeat their respective movements. Here’s where it can get complicated, a.k.a. how I can make things interesting: (more…)

Bacon picks out a shelter

May 8, 2016Jaunty Journey

Yes, I’m still alive. I just had my birthday a few weeks ago, which was a much-needed reminder that I should really get things going on here.

So this weekend I decided to get some more coding done, and also start prototyping the Bacon flavor of the three daily minigames.

Where is this little fella going to stay at night?
Where is this little fella going to stay at night?

The idea for the Make Shelter minigame stemmed from my desire to create a quick (< 20 second) but mentally challenging puzzle, where you were under the clock, since the sun’s going down. For some insight from the actual natural world of shelter-making, I consulted my good friend, Ivy, who actually grew up in the wilderness.

Ivy taught me that boars and domesticated pigs are very different in many ways. But for the purposes of Jaunty Journey, we might have to blur the line a bit. Boars tend to like thick brushes, as they provide both comfortable bedding and the benefit of being noisy (so they can hear predators/intruders coming). In contrast, tall grass would allow many potentially dangerous animals to sneak and slide through. Also, being near water is a plus, so they can roll around in mud.

So the underlying question is: how do you pick out a suitable spot in which to set up camp for the night? From there, we can abstract out a game mechanic that can apply loosely. It occurred to me that mental math was an option, even though I didn’t really like the idea of old-school arithmetic. Simply putting up addition and multiplication problems would be super boring, and I didn’t like the core idea enough to try spicing it up. (more…)