RunFaps
Megan Fox

Megan Fox

patreon

Megan Fox posts

Posts: 230 Files: 185
Megan Fox post FindChild Recursive (a handy util func)

FindChild Recursive (a handy util func)

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 c...

Megan Fox post Slow-mo Tips And Tricks

Slow-mo Tips And Tricks

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,...

Megan Fox post The next level theme

The next level theme

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 media for obvious reasons, so hey, they even fit thematically! Also, we have rats, and su...

Megan Fox post Soft Lock (aka Aim Assist)

Soft Lock (aka Aim Assist)

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 jus...

Megan Fox post TOO MUCH ANIME

TOO MUCH ANIME

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 h...

Bobble Heads and Googly Eyes!

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.... at which poin...

Fake Springs and Fixed-Time Sproing-oing-oings

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 control how many bounces it takes, and how much velocity it loses with each b...

Let's talk about damping

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 ...

Megan Fox post Want to see a 48-hour secret?

Want to see a 48-hour secret?

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 placeh...

Megan Fox post Ok, but WHY is that dumb joke useful

Ok, but WHY is that dumb joke useful

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 whi...

Megan Fox post Yes, this is really in my codebase

Yes, this is really in my codebase

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: hereand it lets me generically despawn stuff that I'm not 100% sure wher...

(forgive the delay on this month's 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.

Megan Fox post The Humble Dot Product

The Humble Dot Product

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 image...

Switch Systems 101

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://pastebin.com/YKfr4jfgNow, you have a t...

Coming Soon: SWITCHES

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!

Megan Fox post 100% Less Horrifying Persistence

100% Less Horrifying Persistence

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://pastebi...

Megan Fox post The Worst Goddamn Persistence

The Worst Goddamn Persistence

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 amaaaaa...

Megan Fox post Spartan Fist goings on

Spartan Fist goings on

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, a...

Team rocket, blasting off at the speed of light!

https://pastebin.com/1fR0Q0mQSo, 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 ...

Megan Fox post Love Shines Through

Love Shines Through

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 faceAnd the punch feels like laceTHAAAAAT'S AAARRMMMOOOORRRRE

Megan Fox post Today, let's discuss forgiveness

Today, let's discuss forgiveness

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&#39;ll throw it into a pastebin JUST FOR YOU SSSSHHHH DON&#39;T TELL NOBODY: http://pastebin.com/xJDBigYa - with bonus &#34;the inheritance chain that relies on.&#34;It isn&#39;t really an explained system, hence why it&#39;s an Everyone post instead o...

Unity MultiTagging in 20 lines

There are some solutions on the Asset Store for multi-tagging. Some are free. They suck. Here&#39;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 scriptNow, then, the code itself...First, the AI Manager. Th...

How to dodge in a dense, physical world

First, let&#39;s define the problem. Typical 3rd person action games have a lot of spacing between enemies, even in hoardes. There&#39;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&#39;s hours of DmC (which is a really good DMC game by the way, despite the reviews at the time):ht...

Megan Fox post It's a little early for Christmas, but, here...

It's a little early for Christmas, but, here...

We&#39;re going to run a little experiment. I want to see if y&#39;all can keep a secret. Good? Good. This video is, as you&#39;d guess, the one we used to submit to IMB. That isn&#39;t super relevant - more relevant is that this is the first real footage we&#39;ve put together of the game.Guess who gets to see it first?! :DYou can share it with your friends, and you can even talk about it publicl...

Yes, games matter. Yes, even now.

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&#39;s why.When I was about 11, I stumbled across the Ultima series of games. Here was this whole world I could...

Hierarchical FSM Code Dump

It&#39;s based onthis writeup of how Halo 2&#39;s AI worked.I&#39;m never going to polish any of this up enough to be an Asset Store thing, but maybe it&#39;ll be of use to some of my backers regardless. What you&#39;ve got here is the hierarchical FSM system I&#39;ve built out for Spartan Fist, plus a reeaaally basic AI setup, so that you can kind of see how it&#39;s meant to be stitched together...

Thinking about where the market is

Hola patrons!This is the first of, hopefully, many patron-only posts I do. Y&#39;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 ...

July 2016 patron supported

Thank you so much for the support this month!

IT BEGINS (also this is really rough)

Thought folks over here might like to see what we&#39;re working on next. This&#39;d be Spartan Fist.

June 2016 patron supported

Thank you so much for the support this month!

More Models