Re: [pygame] Students Interested in Pygames Community

2011-10-22 Thread Russell Jones
Hello Elinor,

You might like to look at the book Invent Your Own Computer Games with
Python
It's available from Amazon as a paper book, but you can look at the whole
thing on-line first. Chapters 17-20 are on pygame, with the others on more
basic topics. See http://inventwithpython.com/chapters/

Russell

On 20 October 2011 21:00, Elinor Madigan em...@psu.edu wrote:

 Hello,

 I am currently teaching a course in Python at the Penn State
 Schuylkill Campus.  My students are experimenting with Pygames and
 they are interested in giving back to the Pygames community.  As my
 students have a variety of programming abilities, I am not sure they
 could provide any complex code.  With that being said, would it be
 beneficial to the community if they created some basic tutorials for
 you and if so, do you have any suggestions on possible topics?

 Regards,

 Elinor Madigan

 --
 Elinor M. Madigan, PhD, PMP
 Program Coordinator Information Sciences and Technology
 Pennsylvania State University
 Schuylkill Campus
 200 University Dr.
 Schuylkill Haven, PA  17972

 Phone:  570-385-6076
 email:  em...@psu.edu


Re: [pygame] Students Interested in Pygames Community

2011-10-22 Thread stabbingfinger
Hi, Elinor.

There may be an opportunity to provide answers to the questions frequently
asked on IRC channel #pygame. Tutorials do exist, and people use them. More
than a few pygame neophytes often come to the channel looking for a fast
track to pygame mastery. They don't want to read the API docs, articles, nor
look for examples outside the few tutorials available on pygame.org.

The questions' typical preamble: I'm looking at Punch the Monkey, but I
can't figure out how to...

Alas, even the venerable Punch the Monkey tutorial is not simple enough in
some circumstances. It is clear that there will always be an influx of
people who would appreciate a progressive collection of focus tutorials,
each small enough to digest with ease. A very useful feature would be
references (URL or module.Class.component) to the key pygame features they
demonstrate, linking the practical example to its API documentation.

