This is a quick introduction to Games,
Perl,
and SDL (Simple DirectMedia Layer,
a cross-platform multimedia programming library).
We'll write a small game -- Lunar Lander -- in 100 lines of code,
or less.

So, let's fix this problem, making the spaceship scriptable. (We could write some code to handle keyboard and joysticks now, but an scriptable spaceship will be easier to start. Remember, focus on the game logic!)

So, create add this simple script to the end of your file:

__DATA__
at 41s, accelerate 10 m/s^2 up
at 43s, 10 m/s^2
at 45s, 10
at 47s, 10
at 49s, 10

The script is straightforward: it simply states a time when we will push the spaceship up with a given acceleration. It accepts free text: any two numbers you type will work.