Poem – “Long Way to Love”

So she kisses my back,
and I curl
      beneath the weight;
these feelings sit heavy,
but I think
      that I know the way.

So we hope, for tonight,
the engine
      will not succumb
to our quick-beating hearts
— there is still
      a long way to love.

This journey’s not over
past the distance we drove;
with our friends in the headlights,
down a thousand new roads.

And just over this hill
is our home,
      at least for one night;
we’ll move on tomorrow,
as we go
      where we think is right.

This journey’s not over
past the distance we drove;
with our friends in the headlights,
down a thousand new roads.

Farewell to yesterday’s
honeymoon,
      so we’ve been told;
we’ll hold to these things hoping
they remain,
      as they always should.

Posted in Uncategorized | Leave a comment

Poem – “Werewolf”

I wrote a new poem today – sparked by a conversation between coworkers.

It’s called Werewolf

As the leaves and clouds gave way
To the faintest slivers of light
Which etched deep across his face
The myriad tales of life

Then, in our last moment of empathy,
What once stood as a proud man,
Hunched behind my husband’s beard
And growled from behind his widening grin

This was the smile which had loved me
When my beloved returned from sea,
And the man who would embrace me
Beside the empathy of the waves

This had been our life
But now that face has gone afar
With the glint of light in this old dog’s eye
And the silver that buried him in the leaves

This is my 100th poem in maintained, recorded history.  The other 99 are available in this archive, and future poems will be posted to this blog and to my archive.

Posted in Poetry | Leave a comment

Just About the Creepiest Bug Ever

So I came across a very peculiar bug in a project I’ve been heading up code-wise.  I implemented some idle animations for a pair of hands and, without really thinking it out, set them up as additive animations.

Here’s what that resulted in:

Creepy Pasta Hands

From Unity’s manual, here’s what they have to say about it:

“When using Additive animations it is critical that you are also playing some other non-additive animation on every transform that is also used in the additive animation, otherwise the animations will add on top of the last frame’s result. This is most certainly not what you want.”

So essentially, to avoid this bug, make sure you always have an animation playing that you can add the additive animations to, otherwise it will continuously add them to nothing, resulting in creepy pasta fingers.

To fix this in my project, I just had to always be playing, or blending into the idle animation when other things weren’t playing.  Later on I added another additive animation for pulling the hands back – it went much more smoothly.

Posted in Behind the Scenes, Design, Unity | Leave a comment

Scratchpaper Notes From Aero! 1.0

Here are some scratch-paper notes from Aero! 1.0.

These notes are mostly related to figuring out how to build the OSX dock-style altimeter used in the game, however there are also notes I made while working aerodynamic formulas into something more gameplay and iOS device compatible.

Posted in Uncategorized | Leave a comment

Scratchpaper Notes From Thermobot 1.0

As was originally planned for this blog, I’m going to start posting design notes and scratchpaper from my projects.

Here are some random scratch-paper notes notes from my work on GameDesk’s Thermobot.  Since doing these, I’ve pretty much forgotten what they mean, but they were helpful at the time.  I believe most of this stuff is about the dynamic, custom thermometer system in the first Thermobot minigame.





Posted in Design, Notes | Tagged , , , , , | Leave a comment

If a Partypode Leaves the Station at 2:00 PM EST…

Okay, maybe that’s not the question I’m after.  What I was really after was a formula to help me figure out how many degrees a partypode must turn per-frame to double back on itself.

To figure this out, I first formed a word problem out of it (yes, real-life M.A.T.H.S. at work).  That word problem went something like this:

If a partypode is moving at 1 meter per second and must make a turn that will land it 1 meter below where it started the turn, how many degrees should it turn during each frame of the game.  The partypode must maintain its speed whilst making this turn.

So, I started off with some of what I remembered of Algebra II in high school – namely those bits about radians.  A circle has a circumference of pi times the diameter (d), or pi*d.  From this, we can conclude that (pi*d)/2 is half the circumference.  Since that is the same as (pi/2)d or pi(d/2), we can replace the d/2 by using something that is already half the diameter – the radius!  So we take d/2 and turn it into radius, or r, and this leads us to the conclusion that half the circumference is pi*r – which is a radian, yay!  So a radian is the angle covered by traveling one pi along the edge of a circle with a radius of 1.

With that knowledge fresh in my mind, I then set about solving the problem at hand.  First of all, since we know that the partypode must end up 1 meter below where it started, we can say that the diameter of the turn it must make is 1 meter.  Given that, we can conclude that the radius is 0.5 meters.  Since we know that the distance halfway around a 1 meter radius circle is pi meters, or 1*pi meters, we know that the distance around our circle is 0.5*pi meters.

Now it becomes a problem of figuring out how long it takes to travel that distance in seconds.  Since it says in the word problem that the partypode travels at 1 meter per second, and since we figured out that the distance it must cover in its turn is 0.5*pi meters, we know that it will take 0.5*pi seconds.  Woo hoo!  Now what?

So here’s what we know so far:

  • The partypode must turn a total of 180°
  • It must take 0.5*pi seconds to complete the turn
  • There are… oh wait, we don’t know how many frames are in a second!

Actually, what we’re really after, is how much time is in between each frame in seconds.  Initially, your reaction might be to just say, “Well my game runs at 30 frames per second, so it’s 1/30th of a second!”  You’d be wrong though – sort of.  While in the ideal world, games would always run at a smooth 30 or 60 or 478 frames per second, this is the real world and computers are stupid and vary the framerate.  Fortunately, most game engines have a built in variable for the time between each frame (a.k.a. delta time, or pi*t).  In unity this is called Time.deltaTime.

So here’s what we know now:

  • The partypode must turn a total of 180°
  • It must take 0.5*pi seconds to complete the turn
  • There are Time.deltaTime seconds between each frame

With this, what we have to do is take the number of degrees it must turn in total (180) and adjust that to the number that should be turned per frame if it took 1 second to complete the turn.  This gives us 180*Time.deltaTime.  Then we need to cut down that angular speed accordingly to account for the fact that it takes longer than a second – we do this by dividing that new number by the time it should take to complete the circle.  This gives us (180*Time.deltaTime)/(0.5*pi).  The parenthesis are not necessary, since the order of operations would handle it properly, but I like to use them for visual clarity.

So that’s it, that’s the formula:

(180*Time.deltaTime)/(0.5*pi)

Beyond this, I multiply the whole thing by a speed variable so I can actively change the partypode’s speed:

((180*Time.deltaTime)/(0.5*pi))*speed

Posted in Design, Notes, Partypode, Projects | Leave a comment

Partypode – A body of bug

Last night I did a little work with building the body segment for the Partypode (centipede-like monster).

In just a couple hours I whipped up the base mesh and also did a little bit of animation for it.  It’s been a while since I’ve gotten to have my hands in the art side of things, so this was a great vacation from the code grind that is my norm of late.

The Partypode is a robotic centipede-like creature which, on higher levels or difficulty settings, can open a hatch on its back and launch a projectile towards the player(s).  Instead of legs, it is suspended above the surface of the ground via a series of thrusters, which undulate in sequence, much like the legs they have replaced.

Later on, I will create the model for the head segment and post that up.

Enjoy some screenshots of the Partypode body segment:

Posted in Partypode, Projects | Leave a comment

Partypode – New Personal Project

Today, I’ve decided to start posting information about the development of my current personal project.  This is planned for release on various Downloadable Content stores, such as Apple’s App Store and Steam.

The project is called Partypode, and as I’m sure you’ll notice, it is based on the gameplay classic Atari game Centipede.  However, don’t go thinking that this is just all about racking up points by shooting bugs – this time around things are a lot more dangerous, and you’ll be able to bring along some friends.

After getting a Centipede arcade cabinet at GameDesk, I began intensely studying the AI of the spider – it seemed so intelligent!  However, after conversing a little with Dona Bailey (one of the original game’s programmers) and reading this post on Twin Galaxies, I came to the sad realization that the spider actually has no real “AI.”  It’s just completely random.

That said, I decided to recreate the spider’s mechanics on my own – this time with a slight bit of intelligence and varying degrees of difficulty that go beyond just turning up its speed.

So I started the process by jotting down my observations of the AI.  It went something like this:

Here’s a list of things that I know are implemented in the AI:

    •It starts at the left or right of the screen.
    •Horizontal motion can only move the spider further from its starting edge (or no horizontal motion).
    •The spider always moves vertically, and at a constant positive or negative of a speed variable.
    •When moving horizontally, it’s horizontal speed is equal to the vertical speed’s variable (positive or negative depending on direction).
    •Due to the nature of its motion varialbles, the spider can only move Up, Down, or at 45 degree diagonals away from its starting wall.
    •The spider has a timer that determines how frequently it can spawn.

And here are some observations I’ve made about the AI:

    •Much of the time, the AI seems to be able to “seek” the player directly if it is lined up with one of its currently available paths.
    •If you sit in the middle, far left, or far right of the play area, the spider will never touch you (at least in my experiences).
    •Often times the spider will completely disregard any desire to “seek” the player, even if it is within its range of motion.
    •The spider does not appear to deliberately attempt to position itself such that the player is within range of motion.
    •The spider sometimes “wanders” about the scene.
    •The spider’s spawn timer seems to have some range of available randomness.

And here are some assumptions I’ve made but am not sure on:

    •The spider only “wanders” vertically, and will begin horizontal motion either when the player is within range of motion, or when a randomly timed factor tells it to.
    •The spider will try to “trap” the player by moving to a position nearby, far enough to not touch the player, but close enough that they might freak out and move to avoid – hitting the spider in the process.
    •The spider is self-sufficient and does not need humanity – furthermore it has killed Dona Bailey and Edd Logg.

Based on most of these assumptions, I set out writing my own version of the AI in Unity – ah Unity, how I love thee.

Ultimately, it came down to this one component and its myriad variables:

