Monday, June 21, 2010

Lunar Lander: Now with Fun

What a difference a couple of tweaks make!

In the comments to my last post I mentioned that the game just wasn't that fun because the player spent a fair amount of time waiting for the rocket to follow its ballistic trajectory to get somewhere. Even with time acceleration this lacked pizazz.

Before introducing the Chipmunk physics engine, the rocket was represented by a disc for collision purposes and its heading was controlled directly with the mouse. When I switched to a physically simulated rocket I got rid of direct heading control; instead the mouse set a target heading, which the rocket would steer toward using attitude adjustment jets. This allowed ground impacts to spin the rocket around, which looks cool. Unfortunately it also introduced a lag in changing the rocket's trajectory, which slowed gameplay down.

I am now trying a hybrid: I've decoupled heading control from the main thruster. The main thruster always invisibly thrusts directly in the target heading direction, while the rocket attempts to steer toward that target heading over time. This gives a good balance between the visual effects of the rocket steering or bumping into things and the increased control of direct thruster orientation. In my opinion it feels much better; as a player I feel like I can play right up to the edge of my reaction time instead of waiting around for the rocket. Here's a sample landing; note that I am thrusting nearly the entire time:

I have also reinstated a couple more trajectory plots from the original prototype, which together also greatly improve the fun. In the video above you can see three lines emanating from the rocket. The dim blue line (which has existed in all versions) is the ballistic trajectory. If you let the rocket coast without thrusting this is the path it will follow. The bright blue line is the powered trajectory. If you hold down the thruster button without steering the mouse, this is the path the rocket will follow. The red line is the braking trajectory: if you were to always thrust in the direction opposite your velocity this is the path the rocket would follow.

The braking and powered trajectories together allow you to fly with the thruster on at all times. You can see where you're going with the powered trajectory, and the braking trajectory lets you know when it's time to reverse direction and slow down. Flying with thrusters on all the time makes the game move more quickly but more importantly keeps the player engaged and feeling in control. If you need a breather you can always fly ballistically so it has a good skill-development path, I think.

The rocket landing gear has been improved a bit as well. It has shock absorbers on both leg struts now (the lower strut used to be a rigid swing-arm). This makes landing in a concavity much smoother, since that tends to pinch the feet together horizontally.

I've put another release out so you can try it if you'd like.

The trajectory plots are still works-in-progress. Besides drawing nice-looking ribbons, I plan to replace the braking trajectory with a simple icon at its terminus, and I want to toggle the highlight between the powered and ballistic trajectories depending on whether the rocket is thrusting or or not. I've also considered trying to fold the braking info into the other trajectory plots by using different colors for different segments of the trajectory. The things I've tried in that line so far haven't been useful, though.

As currently configured, rendezvous with the mothership is not too hard but it could probably stand to have some sort of heads-up display help. I haven't figured out what that might be yet. I'm sort of waiting until I get the docking mechanism (and position on the mothership) finalized more.

If you try out the prototype and have interface improvement ideas I'd love to hear them. Some sort of automated camera framing is top of my list: it's very hard to fly and manage the camera at the same time.

No comments: