pygame is
Simple DirectMedia Layer is
Site Swing

SpaceFlight2D - 0.0.3

Robin Wellner (gyvox)



A small 2D space shooter. Fly to planets and conquer the universe!


Have you found a bug or want some new feature? You can always send an email to


Left: Turn left
Right: Turn right
Up: Speed up
RShift: Boost speed
Space: Shoot
Escape: Back/exit
B: Build a base (if landed on a planet without a base)
F: Oil refill (if landed on a base)
R: Repair (if landed on a base)
D: Drop some oil (if landed on a base)
A: Zoom in
Z: Zoom out
M: Open/close map
E: Hold down for ExtendedVision
P: Pause
S: Save game

Features to come before V1.0:

  1. A better soundtrack
  2. Complete storyline
  3. Possibly colours


All versions (including the latest) can be downloaded from
GitHub repository:
The old MusicPack available at:
The new one is at


Added oilgauge, improved gravity, you can see and build the base now, cut back on size, if you're landed at the base you can refill the oil.


Home Page:


click to view original size


SpaceFlight2D - 0.9.2 - Jun 12, 2009
SpaceFlight2D - 0.9.1 - May 21, 2009
SpaceFlight2D - 0.9.0 - Apr 2, 2009
SpaceFlight2D - 0.8.5 - Feb 3, 2009
SpaceFlight2D - 0.8.0 - Dec 30, 2008
SpaceFlight2D - 0.7.0 - Dec 16, 2008
SpaceFlight2D - 0.6.1 - Nov 3, 2008
SpaceFlight2D - 0.6.0 - Nov 2, 2008
SpaceFlight2D - 0.5.0 - Sep 20, 2008
SpaceFlight2D - 0.4.0 - Sep 6, 2008
SpaceFlight2D - 0.3.5 - Aug 29, 2008
SpaceFlight2D - 0.3.0 - Aug 22, 2008
SpaceFlight2D - 0.2.0 - Aug 14, 2008
SpaceFlight2D - 0.1.1 - Aug 13, 2008
SpaceFlight2D - 0.1.0 - Aug 13, 2008
SpaceFlight2D - 0.0.3 - Jul 31, 2008
SpaceFlight2D - 0.0.0 - Jul 27, 2008 account Comments

If you wish to leave a comment with your account, please sign in first.

December 23, 2010 2:49am - Robin Wellner - nickname: (gyvox)
A note: SF2D is discontinued, you may want to check out Space (
February 4, 2009 11:34am - Robin Wellner - nickname: (gyvox)
Ah. Well, please let me know if you can reproduce it (if you happen to have it saved, please mail the save-file to me).
February 4, 2009 10:57am - pymike - nickname: (pymike)
Oh, I did 6 planets. I couldn't find any others :-P
February 4, 2009 2:40am - Robin Wellner - nickname: (gyvox)
Oh, and if you happen to find more bugs, please send an email to ;).
February 4, 2009 2:07am - Robin Wellner - nickname: (gyvox)
Nothing happened? When did nothing happen, exactly? When you built a base on 8 planets? Because you should have gotten a message, and be able to continue to another system.
February 3, 2009 5:12pm - pymike - nickname: (pymike)
Interesting. I conquered all the (apparent) planets. Nothin happened :( Add more action!
December 17, 2008 1:07pm - Robin Wellner - nickname: (gyvox)
Damn accidental double click!
December 17, 2008 1:06pm - Robin Wellner - nickname: (gyvox)
1 Thank you :)
2 Implemented. You'll see next release.
3 I think so, but I'm not really shure.
December 17, 2008 1:06pm - Robin Wellner - nickname: (gyvox)
1 Thank you :)
2 Implemented. You'll see next release.
3 I think so, but I'm not really shure.
December 16, 2008 4:30pm - retroredge - nickname: (retroredge) - 3/5
Nice idea. When zoomed out a long way it's hard to tell which direction you're pointing in. Maybe including a heading indicator on a HUD or in a corner somewhere.

