Domain: pygame.org
Stories and comments across the archive that link to pygame.org.
Comments · 92
-
Pygame?
You could build a small game in Pygame!
http://www.pygame.org/
A basic banner ad type game tutorial.
http://www.pygame.org/docs/tut... -
Pygame?
You could build a small game in Pygame!
http://www.pygame.org/
A basic banner ad type game tutorial.
http://www.pygame.org/docs/tut... -
Re:Parallel 2/3 didn't work in Windows until 3.3
It's not only the Python interpreter but also the C extensions that you use that have to be ported to Python 3. For example, Pygame (Python bindings for SDL 1.2) doesn't have official Windows packages for 3.3 or 3.4 on its download page. (It instead relies on what appears to be an unofficial page.)
-
Re:Alternatively you could just
-
Re:Python
I second Python: just type in the pseudocode you'd write on a piece of paper, and there is a good chance that it will work just like that in Python.
2D gaming using SDL (and OpenGL 3D, but you have to do the hard work yourself): Pygame
3D drawing/animation/gaming: Blender 3D
(I started by gaming, because that's a fun way to learn a language quickly)Web: Django
Co-routines: Stackless Python
Maths: NumPy and SciPy
Networking: TwistedThat just scratches the outside of it, but have a look at the above to get an idea of the language.
And Python's documentation is quite good: brief, but everything you need is there - you just need less than you would expect at first. Here are some good tutorials:
Official Python Tutorial
Dive into Python
How to think like a computer scientist?Hmmm, looks like I've turned into a Python fanboi... Be careful if you try Python, you could fall for it.
-
Re:Learn Python The Hard way
Pygame has good tutorials & documentation.
-
Python
I would say go with Python. I read a lot of research literature on the subject and it really is a GREAT first language. Pygame ( http://www.pygame.org/ ), is a great resource for creating games in python which a wonderful way to learn. There are free ebooks on that site. The Finch robot from CMU is very cool also http://www.finchrobot.com/ - AND it works with python. It can move around the house and do things, which is great for keeping a kid interested.
-
Python
I strongly recommend Python.
The reason I like Python so much is that it has the least syntactic silliness of any language I've used: Python code often reads like psuedocode, but it actually works.
To learn C, you need to start by learning what a variable is, and that means learning what the different data types are, and when you use them. In Python, there really aren't variables: you just bind values to names.
And Python has lots of great libraries, so that he can easily write a non-toy program that does something interesting. In particular, there is the library, which would allow him to write a game.
And Python is useful for doing real work. It would be a poor choice to write an operating system or a word processing program, but it is useful for all sorts of actual problems in many fields. Particularly in science, Python is becoming a top language, thanks to SciPy.
Python is also the language used for SAGE, which he might enjoy using to plot graphs.
P.S. If he loves Python and wants to learn a second language, I would suggest C. Not C++, C.
steveha
-
The game already exists
A similar game already exists, written in Python.
-
Re:I can't remember "for its own sake"
Any suggestions of a couple of "simple games" that are available as source would be warmly welcomed!
-
Python + Pygame
Pygame is a pretty nice little package for quickly building 2D games. Fairly decent documentation and best of all, free! http://pygame.org/
-
Re:RIP First-sale doctrine
Well, there are also free games. For instance, here is a link to the pygame.org page for the Thera project. Thera is not exactly finished, but it is playable. It also happens to be open source software.
-
Re:Since we're on the topic...
Lets do something constructive, list of Indie games which 'aim higher' or whatever. Just to give each other/interested people a few interesting games to play which aren't the generic mass produced things.
Who wants to start us off?
You could even aim higher: create your own game, we're nerds after all and it is lots more fun.
If you have no clue of where to start, try PyGame to learn the basics (good tutorials and documentation), after that you will find out where to go by yourself.
-
Toonloop
Free python software: Toonloop.
-
Re:Creative Computing Mag was just as important!
There is one. Go to pygame.org. The games this thing can produce are awesome. Happy coding!
-
PyGame
I agree with the other comments: if he doesn't have the interest, or if he doesn't have the aptitude, then trying to push him into coding is a waste of time.
That said: check out PyGame. PyGame is a set of libraries for Python, specifically intended for creating new games.
Hmmm. I just went there, and it says that PyGame has now been ported to JavaScript. That probably makes sense, given the major efforts to speed up JavaScript in the new-generation web browsers.
At the PyGame web site, there are a bunch of games people have written, with source code available; and some of these games are half-done and half-broken. If he has the inclination to code, he might get interested in a half-done game and start fixing it up. Or even take a game that isn't half-baked, and start adding new features to it.
steveha
-
Re:Python (or My Butt)
If a given 12 year old isn't motivated to learn Python, they're probably not going to be motivated to learn much else, which would make the whole argument moot. See http://www.pygame.org/docs/tut/chimp/ChimpLineByLine.html for a short justification of this.
-
Re:Python
I agree. http://www.pygame.org/ is a cool lib to create games (which could be a huge motivation for a 12 YO).
-
python gaming book
Just stumbled upon this today. Not sure how good the book is but found it linked today on http://pygame.org/
-
Re:Python
Both books I mentioned above rely pretty heavily on Pygame. I think it provides the fun factor you are thinking about. I think there are a lot of good options, but that is one more that makes Python my preferred choice. I really like that it is a language I use myself pretty regularly, which makes it that much more valuable as a teaching tool.
This week-end I busted out a little Python to figure out some information my wife couldn't get from the lame software that came with her GPS watch. Fortunately it had an option to export the data and I took it from there.
Then I can turn and use those same tools to teach programming to my daughter. Very cool. -
Re:Ruby at a sight
pygame comes to mind.
-
Re:The C64 is back!
Also install Pygame for them to make it true fun.
About the indentation remark by the AC above: I expected I would hate Python's indentation rule, but I actually love it. Liberated from BEGIN & END or { & }. -
Favorite light games
Frozen Bubble Slogan: "You need this game." Not sure I can endorse the slogan, but it's hours of fun. In fact, too many hours for me... the game sucks me in, and I just keep playing "only one more level" until I beat level 100 and finally stop. I'm careful now when I let myself start playing this.
Solarwolf An updated version of an Atari 2600 game! Easy to learn, addictive, fun.
KGoldrunner A modern remake of the classic LodeRunner from the Apple ][ and other computers of that era. They urge you to use the mouse, but I find I prefer the keyboard.
Stella An Atari 2600 emulator. I have ROM images of many of the games in my collection, and I still enjoy the streamlined play of classic 2600 games. My favorite is Millipede. Stella runs nice and fast even on a very old computer.
-
Thread with free & open games
It is more fun to create a game than to play them, and a lot more fun than wincing about how much the commercial games cost...
Some place to start: Python games community -
Re:Python
Well, it depends on how you actually go about teaching QBASIC, right? If you teach kids FUNCTION and SUB and FOR/WHILE rather than GOTO & GOSUB, then that's what they're going to use. And vice versa.
You act as if the teacher will be the only resource out there; but he won't be. There are tons of websites, books, etc. that people will turn to, and my impression is that most of them don't cover that.
The really good thing in QBASIC was its simplistic but readily-available graphics library.
Sure it does. It's at least not bad at all, and as an instructor you could provide code that does any boilerplate that's necessary. (I don't know how much is necessary, but I think it's at least only a very little bit.)
-
Re:QBasic still one of the best
-
Re:PythonDefinitely python. Here's a few unmentioned-so-far reasons:
- Widely used, not obscure,
- Great intro to OSS as there are tons of great OSS libraries to do almost everything -- website development, science, games, guis, etc. I.e. when the kid asks, "how can I do X?", you don't have to say "Learn another programming language."
- 11-14 year olds? PyGame. Enough said.
- Legibility of the language encourages tinkering.
- Legibility of the language streamlines your ability to teach the algorithmic aspects of the code.
- Has a command line shell, so you can be teaching them to use it as both a super-calculator as well as a programming language. Makes it easy to get the "Hello, World" stage.
-
Re:It's Open Source
If you're interested in a truely Open Source version of this, Pygame has camera and computer vision functions in the SVN that let you do exactly this. I could track two different colored objects in realtime (30fps) with no lag, on a 433mhz OLPC XO.
It is Linux only at the moment, but Windows and OS X support is likely to be finished before the next release. -
Re:Scummy Game Creation?
Suggestions for other Free/OS interactive graphic novel creation tools are welcome.
The ScummVM maintainers recommend using Lua or Python with some layer around DirectX. No, I don't know of any code libraries or other tools to make creation of an interactive graphic novel easier.
-
Re:Developed for the XO?
-
Re:Marketing to the inevitable
I'm using a combination of Beginning Game Development with Python and Pygame, Pygame and the documents on the OLPC wiki site. For the record, Pygame is installed on the XO by default and actually has a few added things like the ability to access the built in camera and mesh network.
-
Pygame
Will this have the ability to run Pygame, the main game toolkit for Python?
On a different note, Vernor Vinge's recent novel Rainbows End says something about a popular online game that's an obvious knockoff of a certain pocket monster game, mentioning that some of the creatures involved were designed by Third World kids. Maybe we'll see the OLPC spawn some kind of loose-protocol indie game vaguely comparable to GURPS. -
What do you want to accomplish?
I'd say python, or a similar language with a good interactive shell, and similarily equipped with with poweful libraries would be much better, because it would allow the kids to actually do usefull stuff.
On the other hand, if you want to give them a feel for how the computer "really" works, teach assembly programming. C has a place in modern programming, but I think it's a bad choice for a first language.
For just about any language, you can demonstrate basic concepts, and give such thrills as being able to print out your name 10 times etc. But for moving on to doing really cool stuff that you can show your friends, such as consuming rss, doing interactive 3d etc ... python would be an almost perfect fit, especially paired with a couple of modules/packages like http://www.pygame.org/ and http://ipython.scipy.org/.
Java comes a close second, but even using a tool such as http://judo.sourceforge.net/ or http://www.bluej.org/, java requires much, much more setup pr project to get up and running. Additionally java has no transparent compilation, which means you're stuck with the write-compile-test-cycle, rather that just write-test-change-test...
Another alternative would be http://www.squeak.org/ and/or http://www.opencroquet.org/. But it's a pretty steep learning-curve going from c to smalltalk, IMNHO. You're students should have an easier time of it, though.
Give some thought to what platform you and your students will be working on, too. For Mac OS X, I suppose objective-c might be a good place to start. On linux, I'd go with python, on windows, either python or c#.
The one good thing about c, that is also true for assembler *and* python, is simplicity. You don't *need* an IDE to get from idea to working program. Programming java with notepad and javac very quickly becomes difficult to manage, due to classpath-issues. But with c and assembly you'll still need linking for anything but the most trivial programs -- another win for python (or perl, ruby tcl, lisp etc). -
Re:OpenGL can't compare to COMPLETE DirectX packag
pygame is much, much easier for a newb to "just jump right in to creating games" than DX is.
-
Re:Aircraft Control
I'm not sure about that,
But there are certainly planes on a snake -
Squeak -- Croquet?
Interesting. If OLPC includes Squeak, won't that also mean increased popularity for Croquet, that 3D environment project?
I'd be happy to see wider use of Python (and Pygame) by kids, as I've found it easy to learn and use. One thing Python needs for beginners on Windows, though, is an obvious link to IDLE (the IDE). Currently it's buried in a subdirectory, so a newbie won't quite know how to open the editor and start saving/running programs, seeing error feedback, using the console, etc.. -
Re:Simple
That's silly. Kid, you have to grow up one day and check that "real world" thing surrounding you.
Games and pornography serve the very same purpose: give our brain a break. There are really few option what usual work'a'droids like we all can do to break out of that damned circle of urban life: wake up, commute, breakfast, work, lunch, work, commute, diner, TV, sleep, wake up, etc. And if one has family, that basically means that one even has no week-ends to break out of that routine.
And there is nothing more to why games and pornography exist in particular and entertainment industry in general.
(N.B. Kids love to play in general since kids like to receive new experiences. And games are easiest way to get to wide range of experiences directly to our brain, no "real world" would ever deliver. No surprises here.)
P.S. On topic. No high-brow games? Guys, are you reading solely PRs from Electornic Arts, Microsoft & Sony??? There are lots of little (and little known about) freeware games around. Check out KDE games for one good example. Check what people do with PyGame package for example. Games now are very very very big business with very tight competition. There are no place left for entrepreneurs. That's why I'm directing you to independent community-developed games, most of them are freeware or even open source. No PRs though - games only. My last favorite one is VegaStrike: quite nice but taking time to learn space simulator (or Elite clone, whatever).
-
Some Open Source GamesI know this isn't quiet on topic... but I thought it would be interesting anyways:
Some Open Source Games
-
For Newbie Coders: Python
I recommend Python to kids wanting to learn programming. It's free, it's very easy to get started with command-line stuff and simple programs, and it doesn't take some rediculously complex installation process just to get it working. (Although creating a shortcut to IDLE is an unadvertised Useful Thing To Do.) There's also Pygame, a library for graphics/sound/other game stuff, and I'm just starting to play with Panda3D, a Python 3D engine (that includes a copy of Python itself). I found that C/C++ gave me headaches, as did attempting to get other 3D engines working with Python bindings, while Python simplifies a lot of tasks (variable declarations, memory management) without sacrificing functionality. So, Python is a relatively easy way to get into programming.
-
Re:Learning curve of linear vs OO?
I'll second Python and chuck in PyGame for those who want a ready built gaming library, oh and it's cross platform as well........... so you can stick with winders if you really have to...
:) -
Re:Isometric engines?
http://www.pygame.org/ could be worth a look. look at the libraries section for isometric engines. MfG Lobosch
-
Python & SDL = Pygame
Actually, I think Python and SDL is a far better combination, see pygame. As example of such a project is , developed using Python and SDL.
-
Re:Python has been used for this.
Pygame was also used to write one of my favourite 'play for 5 minutes' games: SolarWolf, a modern reimplementation of the Atari 2600 classic SolarFox. It even has a Windows executable download!
-
PyGame, different language same ideaIf you are into Python rather than Perl, you might want to check out PyGame.
It's basically a wrapper for SDL that makes it extremely easy to make games with Python. You could easily make a working 2D game with sound and decent physics in an evening if you are already familiar with the language. I'm a relative newb, and even I was able to make a basic pong/breakout type game in a few nights.
:)Or use PyOpenGL and you can make some 3D games.
-
PyGame
Pygame is a really nice wrapper around SDL (http://www.pygame.org./ There are plenty of guides and tutorials on the website.
Why use Perl when you can use Python? :-P -
I know Linux is a leper with this crowd...
But something happened for the first time this year: A Linux game impressed me. Because I downloaded the http://wolvix.org/ Wolvix Gaming Edition CD, and then later installed the http://www.pygame.org/news.html pygame library on Mandriva so I could run some of the games I'd been introduced to. While Linux gaming *still* isn't where it should be, these two elements this year show a strong sprint to bring up the rear, at least. I am especially impressed with how smooth the pygame apps run, and how incredibly easy it is to program in given the alternative of running up your own in C++. Be interresting to see where it is in five years.
-
Python or RubyI'm not 7 but I recommend Python or Ruby
:)
Here's the Python equivalent:import sys # only needed because I use sys.exit
It looks a bit longer since I didn't hardcode the "password". Save it as a
while True:
check = "This is my password"
password = raw_input("What is the password: ")
if password == check:
print "Right"
break
else:
print "Wrong!"
sys.exit .py file (I called it RawInputStringExample.py) which can be run from the command prompt or shell as long as you've got Python installed, Windows command prompt example below:L:\Program Files\Python23>RawInputStringExample.py
Python actually has specially made stuff to handle passwords correctly/securely etc. but that wasn't the point of the above code.
What is the password: dunno
Wrong!
What is the password: hehehe
Wrong!
What is the password: password
Wrong!
What is the password: This is my password
Right
L:\Program Files\Python23>
Are there any reasons not to start with Python or Ruby? I don't see them, they're easy to learn as you go along and with tons of free documentation and free books (digital format).
I'd say it's just as easy as Basic and way more powerful, the learning curve isn't that steep either. And I'm religiously convinced that Python and Ruby programs have a higher quality than anything from Viual Basic :)
Your toddler (or you yourself, I am) might also be interested in games... PyGame is a good start for that :)
http://python.org/
http://www.pygame.org/news.html
I haven't said much about Ruby but there is tons of stuff for that as well
http://www.ruby-lang.org/en/ -
Re:Python vs Lua
There are plenty of serious discussions about Python vs. Lua for game development. These two languages are easily the most popular choices (besides home-brew languages, which is pretty much an inferior choice to using something already developed like Lua or Python).
The really short version of the debate I've heard is:
1. Lua is easier to setup and integrate intially.
2. Python is a much more full fledged language, and generally better the larger the project is.
Also, in reply to your particular comments, modern Python is very good with memory management (it has added mark-and-sweep in addition to reference counting), and Python is fairly reasonable for "directly storing data". More specific to Civ4, however: Turn based games are not going to be as concerned about speed (where Lua often does win). (For instance, World of Warcraft uses Lua for the interface, and it really does need to be as fast as possible.)
Further Reading (says it better than I can).
http://lua-users.org/wiki/LuaVersusPython
http://games.slashdot.org/article.pl?sid=05/09/15/ 2154222&tid=206&tid=156
http://mozart.chat.net/~jeske/Projects/ScriptPerf/
http://www.gdconf.com/archives/2004/ (search for 'Lua')
http://www.pygame.org/ -
PyGame
PyGame is just what I was looking for. I have an 11 year old that is looking to make video games on his laptop (an old Pentium 120 that a client of mine gave me).
I started him on Q Basic such that he could start to think logically, understand subroutines and variables and the other basics. I was going to have him move to Java next, but I knew that it would be difficult for him to do much graphically. This looks like something that might just fit the bill.
Other suggestions from other
/. parents are welcome -
Python has a free book and pygamePython is definitely the way to go. There is a free book that is written especially for High School CS classes, it's called How to Think Like a Computer Scientist: Learning with Python. You can get it here: http://greenteapress.com/thinkpython/ for free in any of these electronic formats: PDF, LaTeX, Postscript, and HTML. Or you can buy printed copies here: http://greenteapress.com/thinkpython/terms.html
In addition to that there is pygame. A set of Python modules designed for writing games. It's really simple and easy to use. I think even beginner programmers wouldn't have much trouble making simple games. I wrote a breakout clone that's only 147 lines, I was going to use it to teach a programming class too. There is nothing complicated in it at all, just a few loops, if statements, some rectangle geometry and negating numbers. Elementary, really.
I think Python fits the requirement, more so than any other, for a language "that might be more 'enticing' as well."