[pygame] Announcing the Project IT Girl Games!
Announcing the Project IT Girl Games written using Pygame! http://wiki.laptop.org/go/Project_IT_Girl Project IT Girl is a Girlstart after-school program in Austin, Texas, funded by the National Science Foundation. The program consists of 44 high school girls (16 - 17 years old) who are learning how to use technology to make a difference in the world over a three-year period. During the 2007 - 2008 school year, students piloted Girlstart's "Python with a Purpose" curriculum. The IT Girls were given a real-world project: develop an educational game using Python and Pygame that can be distributed to children around the world via the One Laptop per Child program. Each girl picked a learning objective for her game that most interested her, from "practice fractions" to "spread awareness of AIDS testing." To *download the games* and to learn more about Project IT Girl, see our page on the OLPC wiki: http://wiki.laptop.org/go/Project_IT_Girl NOTE: These games have not been heavily tested. There are many known issues in the games, including high CPU usage. If you are interested in testing and debugging the games, please email Zakiyyah Kareem at [EMAIL PROTECTED] Clare Richardson Technology and Program Coordinator Girlstart www.girlstart.org 512.916.4775 512.916.4776 fax Scrub in, Broadcast news, Unmask mysteries! Don't miss Summer Camp 2008!
RE: [pygame] Game Framework
I've also been working on game frameworks, but for individual types of games that come with "cookbook recipes" for how to add features and functionality. Our frameworks and additional resources are geared towards younger, novice programmers. You can read more about it and view the code at: http://wiki.laptop.org/go/Game_templates <http://wiki.laptop.org/go/Game_templates> -- Clare Richardson From: [EMAIL PROTECTED] on behalf of Kris Schnee Sent: Fri 12/7/2007 9:31 PM To: pygame-users@seul.org Subject: [pygame] Game Framework While working on a self-teaching project, I came up with a better way to organize game states and events than what I'd been doing, with some help from the GameDev forums. The code at: http://kschnee.xepher.net/code/framework.py.txt shows the new framework code, in a demo that displays a flickering blue square. Also see: http://kschnee.xepher.net/code/acorn.py.txt This code does nothing, but does it elegantly. It's a cleaned-up version of the first file, which I'm now using as a basis for something else. It's public domain, if you can make use of it. I'd appreciate critiques to improve the thing too. I'm not sure of the best way to store information between states; I guess info can be stored in the game's World object. Also I'm using a separate View object to store the graphics and do drawing, which is more MVC-ish but less efficient than it could be. Thoughts? <>
RE: [pygame] pygame.init before pygame.mixer.init?
I did a little more testing: OS: Windows XP Pygame: I installed v1.7.1 for Win32 and Python 2.5 (http://www.pygame.org/ftp/pygame-1.7.1release.win32-py2.5.exe) I've reproduced the problem on one other WinXP machine with the same Pygame release, but the problem doesn't occur on my WinXP machine at home (the sound plays just fine without pygame.mixer.init). I've been able to determine that pygame.mixer.get_busy() isn't failing, simply by replacing "pass" with print "Hello". Calling pygame.mixer.pre_init() instead of pygame.mixer.init doesn't get play any sound. *But* sound will play without pygame.mixer.init if I call pygame.display.set_mode AND put a time delay between loading the sound and playing it: -- import pygame pygame.init() screen = pygame.display.set_mode((500,500)) sound = pygame.mixer.Sound("dog.wav") pygame.time.delay(1000) sound.play() while pygame.mixer.get_busy(): pass -- A few questions this brings up: * Why does setting the display make a difference, and why does this fix the problem of having to call pygame.mixer.init first? * Why does it take too long to load the sound, such that it won't play if I call it immediately? And why does calling pygame.mixer.init first make this problem go away? -- Clare Richardson -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Clare Richardson Sent: Wednesday, October 10, 2007 2:55 PM To: pygame-users@seul.org Subject: [pygame] pygame.init before pygame.mixer.init? I writing a program to simply play one sound (see below for the code), and came across some interesting behavior. If I call pygame.init() before pygame.mixer.init(), I don't hear any sound playing. However if I call pygame.init *after* pygame.mixer.init (as below), the sound will play. Is this a known behavior? What's causing the problem? I understand that I don't need pygame.init to just play a sound, but I don't think it should matter if I call it. Thanks! Clare Richardson --- import pygame pygame.mixer.init() pygame.init() sound = pygame.mixer.Sound("bark.wav") sound.play() while pygame.mixer.get_busy(): pass pygame.mixer.quit()
RE: [pygame] pygame.init before pygame.mixer.init?
I tried running your code and don't hear anything playing. I added back pygame.mixer.init() before pygame.init() in your code, and it played. -- Clare From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ian Mallett Sent: Wednesday, October 10, 2007 4:18 PM To: pygame-users@seul.org Subject: Re: [pygame] pygame.init before pygame.mixer.init? The simplest thing to do is: --- import pygame from pygame.locals import * pygame.init() sound = pygame.mixer.Sound("bark.wav") sound.play() while pygame.mixer.get_busy (): pass --- ...because "pygame.locals" is everything you'll need: the keys module, surfaces, sound, etc. This way you don't have to do one line of code for every submodule you want to import: import pygame.key import pygame.mixer import pygame.draw import pygame.image import pygame.font import pygame.mouse --is = to:--- from pygame.locals import * --- I recommend doing this. I've been programming many times and realized that I hadn't imported all the necessary modules. Opps. Especially for simplicity, use "from pygame.locals import *" Anyway, about your question: Your first line, "pygame.mixer.init()" imports pygame.mixer (you can't init a non-loaded module), and then inits it. Your next line, "pygame.init()" inits all of the imported modules and pygame. So, here's what your code is doing: pygame.mixer.init() #imports pygame.mixer and inits pygame.mixer pygame.init () #inits all imported modules and pygame. (This re-inits pygame.mixer) One way to check would be to change the first line: - pygame.mixer.init() -becomes-- import pygame.mixer which will still work, but would not init the module, and so would be more efficient. Ian
[pygame] pygame.init before pygame.mixer.init?
I writing a program to simply play one sound (see below for the code), and came across some interesting behavior. If I call pygame.init() before pygame.mixer.init(), I don't hear any sound playing. However if I call pygame.init *after* pygame.mixer.init (as below), the sound will play. Is this a known behavior? What's causing the problem? I understand that I don't need pygame.init to just play a sound, but I don't think it should matter if I call it. Thanks! Clare Richardson --- import pygame pygame.mixer.init() pygame.init() sound = pygame.mixer.Sound("bark.wav") sound.play() while pygame.mixer.get_busy(): pass pygame.mixer.quit()
[pygame] Game templates wiki page
Thanks to everyone for your ideas on the game templates project! I've put together a description on the OLPC wiki to start collaborating: http://wiki.laptop.org/go/Game_templates There are definitely lots of ways to help! Please add to any part of the page (especially the ways to contribute section!). For my part, I'll start putting together simple games that can serve as a model for each genre. Thanks! Clare Richardson Technology and Program Coordinator Girlstart www.girlstart.org <http://www.girlstart.org/>
RE: [pygame] Introduction + call to join project for creating game frameworks
Exactly! It's like you're reading my mind! It looks like we've got a fair bit of volunteers at this point for the project (hooray!), so I'll start a wiki page we can collaborate on and post the URL to the list. Thank you all for your help! -- Clare From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andre Roberge Sent: Wednesday, October 03, 2007 9:23 PM To: pygame-users@seul.org Subject: Re: [pygame] Introduction + call to join project for creating game frameworks On 10/3/07, Ian Mallett <[EMAIL PROTECTED]> wrote: There's the tutorials... Since you know Pygame, why can't you just tech them? Ian I can't pretend to speak for Clare... but I think the idea is to give the students a sense of accomplishment within a short time frame. Writing a game from scratch can be a daunting proposition - something near impossible to have a bunch of budding programmers do in a short time.However, having students start with a game skeleton, and letting them use their creativity to "fill in the blank" could result in something both doable in a reasonable time and fun to do. As a teacher at heart, I fully support Clare's idea and wish I could help in a timely fashion. André
RE: [pygame] Introduction + call to join project for creating gameframeworks
Whoops, wrong link: http://www.girlstart.org/itgirl/downloads/LitterGame.zip -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Clare Richardson Sent: Wednesday, October 03, 2007 11:38 AM To: pygame-users@seul.org Subject: RE: [pygame] Introduction + call to join project for creating gameframeworks Yes! A game with holes. I definitely don't think the technical details are too hard; we're simply limited by the time we have with the girls so we want to give them a running start. If anyone is interested, this is the project they're working on in the fall: http://www.girlstart.org/itgirl/LitterGame.zip The litter game project is focused on learning programming concepts, and then in the spring they'll develop unique games individually. Thanks for being patient with me as I try to explain myself! -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael George Sent: Wednesday, October 03, 2007 10:57 AM To: pygame-users@seul.org Subject: Re: [pygame] Introduction + call to join project for creating gameframeworks So if I understand correctly, you want a game with "holes": - pedagogical holes that the students can fill in to learn basic programming constructs such as functions, loops, simple data structures - content holes so that the students can brand the game but you want to avoid technical details like blitting and flipping and event handling that might be too hard for an introductory student to grasp right away? --Mike Clare Richardson wrote: > Not exactly. The goal of the program is to get these girls to take a > Computer Science class, so yes, we want them to do "real" programming. > But at least for right now, the girls aren't interested in programming > for programming's sake. They're excited about the end product: their > educational game that we'll make available to the OLPC XO laptop. > > Because we don't have much time with the girls (this is an after-school > club, not a formal class), we want to give them as many resources as > possible so they don't get stuck. Maybe a better word than framework is > a simple template for different kinds of games, like maze games or > adventure games. A great example is the PyMan tutorial, since many of > our girls want to make a PacMan-like game: > http://www.learningpython.com/2006/03/12/creating-a-game-in-python-using > -pygame-part-one/ > > Does that better explain what I'd like to do? > > -- Clare >
RE: [pygame] Introduction + call to join project for creating gameframeworks
Yes! A game with holes. I definitely don't think the technical details are too hard; we're simply limited by the time we have with the girls so we want to give them a running start. If anyone is interested, this is the project they're working on in the fall: http://www.girlstart.org/itgirl/LitterGame.zip The litter game project is focused on learning programming concepts, and then in the spring they'll develop unique games individually. Thanks for being patient with me as I try to explain myself! -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael George Sent: Wednesday, October 03, 2007 10:57 AM To: pygame-users@seul.org Subject: Re: [pygame] Introduction + call to join project for creating gameframeworks So if I understand correctly, you want a game with "holes": - pedagogical holes that the students can fill in to learn basic programming constructs such as functions, loops, simple data structures - content holes so that the students can brand the game but you want to avoid technical details like blitting and flipping and event handling that might be too hard for an introductory student to grasp right away? --Mike Clare Richardson wrote: > Not exactly. The goal of the program is to get these girls to take a > Computer Science class, so yes, we want them to do "real" programming. > But at least for right now, the girls aren't interested in programming > for programming's sake. They're excited about the end product: their > educational game that we'll make available to the OLPC XO laptop. > > Because we don't have much time with the girls (this is an after-school > club, not a formal class), we want to give them as many resources as > possible so they don't get stuck. Maybe a better word than framework is > a simple template for different kinds of games, like maze games or > adventure games. A great example is the PyMan tutorial, since many of > our girls want to make a PacMan-like game: > http://www.learningpython.com/2006/03/12/creating-a-game-in-python-using > -pygame-part-one/ > > Does that better explain what I'd like to do? > > -- Clare >
RE: [pygame] Introduction + call to join project for creating gameframeworks
Not exactly. The goal of the program is to get these girls to take a Computer Science class, so yes, we want them to do "real" programming. But at least for right now, the girls aren't interested in programming for programming's sake. They're excited about the end product: their educational game that we'll make available to the OLPC XO laptop. Because we don't have much time with the girls (this is an after-school club, not a formal class), we want to give them as many resources as possible so they don't get stuck. Maybe a better word than framework is a simple template for different kinds of games, like maze games or adventure games. A great example is the PyMan tutorial, since many of our girls want to make a PacMan-like game: http://www.learningpython.com/2006/03/12/creating-a-game-in-python-using -pygame-part-one/ Does that better explain what I'd like to do? -- Clare -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Marcus von Appen Sent: Wednesday, October 03, 2007 7:21 AM To: pygame-users@seul.org Subject: Re: [pygame] Introduction + call to join project for creating gameframeworks On, Tue Oct 02, 2007, Clare Richardson wrote: [...] > We have an IMMEDIATE need to create game frameworks on top of Pygame for > several game genres (maze game, adventure game, arcade game, etc) that > can be easily used by budding programmers creating their first Pygame > project. Over 90% of our girls have zero programming experience and, to > be honest, not much interest in programming. Their main interest is in > creating a product that makes a difference. So, we want to make it as > easy as possible for them to succeed in making their games. I've taken a > look at the libraries on the Pygame website and I can't find anything > that fits our needs, so we need you to... Just to get it right: you want the girls to create games by not programming them, because they do not have any interest in programming. Wouldn't it be better to change the orientation of the project then? Encouraging people for something by avoiding stuff they apparently never have done before (such as programming) - that just sounds silly to me and will mostly cause a negative result in the end, like "you never told us that in reality it has to be done _that_ way". If you want a framework, where people just have to do some clicks to create a working game, you might be better of with a game maker instead of pygame and co. Regards Marcus
RE: [pygame] Introduction + call to join project for creating game frameworks
Exactly! I'm very familiar with Pygame already, and the girls are all working together on a simple project right now to get them comfortable with Pygame as well. Maybe a better word than framework is a template: A sample game they can look at when they are coding their game. We've got five game types that most of the girls are designing their games around, so we're looking for 5 templates: 1) Maze game: similar to PacMan, but possibly with a question to answer every time the character picks up an item in the maze 2) Adventure game: the character moves through a world or a story, and must solve problems or answer questions when they meet another character 3) Strategy game: user makes several decisions that affect the game's outcome; user learns the consequences of each decision 4) Practice drills: most of these are centered around math problems or vocabulary 5) Arcade game: some sort of action must be done by the user using the keyboard or mouse; emphasis is on speed and accuracy -- Clare -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ethan Glasser-Camp Sent: Tuesday, October 02, 2007 5:06 PM To: pygame-users@seul.org Subject: Re: [pygame] Introduction + call to join project for creating game frameworks -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ian Mallett wrote: > 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: I think the original poster is looking for something more like pygsear: http://www.nongnu.org/pygsear/ In other words, the idea is to get the highest-level tools for game design that can be used with the least pygame- or Python-specific knowledge possible. Besides pygsear, which I personally haven't used, I'm not sure what else there is. There's the LiveWires stuff, but it's aimed at teaching Python rather than any particular project. That's at http://www.livewires.org.uk/python/ Hope this helps! Ethan -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHAsDIhRlgoLPrRPwRAkaTAKCcgzEdfvruGqv0v21hlokR76CIPwCg2R+W VCrj6EGKAVo/ixCI2/4dNZ8= =ICbH -END PGP SIGNATURE-
[pygame] Introduction + call to join project for creating game frameworks
Hello all, I'm new to this list, so I'll introduce myself. I'm currently working on Project IT Girl, a program that teaches 60 high school girls in Austin, Texas, about how they can change the world through the use of technology. This year, Project IT Girls learn basic programming through designing and developing their own unique educational games written with Python and **Pygame**! For the next 2 - 3 months, the girls will be fleshing out their game idea. Some girls are designing games directly related to school subjects: astronomy, chemistry, multiplication, algebra, etc. But MOST of the girls are interested in educating children about more social issues: fuel conservation, recycling, AIDS testing, hygiene, nutrition, etc. We have an IMMEDIATE need to create game frameworks on top of Pygame for several game genres (maze game, adventure game, arcade game, etc) that can be easily used by budding programmers creating their first Pygame project. Over 90% of our girls have zero programming experience and, to be honest, not much interest in programming. Their main interest is in creating a product that makes a difference. So, we want to make it as easy as possible for them to succeed in making their games. I've taken a look at the libraries on the Pygame website and I can't find anything that fits our needs, so we need you to... JOIN OUR PROJECT!!! We need YOUR Pygame expertise and time to make this happen!! If you're interested in working on this in the next 3 months, PLEASE let me know! We have FUNDING we can put towards it, it's for a great cause, and it will help to broaden the Pygame community. What's stopping you from helping?? Thanks, Clare Richardson Technology and Program Coordinator Girlstart [EMAIL PROTECTED]