Lunar Lander

Just want to play my game without reading this whole post? Play the game here – press a key, mouse button, or touch the screen to fire the thrusters, and try to land at less than 4 m/s with as much fuel left over as possible.

In 1969, when all the nerds were still excited by sending humans to the moon instead of flinging cars around the sun, the hottest video game was Rocket (or Lunar) for the PDP-8. Originally implemented in FOCAL by high school student Jim Storer and soon afterwards ported to BASIC (the other dominant language to come as standard with microcomputers), Rocket became the precursor to an entire genre of video games called “Lunar Lander games“.

Source code of Rocket and sample output.
Like many pieces of microcomputer software of the time, Rocket was distributed as printed source code that you’d need to carefully type in at the other end.

The aim of these games was to land a spacecraft on the moon or similar body by controlling the thrust (and in some advanced versions, the rotation) of the engine. The spacecraft begins in freefall towards the surface and will accelerate under gravity: this can be counteracted with thrust, but engaging the engine burns through the player’s limited supply of fuel. Furthermore, using fuel lowers the total mass of the vessel (a large proportion of the mass of the Apollo landers was fuel for use in the descent stage) which reduces its inertia, giving the engine more “kick” which must be compensated for during the critical final stages. It sounds dry and maths-y, but I promise that graphical versions can usually be played entirely “by eye”.

Atari's Lunar Lander (1979)
Atari’s 1979 adaptation is perhaps the classic version you’d recognise, although its release was somewhat overshadowed by their other vector-graphics space-themed release in 1979: Asteroids.

Let’s fast-forward a little. In 1997 I enrolled to do my A-levels at what was then called Preston College, where my Computing tutor was a chap called Kevin Geldard: you can see him at 49 seconds into this hilariously low-fi video which I guess must have been originally shot on VHS despite being uploaded to YouTube in 2009. He’s an interesting chap in his own right whose contributions to my career in computing deserve their own blog post, but for the time being all you need to know is that he was the kind of geek who, like me, writes software “for fun” more often than not. Kevin owned a Psion 3 palmtop – part of a series of devices with which I also have a long history and interest – and he taught himself to program OPL by reimplementing a favourite game of his younger years on it: his take on the classic mid-70s-style graphical Lunar Lander.

Psion Series 3
I never owned a Psion Series 3 (pictured), but I bought a Series 5mx in early 2000 out of my second student loan cheque, ultimately wrote most of my undergraduate dissertation using it, and eventually sold it to a collector in about 2009 for almost as much as I originally paid for it. The 5mx was an amazing bit of kit. But I’ll blog about that another day, I guess.

My A-level computing class consisted of a competitive group of geeky lads, and we made sort-of a personal extracurricular challenge to ourselves of re-implementing Kevin’s take on Lunar Lander using Turbo Pascal, the primary language in which our class was taught. Many hours out-of-class were spent in the computer lab, tweaking and comparing our various implementations (with only ocassional breaks to play Spacy, CivNet, or my adaptation of LORD2): later, some of us would extend our competition by going on to re-re-implement in Delphi, Visual Basic, or Java, or by adding additional levels relating to orbital rendezvous or landing on other planetary bodies. I was quite proud of mine at the time: it was highly-playable, fun, and – at least on your first few goes – moderately challenging.

Dan's Lunar Lander (2018)
I sometimes wonder what it would have looked like if I’d have implemented my 1997 Lunar Lander today. So I did.

Always game to try old new things, and ocassionally finding time between the many things that I do to code, I decided to expand upon my recently-discovered interest in canvas coding to bring back my extracurricular Lunar Lander game of two decades ago in a modern format. My goals were:

  • A one-button version of a classic “straight descent only” lunar lander game (unlike my 1997 version, which had 10 engine power levels, this remake has just “on” and “off”)
  • An implementation based initially on real physics (although not necessarily graphically to scale)… and then adapted as necessary to give a fun/playability balance that feels good
  • Runs in a standards-compliant browser without need for plugins: HTML5, Canvas, Javascript
  • Adapts gracefully to any device, screen resolution, and orientation with graceful degredation/progressive enhancement

You can have a go at my game right here in your web browser! The aim is to reach the ground travelling at a velocity of no more than 4 m/s with the maximum amount of fuel left over: this, if anything, is your “score”. My record is 52% of fuel remaining, but honestly anything in the 40%+ range is very good. Touch the screen (if it’s a touchscreen) or press a mouse button or any key to engage your thrusters and slow your descent.

End point of Dan's Lunar Lander (2018)
“Houston, the Eagle has landed.” Kerbal Space Program, it isn’t. Here’s a very good landing: 3 m/s with 48% of the fuel tank remaining.

