pygame is
Python
Simple DirectMedia Layer
 
 
pygame.org is
Site Swing
Wiki

Subversion

      
Search:  
 
 

Pygame revision control is now done with. The new instruction page.

Pygame

Finally, we'll be playing with a code today that depends on the python library, pygame. If you are using the thw_VM, pygame is already installed on that virtual machine. Otherwise, if you'd like to be ahead of the game, as it were, you could install that module along with python on your personal laptop. To install pygame on ubuntu: sudo apt-get install python-pygame

To install pygame on windows or mac, it may be better to download the binary.

What is Version Control

You should have found out what version control was on the video lectures, but very briefly, version control is a way to keep a backup of changing files, to store a history of those changes, and most importantly to allow many people in a collaboration to make changes to the same files concurrently. There are a lot of verson control systems, so here we provide a table of some popular ones and their equivalent commands (summarized from wikipedia):

Today, we'll be using SVN. Perhaps someday we'll have a second section of this experiment to go over distributed version control systems like mercurial.

Checking Out The Code

The Hacker Within has its own online code repository. You can check out code from it at any time, from anywhere. Since you'll need to be a project member in order to make commits to this space, we made another repository. If you gave me a google id, you are a fully fledged reading writing member today. Remember, with great power comes great responsibility.

Today, we'll check out a game just for hackers. Specifically, it is an svn type repository at googlecode at.

Exercise : Checking out the code

  • Step 1 : Open up an internet browser and log in to google
  • Step 2 : Now go Checkout the source tab.
  • Step 3 : Crack open a terminal, and if your google user name is buckybadger.

    ~$ svn checkout https://hacker-within-scbc.googlecode.com/svn/trunk/ hacker-poke --username buckybadger

  • Step 4 : You should see many files download themselves onto your virtual machine. Let's make sure it worked. Try running the source code. After all, I wasted no small amount of an afternoon adapting it for this occasion. Fun stuff.

    ~$ cd hacker-poke

    ~/hacker-poke$ python hacker-poke.py

Checking The Status of Your Local Copy

The files you've created on your machine are your local "working" copy. The changes your make in this local copy aren't backed up online automatically. Until you commit them, the changes you make are local changes. When you change anything, your set of files becomes different from the files in the official repository copy. To find out what's different about them, try:

~/hacker-poke$ svn status The null result means that you're up to date with the current version of the repository online! There are a few other responses you might get if you or your collaborators have been active. We'll see what they are as we go along.

Updating

Updating is like voting. You should update early and often , and particularly before you make or commit any changes. This will ensure you're working with the most up-to-date version of the repository. Updating won't overwrite any changes you've made locally without asking, so don't get nervous. When in doubt, update.

~/hacker-poke$ svn update

At revision 89.

Making and Committing a Change

Now, recall the software-carpentry.org tutorial. You're Wolfman.

car insurance comparison compro oro
spotlight

 
our projects
pygame.org welcomes all python game, art, music, sound, video and multimedia projects. If they use pygame or not.
 
recent releases
May 23, 2012

May 22, 2012


May 20, 2012

May 19, 2012

May 18, 2012

May 17, 2012


May 16, 2012


May 12, 2012


... more!
 
for pygame related questions, comments, and suggestions, please see help (lists, irc)