[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Introduction + call to join project for creating game frameworks



Hi Clare,
    I applaud your effort to create pygame games.

    Python is designed to be the easiest language possible to learn
and use.  It is simple, intutitive and powerful.  If you know how to
program python, teaching anyone is easy.  Take me, for instance.  I
learned almost all I know by myself in the space of less than a year
of not-straight through work.

    Pygame is a wrapper for it that grants easy access to graphics,
and thus enables fast development of games.  In short, it is the
"library" you're looking for.  There are sample games on pygame.org
that teach basic concepts of pygame, and of course, there is this
list.  Can you tell us more about exactly what sort of projects you
want to be working on?  For example, a blank window:

import pygame #load pygame
pygame.init() #initialize pygame
surface = pygame.display.set_mode((800, 640)) #800 pixels by 640 pixels

add a line to color it:

surface.fill((255,255,255)) #white

and one to draw to the screen:

pygame.display.flip()

    This is a basic program.  If you want to make an image viewer,
like a powerpoint presentation, the code is of similar complexity.
Thanks to Python and pygame, games like "pong" can be written with a
few lines of code, instead of thousands.

    In short, I strongly recommend looking at the code of some of the
games as well as the readily available tutorials on pygame.org:
http://www.pygame.org/wiki/tutorials
and there is this list if you get completely stuck.

Ian