Monday, June 28, 2010

Auto-zoom camera

I've posted a new version of my lunar-lander-on-a-disc game to its little website. The addition of an auto-zooming camera makes the game much more playable most of the time. Changes:
  • Auto-zooming camera (can be toggled off with Space)
  • Improved landing gear graphics
  • Tuned landing gear physics
  • Rocket has to be touching ground with both feet to count as landed
  • Display elapsed time after completing mission






The landing gear has been adjusted so it can't invert itself on hard impacts. I still need to transmit shock through to the hull when you reach the compression limit on the landing gear; a current “exploit” is that you can survive an impact of any magnitude so long as you can absorb it completely without letting the hull touch the ground.

Line drawing is very slow on some graphics drivers, so I'm gradually replacing my uses of that. The landing gear was one; the trajectory plots are the other.

The big change this week is the camera. Most of the time it works well enough that you can complete the game without needing to manually adjust it. The algorithm right now is very simple: it frames the rocket and the nearest objective.

The biggest place where this falls down is when you need to do some close maneuvering and the nearest objective is far away. It also doesn't work if the player has something else in mind besides going to the nearest objective. I've been trying to think of better metrics but haven't hit on anything yet. I think the camera needs may change once opposing force is added, so I will probably do that next. I'll start with some simple turrets and give the rocket the ability to shoot back.

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.

Monday, June 14, 2010

Mothership, version 1

There's now a mothership in my lunar-lander-on-a-disc game:



At the moment it just orbits around the planet. The idea is that after landing at all the ground targets the player has to rendezvous with the mothership to end the level.

The mothershp rendezvous necessitates additional camera work and probably also some work on the trajectory plots, so that is what I'll be doing next.

Monday, June 7, 2010

Games I'm Playing

The runup to E3 at work has been busy. I've been getting back to putting in an hour a night on my lunar-lander-on-a-disc, though. Not a whole lot of progress to report. There are now landing targets distributed over the planet surface which detect when the rocket lands close to them.



I recently purchased a PlayStation 3 and have been catching up with some of the games on that platform.



Uncharted 2 is very, very pretty. I find the relentless shooting a bit monotonous, but they have done an excellent job of mixing storytelling and gameplay.



I'm replaying Super Mario Galaxy with my four-year-old. It's reasonably fun.



PixelJunk Shooter is a solid little game that I'd recommend to almost anyone. Its looks belie its technical sophistication. It's one of two games I played recently to compare and contrast with my lunar lander project. Shooter sets a high bar and is making me rethink some things. For instance, they use a grappling hook to rescue astronauts, instead of landing next to them as is traditional in this type of game. The result is that the game flow moves much more quickly.



My wife's been playing Picross 3D obsessively since it came out. I finally got some time with it last night; it is really, really fun. Picross 3D uses a rather heavy-handed tutorial system to teach you the game; after playing Everett Kaser's logic games, which always stay out of your way but provide excellent hinting, it's a bit hard to take. Otherwise it's great.



Gravity Crash is the other game I played for inspiration in my lunar lander game. Unfortunately I just didn't find this one very fun at all. It feels like a total ripoff of Gravitron 2, and one of the problems they share is a tendency to add energy to the ship when colliding with the terrain. The result is that one collision can quickly spiral into being completely out of control, bouncing this way and that until the ship explodes. It suffers especially when compared directly with PixelJunk Shooter.



Flower is a nice, short little game. My four-year-old can play it fairly well. I do wish there was an option to steer with an analog stick instead of with accelerometers. About half the time you feel like the wind soaring over a field of flowers (as intended), and it is exhilarating and beautiful. The other half of the time you feel like you're trying to turn a semi truck around in an alley.