The spider has several timers which, when they go off, all randomly do or do not trigger events.  For example, if the changeVertDirectionTimer goes off, then the spider has a 70% chance of changing its vertical direction.

The touch of AI comes in with the pursuePlayerCheckTimer.  By default, the spider checks if the player is within its range of motion every 0.7 seconds.  If the player is aligned with one of the spider’s available paths, it then decides if it wants to actually pursue the player given a default 50% chance of getting that urge.  However, because it runs this check every 0.7 seconds, there’s a 50% chance that it will change its mind in the middle of the chase, or that the player will be long gone before the spider reaches its target.

So, that’s where I’m at with the AI work – spider is complete.

I have also integrated controls for the player – including shooting little capsules that don’t do anything apart from disappearing when they hit something.

I hope that soon I’ll be able to share some footage of single player gameplay with everybody, so stay tuned.

Posted in Partypode, Projects | Leave a comment

You Can Touch It, But You Can’t See It

I’m beginning a series of “Behind the Scenes” posts which will explain various bits of technology and design concepts involved in making video games.

Today, I’m going to discuss a concept I call Coinciding Collision Meshes.

What this means, is that you have multiple variations on structures with which physics-enabled objects can collide.  In other words, if a box is thrown against a collision mesh designed to react to boxes, it will bounce off of it.  However, if that same box is thrown against a collision mesh designed for potatoes or rubber balls, it will go straight through the mesh structure.

To illustrate the idea of collision meshes, here are some pictures of a single collision mesh in use.  Notice how the “mesh” is actually made of differently sized boxes.  This is the most common method used to quickly block off certain areas of a level – in this case I was blocking off the pits around the side of the room to keep the player from falling over the edge.

Once the boxes have all be placed, they are then made invisible to the player.  So when you play the game, all you see is a pit.  If you try to walk into it, you hit an invisible wall.

If this game was a first person shooter, and you wanted to be able to shoot down or over the pit, you could simply put all your projectiles in to a “Projectile” layer and tell the collision mesh to ignore them.

Now, to explain Coinciding Collision Meshes!

As I said above, this is when you have multiple variations on a structure with each variation being designed to collide with a different physics object.  One of the most common uses for this in games is stairs.

As I’m sure you’re aware, stairs are comprised of steps.  In game engines, players typically have an attribute called “step height” or some variation on that.  The step height is the maximum height that a player can step up a ledge; so if the height was above the player’s head, it would imply that they could somehow raise their feet above their head and push themselves up to the next ledge.  Since that would be pretty weird, the step height is usually set to something more akin to a twice the height of a normal household stairway step; since our hero is cool enough to take stairs two steps at a time.

What you may notice however, is that both in real life and in games, if you take a step up it will slow down your forward motion while you’re exerting effort raising your body to the next height level.  In most game engines, this happens a lot less smoothly than in real life – it’s almost like if you were to instantly raise your body to the next height level the moment you put your foot on the next step.  Since that looks pretty weird, especially in a game perspective, it has become relatively standard practice to turn stairs into ramps.

When a player walks up a sloped ramp, their elevating motion is every bit as smooth an ascent as the ramp itself.  However, what if we still want it to look like stairs, even though we walk up them smoothly?

For this, we use a simplified collision mesh, which, like the boxes in the images above, will be invisible to the player, but will still restrict the player’s movement.  So the environment artists can still throw in stairs to their hearts’ content, but the player will only see them visually, while their in-game body reacts to the invisible ramp aligned with the stairs.  This creates a smooth motion as the player climbs up what looks like stairs, but acts like a ramp.

That however, is still just a single collision mesh – what if we want the player to walk up the stairs smoothly, but we still wanted their feet to react as though they were walking up steps?  For this, we use coinciding collision meshes.

The initial setup for this, is to have a general player collision object, usually a capsule shape that covers the whole player, with the bottom just a little above the feet.  This capsule moves with the player and collides with the ramp collision mesh as discussed above.  In addition to that, they also have collision objects on their feet, which are set not collide with the ramp collision mesh, but rather with the individual step collision meshes.

The setup for the collision meshes is illustrated in the screenshots below:

Posted in Behind the Scenes, Design | Leave a comment

What Was Old Is New Again

In reaction to a strong desire to test the limits of Unity 3′s Deferred Lighting system, I came up with a test.

Somewhere in 2008 or 2009, I took at Hard Surface Modeling class and came up with this scene:

This won Best of Quarter at The Art Institute of California - Los Angeles

Last night, I decided that this would be the perfect scene to put into Unity.

So I set about splitting the scene up into multiple files based on repeatability.  After that, I began doing simple texturing and lighting.  Here’s what I came up with:

It seems to run at a semi-healthy 32 frames per second almost consistently, though that’s on pretty good hardware.

Next, I want to optimize this scene – make it look as close to the raw meshes as possible, while running at a really good framerate.  I’m going to divide the scene up even further, change the mesh detail into normal and parallax map detail.  After that, I’ll probably grunge it up a bit with base and decal textures.

Here are a couple other angles of the scene:

Posted in Experimentation | Leave a comment