pygame is
Python
Simple DirectMedia Layer
 
 
pygame.org is
Site Swing
PySpaceWars

PySpaceWars - 0.8.0

Neptunus Maris (neptune)

Tags:

Description

This game is just a common space shooter game. My first game, not the last. Will be updates and more from me.

Links

Home Page: http://marislabs.org/ext/apps/?p=desc&a=download&app=1
Source: http://www.rdrvision.com/pygame/pyspacewars.zip
Windows: http://www.rdrvision.com/pygame/pyspacewars.zip

Screenshot


click to view original size

Releases

PySpaceWars - 0.8.0 - Oct 27, 2008

Pygame.org account Comments

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

December 15, 2009 5:08pm - inigo - nickname: (inigo) - 3/5
Another tip.

Your game runs too fast in my PC, try doing this:

Think in about 30 frames per second (about 0,030 ms for loop as max) and do this in your principal loop:

at begining take system time:

from time import time

----
T=0.03
while (true):
temp = time()
....
....
# at the end sleep until 0.03 seconds are reached
temp = time() - time
if temp < 0.03:
sleep(temp -0.03)

This way you will always have almost the same frame rate in your game, a razonable and controled framerate.

Keep walking :)
October 30, 2008 8:43pm - Skizzaltix Zaxali - nickname: (skizzaltix)
You're welcome :)

Oh! One thing I found that can screw the method I just posted up is if you ever *don't* modify the xMove and/or yMove when a key is pressed/released--To get around this, you can always modify the values as normal, but have a check in the sprite to see if it's allowed to move or not, and set the check to False or whatever if you want to keep the player still for whatever reason.
...Hope that helps--Obviously, you don't *have* to follow my advice here, but I've found this method works rather nicely for shooters.
Also, sorry for spamming your project page ^^;
October 30, 2008 8:34pm - Neptunus Maris - nickname: (neptune)
@skizzaltix

Thanks...I will work on that.
October 29, 2008 4:49pm - Skizzaltix Zaxali - nickname: (skizzaltix)
Neat! Shooters are always good to start out with.
A few points, though...
First, your movement handling is kinda clumsy. I recommend giving you player sprite an xMove and a yMove value, and then detecting when keys are pressed down--So, if the key is the right arrow key, make it so xMove += [movespeed], if it's left, make it so xMove -= [movespeed], etc. And then, detect k_up events, and say that if the key is the right arrow key, xMove = -xMove, etc. And, finally, to do the actual motion, in the sprite's update function, put self.rect.move_ip(self.xMove,self.yMove) or whatever.
Also, you want to have the bullets spawn at the center of the player sprite, rather than the upper right corner--You can do this by saying:
x,y,w,h = [playersprite].rect
x += w / 2
y += h /2
[bulletspawncenterpt] = x,y
etc.
Also, I recommend having the monsters shooter bigger bullets, and more of them--You want a real curtain of bullets here--There's a reason these games are called "curtain shooter games" ;)

Anyway, good job! Very impressive for a first game project. I look forward to seeing more from you!
October 28, 2008 11:14am - Neptunus Maris - nickname: (neptune)
@trubby

Yes you can use them...they are not mine anyways...let me direct you to some free game art. http://www.molotov.nu/?page=graphics

Then look in the "Spritlib" section and you will find some space sprites.
October 28, 2008 2:13am - trubsee - nickname: (trubby)
Hey.
Would I be able to use your space ship sprites for my game. I'll reference and everything.
October 28, 2008 1:16am - Ian Mallett - nickname: (geometrian)
Hello,
I recommend .jpg for size (a few artifacts often present) or .png for image quality. .gif is small enough, but only 256 colors can make things look weird.
October 27, 2008 10:54pm - Neptunus Maris - nickname: (neptune)
Oh man my screen shoot turned out bad with the graphics...
spotlight

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


Oct 20, 2014

Oct 16, 2014

Oct 9, 2014

Oct 8, 2014

Oct 7, 2014

Oct 4, 2014

Oct 1, 2014

Sep 19, 2014

Sep 17, 2014

Sep 9, 2014

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