((CollidableEntity) e1).OnCollide((CollidableEntity) e2)
Oct 11th, 2011 by bug

It was pretty predictable.

Our project was simply too ambitious—too ambiguous—to deserve a year’s supply of BS&T squeezed fresh from a dozen undergrads. We needed something with a vision.

Heroes of Hat is an upcoming (yes, we have a release schedule already) belt-scrolling action game with hat-powered abilities. The story is a complete contrivance, but its “Press X to join” couch co-op and unique ability system should make it at least a few Saturday evenings’ worth of fun.

Jon (the brainparent of the game) has us programmers at the point of a taser, rushing to get something playtestable before we’re even assigned the task. Already we’ve laid down the bare, unbleached bones of a game engine, which have sadly formed a macabre cage around my creative heart:

public static void detectCollisions(Tile tile)
{
    foreach (var e1 in tile.containedEntities)
        if (e1 is CollidableEntity)
            foreach (var e2 in tile.containedEntities)
                if (e1 != e2 && e2 is CollidableEntity)
                    if (((CollidableEntity)e1).collides((CollidableEntity)e2))
                        ((CollidableEntity)e1).OnCollide((CollidableEntity)e2);
}

Utterly revolting to anyone with a coding conscience, and yet this is the only truly correct implementation given the current structure of Tile and CollidableEntity. Disregarding the inefficiency, the ambiguous ordering of the many and possibly redundant calls to OnCollides makes this code’s behavior very unpredictable. Jon and I are still evolving the collision framework, but alas, I forsee a swath of future monkey patches.

FireProjectile(ProjectileType.HookShot, GameOptions.MissileVelocity)
Sep 26th, 2011 by bug

We do indeed have a hookshot.

It’s about time that the essence of the game is revealed: aside from the standard FPS fare, we plan to include mild character development—”role playing” elements—along the likes of the MOBA genre. (While a primary goal is to create an online arena for 20 minute sessions of magic-and-gunslinging combat, a single-player/co-op campaign and accompanying storyline are also planned.)

As such, we have thrown around several character designs and dozens of special abilities, and chose to add at least two characters with unique attacks and movement patterns for the prototype. So far, we have the aforementioned grapple gun and a quantum entanglement device, which causes a synchronized quantum leap with another entity. (We just call it the Swap Ray.)

That’s about all I can say unconfidentially…

AddImpulseForce(new Vector3(0.0f, 700.0f, 0.0f))
Sep 19th, 2011 by bug

While our tiny autoclave of three members barely has enough free time combined to saturate the solution to this prototyping puzzle, things are starting to crystallize. Now we have a jump button!

Not only that, we’ve added a dummy mob that responds to forces exerted by the player, such as being bumped into or blown to pieces. This alone is the essence of any game (or even any story): a conflict, along with the means to resolve it. It’s what many have attributed the sensation of “having fun” while playing a game (or reading a novel). What remains now is to distinguish this game from basically every first-person shooter in history.

Unfortunately, our resident artist / story weaver / glorious leader has been incapacitated with the flu. His master stroke has yet to grace the canvas of this little experiment.

new ShipGameGame()
Sep 13th, 2011 by bug

We begin at the beginning. What better place?

More truthfully, this is merely the beginning of the development process. The Creative Process is far too grand and nebulous to document in sum. Already, many thoughts have been bubbled and missives exchanged about the broad ambitions and relatively novel qualities of this project. As this is however still the start of actual nose-to-grindstone action, a milestone worth commemorating, so do I herewith.

This is the prototyping phase, in which we flog our noggins for three weeks hoping to dislodge some remainder of genius that can be demonstrated in less than three minutes to a panel of industry professionals. Given the time constraints, we have elected to cut corners: most of the engine is already written, granted to us through the beneficence of the Permissive License.

The most significant contribution that we have made to this lucid font of game logic was made almost by mistake:

--- ShipGame/PlayerMovement.cs	2010-12-08
+++ ShipGame/PlayerMovement.cs	2011-09-13
@@ -204,1 +204,1 @@
-                    velocity.Y = Math.Min(0.0f, velocity.Y + dampingForce * elapsedTime);
+                    velocity.Y = Math.Min(0.0f, velocity.Y - dampingForce * elapsedTime);

Et voila, c’est la gravité. Granted, this form of gravity is relative to the player’s perspective, which leads to interesting scenarios such as looking at the ceiling and finding oneself sliding across the floor. (We spent several hours correcting this “feature”.)

Try this yourself! The tools are free for all university students. See if you can find the missing piece to the peculiar puzzle of camera-relative physics.

Hint: it’s a second rotation matrix.

»  Substance:WordPress   »  Style:Ahren Ahimsa