Did you get sound working in the exe? I tried to build an Asteroids exe with py2exe but it fails with an error about the Mixer class when you try to run it.
September 5, 2008 11:41am - Robin Wellner - nickname: (gyvox)
Does anyone what I'm doing wrong with the enemy ship AI? I think I may have switched sin()s and cos()s, or forgot to rotate 90 degrees, or did rotated it the wrong way. Did anyone see what I did wrong?
August 29, 2008 1:03pm - pymike - nickname: (pymike)
The game freezes when I press space. :S
August 29, 2008 9:57am - Samuel Backman - nickname: (pyscripter)
August 29, 2008 8:28am - pymike - nickname: (pymike)
Hey pyscripter, do you have an email I can reach you at?
August 29, 2008 2:40am - Samuel Backman - nickname: (pyscripter)
Really cool game!
August 22, 2008 4:43pm - Robin Wellner - nickname: (gyvox)
Actually, you can shoot. I use no bullet system, but directly check for a hit instead.
August 14, 2008 5:21pm - pymike - nickname: (pymike)
Cool! That worked :-)

The game runs now, and it's pretty cool! But I can't shoot... might want to fix that? Anywayz, keep up the good work! Cheerz ;-)
August 14, 2008 3:49pm - Robin Wellner - nickname: (gyvox)
I have no idea what could cause that... I just rezipped it and uploaded the new .zip-file.
August 14, 2008 1:54pm - pymike - nickname: (pymike)
When I try to extract this version I get this error:

unzip: cannot find or open /tmp/, /tmp/ or /tmp/

(I'm on Ubuntu 8.04. The previous version unzipped fine)
August 14, 2008 1:15pm - Robin Wellner - nickname: (gyvox)
Arg! OK, it's included now.
August 14, 2008 10:42am - pymike - nickname: (pymike)
You forgot to include the package "MyPGL"
August 13, 2008 10:58am - Robin Wellner - nickname: (gyvox)
Yes, I had that one too. If it crashes while saving the settings it crashes the next time too. Next release, I'll include default values for the settings.

You may need to change SaveSettings() into:
def SaveSettings():
f = open('data/settings.txt', 'w')
f.write('Sound Volume\n\tMusic: %d\n\tEffects: %d\nKeys\n\tUp: %d\n\tLeft: %d\n\tRight: %d\n\tFire: %d\n\tLaunch: %d\n\tBuild: %d\n\tRepair: %d\n\tFill: %d\n\tPause: %d\n\tZoomOut: %d\n\tZoomIn: %d\n\n'
'#Default Keys:\n#Action\t\tKey\tCode\n#Speed Up\tUp\t273\n#Steer Left\tLeft\t276\n#Steer Right\tRight\t275\n#Fire\t\tSpace\t32\n#Launch\t\tRShift\t303\n#Build Base\tB\t98\n'
'#Repair\t\tR\t114\n#Fill oil tank\tF\t102\n#Pause\t\tP\t112\n#Zoom out\tZ\t122\n#Zoom in\tA\t97\n#\n#For other key codes, check pygame.locals'
August 13, 2008 8:55am - pymike - nickname: (pymike)

Traceback (most recent call last):
File "/home/michael/sf2d/", line 162, in <module>
NameError: global name 'FX_VOLUME' is not defined
July 29, 2008 8:16am - pymike - nickname: (pymike)
Haha I see you discovered my beta aaline library :-D I was gonna try it out but I don't have pygame on this computer :-(

our projects welcomes all python game, art, music, sound, video and multimedia projects. If they use pygame or not.
recent releases
Aug 24, 2016

Aug 3, 2016

Aug 2, 2016

Aug 1, 2016

Jul 29, 2016

Jul 24, 2016

Jul 1, 2016

... more!
for pygame related questions, comments, and suggestions, please see help (lists, irc)