Here are some of the questions I remember. The ones with oo (two o's) are
significantly more advanced than Punch the Monkey.

o  When I render my FPS in a font, it keeps overwriting itself and I can't
read it. (simple/proper game loop setup)
o  How do I manipulate Rect objects? (in all the various ways)
oo  How do I use sprite.Group, et al? (progression, simple to complex usage)
o  How do I test collisions? (this seems to be arcane to neophytes, though
the sprite.Group and Rect classes seem pretty straightforward)
oo  How do I handle collisions? (stop, rebound, slide along edges)
oo  How can I detect collisions between different shapes? (sprite.Group
supports custom collided callbacks; and there are other ways that don't
involve pygame)
oo  How can I detect pixel-perfect collision? (various handling involving
non-axis aligned math a bonus)
oo  How can I detect collisions for bullet or line-of-sight scenarios?
o  After a while my game window says Not Responding. (basic event
housekeeping)
oo  How can I make parts of my game process pygame events differently
(contextually)?
oo  I want an intro, a menu, a game loop, a high score, a credits... How do
I connect all these without having one monolithic, spaghetti tangle Game
class?
oo  How can I tint my surfaces, or overlay effects such as patterns?
oo  My game world is bigger than the screen. How do I manage the world and a
camera to update and draw only the visible parts of the world? (many
libraries do this, but they are not tutorials; people most often seek entry
to this concept so they can learn by writing their own library)

#pygame denizens can probably come up with many more.

Gumm


Re: [pygame] Students Interested in Pygames Community

2011-10-22 Thread Alec Bennett
I'm a big fan of using the game Simon as a vehicle to learn a programming
language.


Re: [pygame] Students Interested in Pygames Community

2011-10-22 Thread Luis Miguel Morillas
2011/10/20 Elinor Madigan em...@psu.edu:
 Hello,

 I am currently teaching a course in Python at the Penn State
 Schuylkill Campus.  My students are experimenting with Pygames and
 they are interested in giving back to the Pygames community.  As my
 students have a variety of programming abilities, I am not sure they
 could provide any complex code.  With that being said, would it be
 beneficial to the community if they created some basic tutorials for
 you and if so, do you have any suggestions on possible topics?


I'm using python and pygame with my students too. There are other
python and pygame experiences, but I like this model with C# and XNA:
https://www.facultyresourcecenter.com/curriculum/pfv.aspx?Id=8856c1=en-usc2=0Login=
They use a problem-solution methodology based on starter kits, where
studens have to detect and change some parts of code.  Maybe we can
prepare a similar path with pygame. I use this introduction to C# in
my classes too, giving it 40 hours more or less.

Regards,

-- luismiguel

 Regards,

 Elinor Madigan

 --
 Elinor M. Madigan, PhD, PMP
 Program Coordinator Information Sciences and Technology
 Pennsylvania State University
 Schuylkill Campus
 200 University Dr.
 Schuylkill Haven, PA  17972

 Phone:  570-385-6076
 email:  em...@psu.edu



Re: Re: [pygame] Students Interested in Pygames Community

2011-10-21 Thread Joe Ranalli
Besides the programming aspects, one of the great things is that it teaches
about the sciences as well.  Even the most trivial games require use of
basic physics concepts like vector math and the laws of motion, and require
mathematical integration for the time stepping.  Game programming is a
great educational vehicle for lots of reasons.

On Fri, Oct 21, 2011 at 1:54 AM, Ian Mallett geometr...@gmail.com wrote:

 Hi,

 I find simple games are helpful in teaching students.  With practice, one
 can hack up a very simple game in Python/PyGame in a matter of a few
 minutes.  At the end, people have a product to show for it.

 I often find students have a good time making games too, because it's
 surprisingly open-ended.  It also works at many levels of programming
 expertise, because games can vary in complexity.

 Ian



Re: Re: [pygame] Students Interested in Pygames Community

2011-10-21 Thread René Dudfield
On Fri, Oct 21, 2011 at 1:34 PM, Joe Ranalli jrana...@gmail.com wrote:

 Besides the programming aspects, one of the great things is that it teaches
 about the sciences as well.  Even the most trivial games require use of
 basic physics concepts like vector math and the laws of motion, and require
 mathematical integration for the time stepping.  Game programming is a great
 educational vehicle for lots of reasons.


Yeah, and music programming is fun too.  As well, text adventures - with
natural language processing - can teach a lot about language.

- Using wordnet API to construct a text adventure.


cu.


Re: Re: [pygame] Students Interested in Pygames Community

2011-10-21 Thread stabbingfinger
On Fri, Oct 21, 2011 at 4:48 AM, René Dudfield ren...@gmail.com wrote:


 Yeah, and music programming is fun too.  As well, text adventures - with
 natural language processing - can teach a lot about language.


Upon René's mention of text it occurs to me that pygame sports an
international community, but I don't often see internationalization in our
games. I'm sure I could figure it out if I took the time, but if there were
an simple, extensible module (a la pygame.org/cookbook) and a tool for
managing it we might see more of that. We may not see many translations, but
the capabilities would be there if someone wanted to contribute a
translation to an existing game.

Gumm


Re: Re: [pygame] Students Interested in Pygames Community

2011-10-21 Thread Lenard Lindstrom
Hi,

A major roadblock to internationalization was the limit (if not non existant) Unicode support in the pygame.font module. For Pygame 1.9.2 the Font module has been updated to fully handle UCS-2 (SDL_ttf does not support UTF-16 or UTF-32, unfortunately). The upcoming pygame.freetype module has bypasses the restrictions imposed by SDL_ttf by using the freetype2 library directly. It has full UTF-32 support.

Lenard Lindstrom

On Oct 21, 2011, stabbingfinger stabbingfin...@gmail.com wrote:


On Fri, Oct 21, 2011 at 4:48 AM, Ren Dudfield ren...@gmail.com wrote:


Yeah, and music programming is fun too. As well, text adventures - with natural language processing - can teach a lot about language.



Upon Ren's mention of text it occurs to me that pygame sports an international community, but I don't often see internationalization in our games. I'm sure I could figure it out if I took the time, but if there were an simple, extensible module (a la pygame.org/cookbook) and a tool for managing it we might see more of that. We may not see many translations, but the capabilities would be there if someone wanted to contribute a translation to an existing game. Gumm



Re: [pygame] Students Interested in Pygames Community

2011-10-20 Thread René Dudfield
Hello,

that sounds great!  I'll have a think about some fun topics... hrmm.

- How to 'tint' an image with green/blue/red.
- Timing for input.  eg, actions that happen if you press a key combination
fast enough.



On Thu, Oct 20, 2011 at 10:00 PM, Elinor Madigan em...@psu.edu wrote:

 Hello,

 I am currently teaching a course in Python at the Penn State
 Schuylkill Campus.  My students are experimenting with Pygames and
 they are interested in giving back to the Pygames community.  As my
 students have a variety of programming abilities, I am not sure they
 could provide any complex code.  With that being said, would it be
 beneficial to the community if they created some basic tutorials for
 you and if so, do you have any suggestions on possible topics?

 Regards,

 Elinor Madigan

 --
 Elinor M. Madigan, PhD, PMP
 Program Coordinator Information Sciences and Technology
 Pennsylvania State University
 Schuylkill Campus
 200 University Dr.
 Schuylkill Haven, PA  17972

 Phone:  570-385-6076
 email:  em...@psu.edu



Re: Re: [pygame] Students Interested in Pygames Community

2011-10-20 Thread Lenard Lindstrom
Another possibility is add more demo programs, or improve on existing ones. An audio file player would a simple start. Maybe Fonty could be extended to show sizing and some UTF-16 characters (an appropriate font file would have to be included in the data). Something for the pygame.math module? Of course, if the students are not adverse to drudgery, there is always the unit tests ;-).

