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
Feb 21, 2017

Jan 31, 2017

Jan 24, 2017

Jan 18, 2017

Jan 7, 2017

Dec 30, 2016

Dec 8, 2016

Nov 28, 2016

Nov 27, 2016

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