Tuesday, September 7, 2010

Ramps and Rescuee Running

Work on my lunar-lander-on-a-disc game has been slow but steady. None of the pieces I've been working on are anywhere close to done. Here's a clip demonstrating where things are at:



The rocket has a couple of gangplank ramps that can be folded down. I'm still working on the physics of them. The ramps have a combination of several different constraints in the Chipmunk physics engine: They have a pin joint and a rotational limiter for the hinge, and then some sort of motor for opening and closing. I experimented with a rotational motor and a winch type of thing attached to the tip of the ramp. Ultimately the ramp hinge and motor need to be able to fail, too, if they're pushed too hard.

The little people on the surface now move toward the rocket when it's on the ground. “Toward” is a tricky concept. I thought I might be able to get away with local optimization (head in the direction on the ground that moves you toward the rocket) but quickly discovered places where they get stuck: mostly on slopes with a bit of concavity pointing toward the rocket.

I think what I will end up doing is identifying some “closest” point on the terrain and then determine the short way around the planet to reach it for each rescuee. I still need to limit their movement so they can't go around underhangs. Eventually I want them to run to avoid being directly under the rocket, and to approach the expected landing site even before the rocket has landed. Lots and lots of little details like moving more slowly on slopes, and waving only when they see you but think you might not see them, or something like that.

The main worry I have at the moment is that sitting around waiting for guys to board the rocket will be boring. Rescuing ten people before this change took me about five minutes, so about 30 seconds apiece. It looks like that time could easily double. That's not a problem so long as the player feels engaged. With the flight portion I didn't feel engaged until I decoupled the attitude control from the thrust direction so it was easier for the player to keep the rocket under thrust the whole flight.

I'm thinking about having some Starship Troopers-style spider enemies that pursue the guys on the ground. If you had to supply suppressing fire while they ran to the ship it might keep things interesting.

I also envision (although I don't know when I would implement it) having little scenarios associated with each rescue. Like you might have already-rescued guys come down the gangplank and wave people in, or maybe there'd be someone who needs carrying so they would have to go out and help with that. Little bits of pantomimed story that would spark the imagination.

The current version of the game is available on its website. The ramps go up and down with the G key (I guess I was thinking of landing gear).

No comments:

Post a Comment