Lenard Lindstrom

On Oct 20, 2011, Ren Dudfield ren...@gmail.com wrote:

Hello,that sounds great! I'll have a think about some fun topics... hrmm.- How to 'tint' an image with green/blue/red.- Timing for input. eg, actions that happen if you press a key combination fast enough. 
On Thu, Oct 20, 2011 at 10:00 PM, Elinor Madigan em...@psu.edu wrote:
Hello,  I am currently teaching a course in Python at the Penn State Schuylkill Campus. My students are experimenting with Pygames and they are interested in giving back to the Pygames community. As my students have a variety of programming abilities, I am not sure they could provide any complex code. With that being said, would it be beneficial to the community if they created some basic tutorials for you and if so, do you have any suggestions on possible topics?  Regards,  Elinor Madigan  -- Elinor M. Madigan, PhD, PMP Program Coordinator Information Sciences and Technology Pennsylvania State University Schuylkill Campus 200 University Dr. Schuylkill Haven, PA 17972  Phone: 570-385-6076 email: em...@psu.edu 





Re: Re: [pygame] Students Interested in Pygames Community

2011-10-20 Thread andrew baker
Absolutely wonderful to hear that Pygame is being used in an educational
environment :)

On Thu, Oct 20, 2011 at 4:34 PM, Lenard Lindstrom le...@telus.net wrote:

 Another possibility is add more demo programs, or improve on existing ones.
 An audio file player would a simple start. Maybe Fonty could be extended to
 show sizing and some UTF-16 characters (an appropriate font file would have
 to be included in the data). Something for the pygame.math module? Of
 course, if the students are not adverse to drudgery, there is always the
 unit tests ;-).

 Lenard Lindstrom


 On Oct 20, 2011, *René Dudfield* ren...@gmail.com wrote:

 Hello,

 that sounds great!  I'll have a think about some fun topics... hrmm.

 - How to 'tint' an image with green/blue/red.
 - Timing for input.  eg, actions that happen if you press a key combination
 fast enough.



 On Thu, Oct 20, 2011 at 10:00 PM, Elinor Madigan em...@psu.edu wrote:

 Hello,

 I am currently teaching a course in Python at the Penn State
 Schuylkill Campus.  My students are experimenting with Pygames and
 they are interested in giving back to the Pygames community.  As my
 students have a variety of programming abilities, I am not sure they
 could provide any complex code.  With that being said, would it be
 beneficial to the community if they created some basic tutorials for
 you and if so, do you have any suggestions on possible topics?

 Regards,

 Elinor Madigan

 --
 Elinor M. Madigan, PhD, PMP
 Program Coordinator Information Sciences and Technology
 Pennsylvania State University
 Schuylkill Campus
 200 University Dr.
 Schuylkill Haven, PA  17972

 Phone:  570-385-6076
 email:  em...@psu.edu





-- 
Andrew Ulysses Baker
failrate


Re: Re: [pygame] Students Interested in Pygames Community

2011-10-20 Thread Ian Mallett
Hi,

I find simple games are helpful in teaching students.  With practice, one
can hack up a very simple game in Python/PyGame in a matter of a few
minutes.  At the end, people have a product to show for it.

I often find students have a good time making games too, because it's
surprisingly open-ended.  It also works at many levels of programming
expertise, because games can vary in complexity.

Ian