Lunar Panda - 1.0
Space action game featuring one brave Panda and a jetpack!
- Home Page
Pygame.org account Comments
Mekire 2013-05-09 01:48:09
Seems like a good start and a good team. I haven't had a chance to look at the code in too much depth yet but I'll throw a few things out there.
from pygame.locals import *
no matter what you see elsewhere, is not good. It floods your namespace with an enormous amount of garbage.
Now, no one likes to have to prefix everything with pygame, so my suggestion is to do something like this instead:
import pygame as pg
Next, people (programmers) tend to take exception to programs starting automatically in full screen. Also something about conventions; I assume you are at least familiar with PEP8, but things declared in your global namespace (which sure better be CONSTANTS) should be written in all caps. This way if someone sees one of these later in the code, they don't have to go searching for where it came from.
Speaking of which, this:
screenScroll = 0
is certainly not a constant; you need to find a better way. There really isn't any excuse to do this especially if you are trying to make code that is instructive to others.
In terms of resource loading, there aren't a ton of files for this program, but it would probably be good to look into loading at least images with loops. I personally like to load my images and place them in a dictionary keyed by their filenames minus their extension. With bigger programs, loading images individually becomes arduous.
And the last thing I can think of for the moment; the code at the bottom of your program which actually starts everything; should come under an if statement like this:
if __name__ == "__main__":
Again this isn't critical to the operation of your program but, (and again especially if the code is intended to be instructive) it is the proper way to do things.
I look forward to seeing more from your team,
wiygn 2013-06-21 15:37:56
Ok, guys. First of all I'm sorry for potentional mistakes in my english. So I had tried to launch the game after downloading and saw this errors:
File "~blabla\LunarPanda.py", line 164
if self._animFrame <> frameNumber:
SyntaxError: invalid syntax
File "~blabla\LunarPanda.py", line 673
if mrPanda.angleDelta <> 0:
SyntaxError: invalid syntax
I don't know where author find statements like "<>", but I'm sure, that he ments "!=". So I'd find&replaced <> on != and game started to work properly.
Gimpy Software 2013-06-28 12:25:58
Hi Guys, Sorry just saw these comments.
Mekire, thanks for taking the time to feedback. It's all useful stuff and we're always open to code suggestions to include in future releases :-) and obviously happy for you to tweak and change the code in the meanwhile
wyign, We'll fix this in our next release. Thanks for letting us know.
Gimpy Software 2013-06-28 12:27:32
Just added a little blog on 'How to play Lunar Panda'
Curious_Guy 2013-08-13 14:07:53
How Did you make pygame go into a fullscreen window? ill look into it myself, but i would like to know