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…)

Prototyping Codename: Stab (Part 7)

April 11, 2015Stab

This post’s title should really be called The Worst Finite State Machine Ever.

So on the latest prototype, we ran into a few quirks like strange “AI” priorities during the victim’s various fear states. For example, a Calm person might notice a typical lure item (like the arbitrarily chosen “apple” in the GIF from a few posts back) and walk towards it. But to a Panicked person who’s scrambling around like a chicken with its head cut off, that apple might as well not exist.

Examining an apple? Ain’t nobody got time for that!

I decided to refactor slightly, and by refactor I mean remove two or three strands from an enormous bowl of spaghetti code. Previously, the VictimScript handled a lot of AI behavior in the Update function, constantly checking the fear state and attempting to act appropriately. Apart from moving towards nearby items, behaviors also included reacting to vision of the killer (fight/flight/freeze, as determined by a dice roll).

Naturally, there aren’t enough nested if statements in the world to elegantly handle the complexity already present in an otherwise extremely rudimentary protoype. How often do you do the dice rolls? Only when the killer is in sight, and you just rose to a higher fear state? What if your dice roll says to “run”, but you run into an item of interest as you run away? Does that depend on your fear state, too? (more…)

Unity 5: It’s amazing, but I’m not amazing at using it

April 5, 2015Stab

Happy Easter! I figured this was as good a time as any to come out of hibernation.

Like the rest of the game development community–and those who are certainly more eager than ever to join–I hopped onto Unity 5 when it was released last month. While all the changes and improvements were wonderful for my purposes, it still definitely retains a fair amount of its “not actually designed for working 2D” flavor. Regardless, the good news is that I’m back on the wagon.

Not that wagon...
Not that wagon…

Of course, no several-month-development-hiatus would be complete without those late-night moments of stupidity. Yesterday, I was just about to give up on drawing text to the screen correctly after spending about 40 minutes on it, frantically Googling stuff like WorldToScreenPoint. It turns out that programmatically adding Text objects is pretty simple. Here are a few simple tips: (more…)

Happy 2015!

January 27, 2015Slaptop, Stab

Right after the holiday rush–during which not a whole lot got done, surely to no one’s surprise–I had grand plans to start on the foundation of Stab while flying to/from Hong Kong for my vacation. Unfortunately, I ended up just sleeping very uncomfortably and reading the audiobook of Steven Pinker’s The Language Instinct the entire time.

Of course, the flight back wasn’t much better, and so I’m starting tonight, using a diagram of all the different classes/interactions as a guide. Better late than never?

I also wanted to take the time to acknowledge my prize for entering the Lenovo contest back during the fall. They sent me a letter with an NFL Shop gift card and a Reddit t-shirt. I have yet to try it on, but maybe I’ll save it for the wall of the future Tuttle Games offices someday.Reddit/NFL Goodies!

Back to Work (Thanksgiving Edition)

November 27, 2014MODE, Stab

As much as I hate to say it, it’s been a full month of inactivity, which is a real shame. A bit too much time playing Super Time Force Ultra and listening to the Interstellar soundtrack can put a big dent in productivity.

Fortunately, Unity 4.6 (with all its GUI goodies, among other improvements) going official after being in beta for a while was quite timely news, and I’ve already upgraded in preparation for my scheduled Stab foundation-building this coming Saturday morning. Time to get over my fear of refactoring code mid-project and just give up on the idea of perfectly designing my code base on paper beforehand.

On a side note, I was watching Ahoy’s recent video series on graphics in gaming and came across a clip from an old arcade game called Moon Patrol. It bears a striking resemblance to my very own Morbidly Obese Dinosaur Escape (even the appearance of UFOs), which is a bit spooky considering I’ve never heard of this game up until now. I suppose I did an inadvertently better job capturing the retro feel than I had intended to!

Prototyping Codename: Stab (Part 6)

October 28, 2014Stab

In anticipation of this year’s Halloween, we’ve decided to self-greenlight this idea and start building the foundation of the game logic in a new project. While we have a lot of mechanics missing from the “prototype” right now, there no longer seems to be much doubt regarding the “fun factor” of this game. With a slow, beginner, solo developer like myself, I feel it’d be counterproductive to sink more and more time into a skeleton (heh) of the game by building up little nibbles of spaghetti code.

Lure in a healthy victim with an apple!
Lure in a healthy victim with an apple!

Tentatively, tomorrow we’ll be charting out (by hand, on actual paper) a summary of the overall game logic, including player behavior, the scoring system, and the “AI” for the victims, which will probably be the biggest part of the game. From there, we can build a solid foundation and just simulate game actions with Debug.Log and stuff. No need to start implementing movement and whatnot since that’s already been “proven” with the prototype.

Of course, that means I’m going to have to hit the books and figure out what Singletons and Interfaces will be necessary. I’m already envisioning things like:

  • “KillerManager” holds input options and the killer’s stats/psyche
  • “VictimComponent” handles the individual victim’s state of fear and physical health
  • “ItemComponent” tracks an item’s inherent tags or attributes such as “Gross” or “Bait” which each victim may react to differently
  • The entire victim finite state machine to handle AI

This kind of foresight is especially important since I’m on the free version of Unity, which doesn’t have this neat profiler to help visualize performance or potential memory hogs. Maybe I’ll learn a bit about how to roll my own loose benchmarks along the way. I always had a feeling that optimizing CPU performance for a 2D game is complete overkill nowadays, but hey, it’s worth trying my best.

For example, today I learned that you shouldn’t be constantly drawing "Health: " + playerHealth, because string concatenation creates unnecessary garbage for that frame. Instead, you could do a quick boolean check to see whether the health has changed since the last frame, and only update it if so. I’ve also read that it’s best to simply do a separate draw call for the “Health:” part. Must-know information!