Pygame tutorials

Started by
2 comments, last by KnolanCross 11 years, 2 months ago

I've been learning Python for some time now and finally learned enough to move on to PyGame. I learned from the tutorials provided by thenewboston and watched his Python Game Development videos as well. Though they were very helpful, they didn't provide me with enough knowledge to start developing my own game. I need a series of tutorials that will cover the basics (audio, fonts, animation, etc.) as well as teach me how to implement this in object-oriented programming, but I can't seem to find any. If anyone could help, it would be greatly appreciated. smile.png

Advertisement

Unfortunately, I do not have ideal resources to point you to. Like almost anything worth doing in Computer Science, most of it has to be figured out through experimentation. Even if you learn something from a book or tutorial, you don't learn it in the way you need to if you want to be successful.

That said, having code to reverse engineer is imperative. As an experienced PyGame programmer myself, I humbly present my PyGame Base Code, which is a tiny, tried and true tested starting point that I myself use frequently. It won't get you audio/fonts/animation, but it will get you started if you aren't already.

Secondly, I suggest you look at the examples directory that comes with PyGame. The "chimp" example is probably best for your purposes. The "aliens" example is also pretty simple, and while I personally think it takes object orientation too far and makes gratuitously unnecessary use of sprites, it is a solid example that demonstrates both basic audio and font rendering.

Lastly, PyGame is a really easy library to use. It is small, fast, and pretty robust. You should try playing around with it. I myself learned with no tutorials whatsoever, simply trying different API calls until I got what I wanted. I recommend you do the same, at least some. The graphics, in particular, are quite intuitive.

[size="1"]And a Unix user said rm -rf *.* and all was null and void...|There's no place like 127.0.0.1|The Application "Programmer" has unexpectedly quit. An error of type A.M. has occurred.
[size="2"]

There is a book "Beginning Game Development with Python and Pygame: From Novice to Professional" by Will McGugan, but I forget if it is free or you have to buy it. I use to have the pdf, and I think it covered most of the things you mentioned.
http://www.amazon.ca/Beginning-Game-Development-Python-Pygame/dp/1590598725

This cover the basics: http://inventwithpython.com/chapters/

Also, you can look at pygame posted examples to see if there is something useful.

Currently working on a scene editor for ORX (http://orx-project.org), using kivy (http://kivy.org).

This topic is closed to new replies.

Advertisement