And of course it’s all open-source, so you’re more than welcome to take it, rip it apart, learn from it, or make something better out of it.

I can see (MegaLounge)Earth from here!

This link was originally posted to /r/MegaLoungeMars. See more things from Dan's Reddit account.

by an author

[this was originally posted to a private subreddit]

"You are here" pointing to Earth as seen by Spirit rover
This is the first image ever taken of Earth from the surface of a planet beyond the Moon. It was taken by the Mars Exploration Rover Spirit one hour before sunrise on the 63rd Martian day, or sol, of its mission. (March 8, 2004) The image is a mosaic of images taken by the rover’s navigation camera showing a broad view of the sky, and an image taken by the rover’s panoramic camera of Earth. The contrast in the panoramic camera image was increased two times to make Earth easier to see.The inset shows a combination of four panoramic camera images zoomed in on Earth. The arrow points to Earth. Earth was too faint to be detected in images taken with the panoramic camera’s colour filters.

ISEE-3

This article is a repost promoting content originally published elsewhere. See more things Dan's reposted.

Back in early March, I posted comic #1337, Hack, about a wayward spacecraft. ISEE-3/ICE was returning to fly past Earth after many decades of wandering through space. It was still operational, and could potentially be sent on a new mission, but NASA no longer had the equipment to talk to it—and announced that reconstructing the equipment…

Proxima Centauri is 4.3 light years way: too far to travel. Why don’t we just use Mercury (which has an 88 day year) as a staging ground, and launch from there?

This self-post was originally posted to /r/shittyaskscience. See more things from Dan's Reddit account.

by an author

Mercury’s year is only 88 days, so if we launch a rocket from there, we only have to travel for just over 1 light year, saving time and fuel.

TIL that in 1970, British Rail patented the design of fusion-powered interstellar spaceship

This link was originally posted to /r/todayilearned. See more things from Dan's Reddit account.

by an author

British Rail flying saucer

The British Rail flying saucer, officially known simply as space vehicle, was a proposed spacecraft designed by Charles Osmond Frederick.

Purpose

The flying saucer originally started as a proposal for a lifting platform. However, the project was revised and edited, and by the time the patent was filed had become a large passenger craft for interplanetary travel.

Design

The craft was to be powered by nuclear fusion, using laser beams to produce pulses of nuclear energy in a generator in the centre of the craft, at a rate of over 1000 Hz to prevent resonance, which could damage the vehicle. The pulses of energy would then have been transferred out of a nozzle into a series of radial electrodes running along the underside of the craft, which would have converted the energy into electricity that would then pass into a ring of powerful electromagnets (the patent describes using superconductors if possible). These magnets would accelerate subatomic particles emitted by the fusion reaction, providing lift and thrust. This general design was used in several fusion rocket studies.

A layer of thick metal running above the fusion reactor would have acted as a shield to protect the passengers above from the radiation emitted from the core of the reactor. The entire vehicle would be piloted in such a way that the acceleration and deceleration of the craft would have simulated gravity in zero gravity conditions.

A patent application was filed by Jensen and Son on behalf of British Rail on 11 December 1970 and granted on 21 March 1973.

The patent lapsed in 1976 due to non-payment of renewal fees.

Media attention

The patent first came to the attention of the media when it was featured in The Guardian on 31 May 1978, in a story by Adrian Hope of the New Scientist magazine. There was a further mention in The Daily Telegraph on 11 July 1982, during the silly season. The Railway Magazine mentioned it in its May 1996 issue, saying that the passengers would have been “fried” anyway.

When the patent was rediscovered in 2006, it gained widespread publicity in the British press. A group of nuclear scientists examined the designs and declared them to be unworkable, expensive and very inefficient. Michel van Baal of the European Space Agency claimed “I have had a look at the plans, and they don’t look very serious to me at all”, adding that many of the technologies used in the craft, such as nuclear fusion and high temperature superconductors, had not yet been discovered, while Colin Pillinger, the scientist in charge of the Beagle 2 probe, was quoted as saying “If I hadn’t seen the documents I wouldn’t have believed it”.

Wikipedia

Blimps… In Space

[this post has been partially damaged during a server failure on Sunday 11th July 2004, and it has been possible to recover only a part of it]

[this post was finally recovered on 13 October 2018]

Now here’s a funky idea – sub-orbital spaceflight in enormous helium balloons, up to a two-mile wide sub-space station (a permanant facility at the very boundries of our atmosphere). This could be used to carry spaceship components for assembly in orbit, and then launched using ion drives at a fraction of the price of rocket launches.

NASA space blimp

The designers estimate that they can have a functional prototype within seven years – given the funding they’d like – and that journeys into space could be done almost for free and much more safely (albeit at the time expense that it would take up to nine days to get there).

Marvellous.