pygame is
Simple DirectMedia Layer is
Site Swing
Rock Blaster

Rock Blaster - 1.0

Jeff W (jwalt)



This is my first attempt with writing a Pygame game. It's pretty simple at this point. Blast away to earn points until you die. I plan to add an ending and more interesting enemies later. I'm new to this and constructive feedback is appreciated. Thanks! Note - The poor artwork is mine, but I used a Nasa (public domain) image for the background.


New features added to Rock Blaster 1.0: Highscores saved between games; 3 levels; Screensize and shipspeed adjusted.


Home Page:


click to view original size


Rock Blaster - 1.0 - Sep 24, 2008
Rock Blaster - 0.10 - Aug 24, 2008 account Comments

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

September 29, 2008 1:52am - Jeff W - nickname: (jwalt)
Nevermind, answered my own question. You mean add a buffer space on each side of the screen. I guess I'm a little slow. =)
September 28, 2008 11:25pm - Jeff W - nickname: (jwalt)
Thanks. Yeah, I don't really like how that happens, but it was the first way to do it that I could think of. Your way makes a lot of sense. (Actually it makes a lot of sense for moving anything.) I have a dumb question though - can you define 'tab'?
September 28, 2008 4:03pm - Andy Hanson - nickname: (rhodiumgames)
Edit: Line 4 is
Choose a random angle going from 0 to 90 degrees either way from down
September 28, 2008 4:02pm - Andy Hanson - nickname: (rhodiumgames)
I'm guessing your rock-creation algorithm goes like this:
Choose x in range [0,screenWidth]
It's at the top
Choose a random angle going 90 degrees either way from down
This means that some rocks are going to start at the edge and move off the edge horizontally. UNFAIR!
Better algorithm:
Choose x in range [tab,screenWidth - tab]
It's at the top
Choose ending x in range [tab,screenWidth - tab]
Ending y is screenHeight of course
Calculate angle so that you'll reach (ending x,ending y)
Tab doesn't have to be too big, but the ship stops when its wing reaches the edge, so if a rock was partly offscreen then you might not be able to shoot it.

our projects welcomes all python game, art, music, sound, video and multimedia projects. If they use pygame or not.
recent releases
Oct 1, 2015

Sep 11, 2015

Sep 6, 2015

Aug 26, 2015

Aug 25, 2015

Aug 21, 2015

Aug 16, 2015

Jul 30, 2015

Jun 24, 2015

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