[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pygame] Pygame tutorial



Shandy and Michael,

Thanks for your comments. I've made quite a few corrections and changes. I've 
tried to dictate how people should do things less, and even specifically 
mention alternatives where it seemd appropriate. I've put the full code 
listing in at the end, and a link to download the .py source file.

Tom


On Tuesday 04 March 2003 4:35 pm, Shandy Brown wrote:
> Well, since you've asked, here's some constructive criticism:
>
> General: There seems to be a lot of "always do it this way" mentality.
> I don't think new users should be told that there's only one correct
> way.
>
> Section 1
> P3 - "A game will consist of 6 main sections"
> I would change to "This game..." or "A common method of organizing games
> is..."
>
> P10 - "Every game you make should take..."
> maybe just omit that sentence
>
> Section 2.1
> An idea might be to follow the structure you laid out in section 1, even
> though it is just a hello world program, just to get the user used to
> it.
>
> Section 2.2
> "with white (250, 250, 250)"  - I'd call that very light grey.  White is
> (255,255,255)
>
> Section 3.1
> I heard somewhere that #!/usr/bin/env python is preferred over
> #!/usr/bin/python
>
> Section 3.2
> P1 - "You should put all your code of this nature first, in their own,
> classless functions" - This seems to be more of the "only one way"
> mentality.  Why shouldn't the user use classes?
>
> P4 - "It then appends the image filename to the data directory" - sounds
> a little weird. How about "This function assumes that all the images are
> in a directory called data.  It takes the name of the file and creates
> the full pathname, for example data/ball.png."
>
> P4 - "Finally it returns the image object, and its rect()" - don't know
> why you have the parentheses on rect().
>
> Section 4.1
> "def __init__(self, (xy), vector):" - whats the deal with the (xy)
>
> Section 4.1.2
> "With any game involving movement, you won't get very far unless you're
> comfortable with trigonometry" - maybe change to "With any game
> involving angular movement, ..."
>
> Section 5.1
> I think it would be clearer to a beginner to have
> self.side = "left" or "right"
> rather than
> self.which = 0 or 1
>
> "To make sense of how the ball moves" - think you meant bat.
>
> Section 5.1.1
> 	player.moveup()
> 	player.state = "moveup"
> This kinda breaks encapsulation.  I'd prefer to see self.state="moveup"
> inside the moveup() function.
> I'd also rather see the bat called "bat" instead of "player".
>
> Section 6.2
> "to stop the ball catching a ball that goes behind them" - "to stop the
> bat catching a ball that goes behind it"
>
> Section 6.3
> It would be really nice to have all the code listed in this document.
> As well as providing a simple .py file to download.
>
> - sjbrown
>
> On Tue, 2003-03-04 at 10:09, Tom Chance wrote:
> > Can somebody check this through and verify that I haven't made any
> > mistakes? I'm by no means a Pygame expert, nor a Python expert, and I
> > don't want to make it "live" on my web site until I'm sure I'm not going
> > to mislead anyone.
> >
> > Many thanks,
> > Tom

____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org