pygame is
Simple DirectMedia Layer is
Site Swing

PySpaceWars - 0.8.0

Neptunus Maris (neptune)



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


Home Page:


click to view original size


PySpaceWars - 0.8.0 - Oct 27, 2008 account Comments

If you wish to leave a comment with your 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

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)

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
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)

Yes you can use them...they are not mine anyways...let me direct you to some free game art.

Then look in the "Spritlib" section and you will find some space sprites.
October 28, 2008 2:13am - trubsee - nickname: (trubby)
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)
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...

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)