Ever wanted to find a child under a GameObject, in recursive fashion, and been super annoyed when there wasn't a function for that? So you sigh, and crack open the editor, and write that logic for probably the tenth time in your codebase? WELL NEVER AGAIN.
Here's a handy dandy extension method that does that for you. Bonus, it even has an optional argument that tries to recursively find a child with the given name AND the given parent. This handles the cases where you've got 2 like-named child...
2017-11-21 23:56:25 +0000 UTC
View Post
Watch the above video (it's short), and pay attention to the moments when a dude gets punched and they explode. Or really anything else that explodes, we kinda dialed it up for the trailer.
You're seeing a couple of effects here:
- I'm tween kicking the camera in toward the target to add impact
- I'm emitting fist and entity particles (for dude deaths, anyways)
- Playing impact animation, making sure hit has follow-through, etc
- I'm waiting a split-second, and p...
2017-11-09 16:23:34 +0000 UTC
View Post
Ever just filter through images of subways / the underground, especially the in-construction bits, for just how... neat, it can be?

There's so much down there that ends up being a shoo-in for combat arenas. Especially in a game that's all about right angles and hard corners.

They feature heavily in punk...
2017-09-25 16:12:25 +0000 UTC
View Post
Pretty straightforward! This is what controls our soft locking / aim assist. You could convert it for FPS without too much effort (at which point you'd call it aim-assist).
AttemptedHitOnTarget() in our code then utilizes our existing lock-on code to make a soft-lock on the target that immediately breaks once you've finished looking at it. If you were applying this to bullets, you could just make the bullet heat-seek the chosen target, or bent the bullet path, etc.
If we wanted to up acc...
2017-09-15 22:44:04 +0000 UTC
View Post
This was just a code bug that made me giggle, so y'all get to see it first. I wanted to make some cool anime speed lines, and I did! It's pretty neat! Except then... oh god... they didn't go away. AND KEPT STACKING.
I've scientifically determined the inflection point of "TOO MUCH ANIME". We did real science here. Everyone should pat themselves on the back.
I especially like how about halfway through, the YouTube encoder just shrugs, goes "whelp" and gives up. Even YouTube admits this is ...
2017-09-15 19:10:30 +0000 UTC
View Post
This is a public post, because it isn't my code, it just sort of arose out of a thing we were doing, and someone else had a REALLY COOL SOLUTION, so wanted to share it here. It wasn't all in one location, making it hard to google - this hopefully fixes that.
So! This all started with @D_M_Gregory doing bobble heads. I've included the code inline, but it's there too.
2017-09-09 22:32:59 +0000 UTC
View Post
First, read the $1+ tier post on damping, since this feeds off that. Good? Good! Ok, so - like I said, I made something cooler.
Namely, this! Behold the FakeSpring.
What this does is produces very spring-like behavior, but in a very controllable way. You specify precisely what the attack-rate is for the springing back, you co...
2017-07-27 23:39:11 +0000 UTC
View Post
No, not dampening. Not that I would EVER make that typo. Repeatedly. Ahem.
The basic issue is, I wanted springs, but, I didn't want to use an actual spring equation. It needed to be more controllable. It turns out this has Issues. Namely, damping.

Meet Exhibit A. This contains two iterations of my attempts. Pretend those commented out bits aren't commented out for attempt #1. The basic idea here is that I want to flatten any velocity point...
2017-07-27 23:16:35 +0000 UTC
View Post
We'll tweet this out to the randos eventually, but y'all get to see it early, because I AM SO EXCITED ABOUT THESE RAINBOW PIGEON STICKERS.
"Why is Megan making stickers?!" - well they're a focal thing in Spartan Fist, which I can't talk about. This isn't even actual stickers, though, this is just me taking the one sticker Zach got me and turning it into a bunch of placeholder stickers. Except I LOVE THEM SO, now.
I have no idea how one gets physical stickers made cheaply, but now I despe...
2017-07-13 23:47:57 +0000 UTC
View Post
Alright, so what we're doing here is simple. This leverages the latest version of PoolManager (here) which is an INCREDIBLY handy plugin for Unity. If I were to tell people to buy just one plugin, it'd be this one, because you NEED this to work around a major limitation of Unity. Namely, that Instantiate() is pretty slow and causes hitches, and this lets you Spawn/Despawn tons of stuff while frontloadin...
2017-07-07 20:30:58 +0000 UTC
View Post
Someday, my intern is going to ask me about this function.
...
I... honestly don't know what I'm going to tell her.
If you want the long version, there's a big desc in the $3+ tier post, but the short less coder'y version is: this interacts with PoolManager, which is a Unity plugin I HIGHLY recommend you use: here
and it lets me generically despawn stuff that I'm not 100% sure ...
2017-07-07 20:20:30 +0000 UTC
View Post
I try and update y'all with something cool at least once a month, and I WOULD be typing that right now, except I've got a playable deadline next Monday and a trailer-first-video deadline the week after that. SO. Stuff's kinda busy.
So hold tight. Stuff's on the way, once I find a gap of time.
2017-07-07 16:15:22 +0000 UTC
View Post
I get asked "so how much math do game developers REALLY need?" a lot, and usually I just shrug and say "linear algebra." But that doesn't help, because a lot of folks don't actually know what that is. As it happens, I hit on a perfect example.
Look at the image (or here - https://pastebin.com/dMbqUqq8 - since Patreon's UI kinda sucks and doesn't allow expanding images). Technically that's just trig, but, linear algebra is, r...
2017-05-30 17:21:50 +0000 UTC
View Post
So, Switches! No, not the Nintendo kind, I mean the light switch kind. They're cool! You take a humble, core system, like a Switch: https://pastebin.com/7gymtXak
... and throw just a little zazzle on there. Like maybe a depression switch. No, not the feeling. I mean the sort of switch you step on to depress, or the sort that clicks in when pressed: https://pas...
2017-05-30 17:05:06 +0000 UTC
View Post
Ok everyone, sorry for the lateness, but I'm polishing up a REALLY NEAT SYSTEM right now, and I want to wait until it's done to share it here.
It's SWITCHES. But it's so much more powerful than that. Just, gimme some time here. Look for a post next week.
Ok toodles!
2017-05-26 18:49:48 +0000 UTC
View Post
As promised, here's the updated Node. Now it uses a binary file, like it should have in the first place, and works fine. Still not efficient - I'd want to stream it to make it properly handle HUGE data sets - but eh, it should be fine for normal gameplay cinematics and short trailers.
In the event you care about how the loader/saver logic changed, here you go, have that too: https://pastebin.com/7zH72Xzx
Pretty standar...
2017-04-16 00:43:04 +0000 UTC
View Post
This is just the worst. Behold. I mean the cinematic stuff at the top is ok, and included for context, but when you see how I'm shitting the values into ASCII and back again on load, just... hahahahaha.
This introduces so much floating point inaccuracy, that it turns butter smooth cinematic camera paths into "feels kind of like your monitor is shaking in an earth quake".
It's amaaaaaaazing.
But I kinda knew it would be bad. This was just because it was really, really easy to throw ...
2017-04-15 06:13:33 +0000 UTC
View Post
Sup everyone! Ok, probably time I updated y'all on what Spartan Fist is, where it's going, etc.
First, notable update is that we're delaying from original launch plans. Won't hit in 2017. It wasn't coming together fast enough, and since we don't have budget pressure, slamming it together was... you know, probably not the best idea. That's what we did with Hot Tin Roof, and while we did eventually staple it together, another 3 months would have helped it a ton.
More fun is th...
2017-03-30 23:50:55 +0000 UTC
View Post
https://pastebin.com/1fR0Q0mQ
So, what this does is gets an axis about which you can rotate a bone. That axis is situated such that if you apply positive rotation, the rotation will always go "away" from the damageOrigin. You can ignore the CalcRelativeHitboxTransform stuff - that's just extracting the "get the true origin of this fist hit" thing - and pay attention to the else case, which is just "the position of the thing ...
2017-03-30 23:26:33 +0000 UTC
View Post
You think you're making a hardcore roguelike action game and then FWOOSH suddenly you're accumulating Amor and then you're developing to showtunes and https://www.youtube.com/watch?v=aFSv-tq5GAY
... still going on that track 10 minutes later btw...
When a dude hits your face
And the punch feels like lace
THAAAAAT'S AAARRMMMOOOORRRRE<...
2017-03-13 17:33:49 +0000 UTC
View Post
No, like actually a forgiveness system. HAH. <rimshot>
Folks curious what my code is looking like lately? Tada! That image was already public, but I'll throw it into a pastebin JUST FOR YOU SSSSHHHH DON'T TELL NOBODY: http://pastebin.com/xJDBigYa - with bonus "the inheritance chain that relies on."
It isn't really an explained system, hence why it's an Everyone post instead of a Code Tier post, but if you squint, ...
2017-01-18 00:29:40 +0000 UTC
View Post
There are some solutions on the Asset Store for multi-tagging. Some are free. They suck. Here's my clean solution.
This leverages an Asset Store find that does NOT suck, though is somewhat out of date. Generic Inspector adds a ton of attributes that let you do some pretty fancy things in the Inspector without ever going near an Editor script
Now, then, the code itself...
First, the AI Man...
2017-01-17 18:06:11 +0000 UTC
View Post
First, let's define the problem. Typical 3rd person action games have a lot of spacing between enemies, even in hoardes. There's a lot of reasons for this. It gives them room for animations, makes them visually discernable, and makes it possible to manuever between them. For references, here's hours of DmC (which is a really good DMC game by the way, despite the reviews at the time):
https://www.youtube.com/watch?v...
2016-12-01 00:05:51 +0000 UTC
View Post
We're going to run a little experiment. I want to see if y'all can keep a secret. Good? Good. This video is, as you'd guess, the one we used to submit to IMB. That isn't super relevant - more relevant is that this is the first real footage we've put together of the game.
Guess who gets to see it first?! :D
You can share it with your friends, and you can even talk about it publicly, but I don't want to see links to this pop up anywhere. Impressions only. I won't be sharing this anyone els...
2016-11-30 23:52:23 +0000 UTC
View Post
So we just elected an Annoying Orange as president. Shit got real. That means a lot of folks are going to ask in the face of that, what possible good can a bunch of dumb games do? Why are we wasting our time making these?
First, fuck that.
Second, no, seriously, fuck that. Art matters. Here's why.
When I was about 11, I stumbled across the Ultima series of games. Here was this whole world I could ex...
2016-11-13 03:09:32 +0000 UTC
View Post
It's based on this writeup of how Halo 2's AI worked.
I'm never going to polish any of this up enough to be an Asset Store thing, but maybe it'll be of use to some of my backers regardless. What you've got here is the hierarchical FSM system I've built out for Spartan Fist, plus a reeaaally basic AI setup, so that you can kind of see how it's meant to be stitched together...
2016-10-31 19:38:30 +0000 UTC
View Post
Hola patrons!
This is the first of, hopefully, many patron-only posts I do. Y'all are the only ones that get my long-form posts now, aside from the rare instances where I bother to polish them up enough to post elsewhere as an article. You guys get like... beta blog access, and most of the blogs never get past beta.
(and those of you $3/mo and above get cool/dumb code samples I throw up too, so double huzzah)
Today, I'm going to meander on about where the market is, and what that m...
2016-10-31 16:32:11 +0000 UTC
View Post
Thank you so much for the support this month!
2016-07-31 23:59:00 +0000 UTC
View Post
Thought folks over here might like to see what we're working on next. This'd be Spartan Fist.
2016-07-13 19:02:03 +0000 UTC
View Post
Thank you so much for the support this month!
2016-06-30 23:59:00 +0000 UTC
View Post