Sunday, March 25, 2012

End of Spring Break

Well, I didn't manage to finish my game in a single week. I got distracted by TopCoder events and other things for the last half of the week. I'm not going to abandon the project though. Here's a demo so far:

Read on...

Sunday, March 18, 2012


The control scheme's been throwing me off. The physics code works fine until I try and get it to react to the mouse. Nothing I've tried works very well.

My first thought was to have the mouse control the rotation of the center joint of the character. (The character is made up of three points with a single joint at the middle point.) Doing that interferes with the rest of the physics code though. I can't really tell how it feels to play because of that. (Verlet physics isn't great at handling rotational constraints.)

My second try was to just move either the hands or feet towards the mouse. That works better, especially with a bit of code to prevent the center of mass from moving. Unfortunately, it makes the rope really springy when you move the mouse around. It's too hard to play.

For a third try, I went back to the original method of just adding a force towards the mouse. Applying the force to the hands or feet works fairly well, but doesn't give much control over doing flips and the like.

For the moment, I'm trying to apply a force on the hand or feet towards the mouse, and a force on the joint away from the mouse. This should give the player some ability to flip without making the rope too bouncy or other such errors. Now I've just got to get the numbers right.

Using the Verlet physics does miss one thing though. Raising your arms should increase your moment of inertia, which makes you spin more slowly. The Verlet ragdoll model doesn't track moment of inertia explicitly, and I don't know if it works implicitly. I suppose it doesn't matter too much, since you'd probably want to control both the arms and legs to really take advantage of something like that.

Read on...

Saturday, March 17, 2012

More Physics

I've been working on the physics today. I think I'm going to stick with Verlet integration, but add a few more details. The player is now represented by 3 points instead of just the 1. Now I need to figure out how to handle the controls. With Verlet integration, just moving the points around to point at the mouse causes the player to go flying around without much control.

I want the mouse to control the arm when the player isn't on the rope, and then apply a bit of rotational friction to the feet to allow the player to do flips. Then, when they're swinging around, the mouse should control the feet to allow them to build up some momentum to move forward.

Conservation of momentum is important, but tricky. I suppose I don't need it to be perfect, but flying around by shaking the mouse should be discouraged. :P

Read on...

Friday, March 16, 2012

Grapnel Physics and Grapnel 2 Graphics

I wouldn't have expected it, but Inkscape is actually really good for pixel art.

For Grapnel 2, I'm currently imagining multiple areas to swing through, differing in graphics and the mix of traps to dodge. For the moment, I'm working on the classic Temple zone. I'll add others once everything else is working.

Anyway, here's what graphics I've got so far. It's enough to get started at least. The arms and the body are separated so they can rotate individually. They look a lot better when put together.

Now I've got to work out how to handle the physics of someone swinging around on a line.

The physics in Grapnel 1 was actually pretty simple. I used Verlet integration and treated the rope as a stiff spring if it was being stretched (and nonexistent if it wasn't). With gravity and a small acceleration towards the mouse cursor, IIRC, that's about all there is to it.

In Grapnel 2, I want to get rid of the artificial acceleration. Instead, I'm going to make the mouse control the torque applied between the arm and the body. That should give a much more realistic (and hopeful more interesting) control mechanic. It should also allow me to give bonuses for doing flips and such.

Read on...

Thursday, March 15, 2012

Spring Break Games

Several years ago, I played a game called Pendulumecha (IIRC). Whatever you might say about the gameplay, the physics are awful. Mechanically, there's a lot wrong with it. Enough that I thought I could probably do better than that in a day. So I started on a game that became Grapnel (see the About Me section). I did get most of the basics out of the way on day 1, but I spent the rest of spring break adding more details.

The next year, I happened to download the demo for Flash CS3 right before spring break. I decided to remake Grapnel in Flash. It took most of the week, and I ended up leaving out a couple of details, but I finished that and uploaded it to Kongregate.

It's been a few years, but I've been using Flixel and FlashDevelop recently, so this spring break, I think I'm going to try and make Grapnel 2. I have a couple of ideas on how to make it more than just a clone, but I'm probably going to need a few more.

Read on...

Wednesday, March 14, 2012

Board Games for Two

One of my current projects is to try and make a board game or card game that I can play with my wife. I've actually been working on this on-and-off for a while now, but none of my prototypes have sparked much interest either with her or with the BoardGameGeek community.

While she does like chess and Othello, I don't think she's particularly interested in abstract strategy games in general. Theme-wise, my current (very) short-list is:

I'm currently focused on the first one. Unfortunately, the current version is a solo game. It's still interesting though, so hopefully I won't abandon it.

Read on...


Hello World! (Ok, so I'm bad at introductions and conversation in general.)

I'm a programmer, mathematician, game designer, gamer, etc. I've been trying to make something worth selling for a long time now and always run up against the same barrier. I can't finish any of my projects. I know that finishing a product and releasing it aren't the same thing (especially in software projects), but I just can't keep myself interested in any one project long enough to get it to a point where I think it'd be worth money, or even worth releasing for free.

So I'm writing this blog in an effort to get my ideas down in words, to keep things organized and (hopefully) to gather a few useful comments.

Read on...