topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday March 28, 2024, 5:23 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Book: Invent Your Own Computer Games with Python  (Read 13507 times)

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Book: Invent Your Own Computer Games with Python
« on: June 11, 2010, 06:30 AM »
I've said it before and i'll say it again, there are few better ways to motivate a young kid to learn to program than the promise of being able to create their games.  Here's a python book written with the same idea in mind:



Invent Your Own Computer Games with Python

http://inventwithpython.com/


Screenshot - 6_11_2010 , 6_28_01 AM.png



from http://www.boingboing.net/

mnemonic

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 177
    • View Profile
    • My website
    • Donate to Member
Re: Book: Invent Your Own Computer Games with Python
« Reply #1 on: June 11, 2010, 10:48 AM »
This looks like a great find mouser - an intro the python, pygame and the debugger all-in-one.

Deozaan

  • Charter Member
  • Joined in 2006
  • ***
  • Points: 1
  • Posts: 9,747
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: Book: Invent Your Own Computer Games with Python
« Reply #2 on: June 12, 2010, 01:11 PM »
I just downloaded this about a month ago. I thought it was really old so I didn't bother mentioning it here. :-[

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: Book: Invent Your Own Computer Games with Python
« Reply #3 on: June 12, 2010, 04:26 PM »
I noticed the code in the book is black and white.

Does someone know of any (preferably easy) ways one might transform the code content to be syntax-highlighted?  I'd like to carry an offline version on a small device that doesn't have an editor on it so copy-pasting the code to an editor doesn't seem like such a good option.

One rather manual way might be to manually copy-paste into:

  http://colorer.sourceforge.net/php/

and replace the original code with the results.  Oh what fun...

Perhaps trying to apply:

  http://google-code-prettify.googlecode.com/svn/trunk/README.html

would be slightly less work...
« Last Edit: June 12, 2010, 04:28 PM by ewemoa »

Deozaan

  • Charter Member
  • Joined in 2006
  • ***
  • Points: 1
  • Posts: 9,747
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: Book: Invent Your Own Computer Games with Python
« Reply #4 on: June 12, 2010, 09:44 PM »
You could always e-mail Al and ask him to incorporate GeSHI into the HTML version of his site.

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: Book: Invent Your Own Computer Games with Python
« Reply #5 on: June 12, 2010, 10:10 PM »
Thanks for the suggestion.

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: Book: Invent Your Own Computer Games with Python
« Reply #6 on: June 13, 2010, 05:21 AM »
I've thought about the GeSHi suggestion a bit.  IIUC, GeSHi is PHP-based, so I don't think it's likely to work for an off-line version of the book.  Does that sound right?  Silly me :)

Unfortunately, the formatting of the source for this book seems to be accomplished using list tags instead of pre or code tags, so it doesn't look trivial to convert.
« Last Edit: June 13, 2010, 06:54 AM by ewemoa »

Deozaan

  • Charter Member
  • Joined in 2006
  • ***
  • Points: 1
  • Posts: 9,747
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: Book: Invent Your Own Computer Games with Python
« Reply #7 on: June 13, 2010, 12:15 PM »
Al knows script-fu (he uses something like AHK), and uses a search & replace tool with regex capabilities. With that in mind, the main thing that I think would be hardest in the conversion would be preserving the line numbers, since he often just shows little clips of code from the middle but uses the same line numbers as from the source code. i.e. he'll show a snippet of just lines 9 and 10 but I think GeSHI would just automatically label them 1 and 2.

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: Book: Invent Your Own Computer Games with Python
« Reply #8 on: June 14, 2010, 12:59 AM »
script-fu
Is this something other than the GIMP-related thing?  Or perhaps some other kind of meaning altogether?

...the main thing that I think would be hardest in the conversion would be preserving the line numbers, since he often just shows little clips of code from the middle but uses the same line numbers as from the source code. i.e. he'll show a snippet of just lines 9 and 10 but I think GeSHI would just automatically label them 1 and 2.
Good point.

FWIW, I came across this:

  http://qbnz.com/highlighter/geshi-doc.html#starting-line-numbers

Deozaan

  • Charter Member
  • Joined in 2006
  • ***
  • Points: 1
  • Posts: 9,747
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: Book: Invent Your Own Computer Games with Python
« Reply #9 on: June 15, 2010, 06:03 PM »
script-fu
Is this something other than the GIMP-related thing?  Or perhaps some other kind of meaning altogether?

I'm not sure what script-fu has to do with GIMP. I was just trying to make it sound like martial arts kung-fu.

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: Book: Invent Your Own Computer Games with Python
« Reply #10 on: June 15, 2010, 07:41 PM »
Thanks for the clarification :)

FWIW, regarding Script-Fu and GIMP:

  http://docs.gimp.org...cepts-script-fu.html
  http://www.ve3syb.ca...id=software:sf:start

daddydave

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 867
  • test
    • View Profile
    • Donate to Member
Re: Book: Invent Your Own Computer Games with Python
« Reply #11 on: May 24, 2012, 09:10 AM »
I know this is an old thread but that book looks awesome, even for non-10 year olds, and now there's a sequel that delves more into pygame. Being able to dive right into small real-world applications is a great motivator.

I was considering using this book myself except that it is using Python 3 which is not the  "status quo" yet according to python.org, and Python 2 seems to be used for any program I've seen that uses Python as its scripting language (Calibre, Plex, etc.). However that should give the book some nice longevity.

flamerz

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 157
    • View Profile
    • Donate to Member
Re: Book: Invent Your Own Computer Games with Python
« Reply #12 on: May 24, 2012, 09:45 AM »
i want to add this link:

http://www.basic256.org/index_en

very nice basic ide, with text and graphical outputs in the same window.

edit: sorry, i didnt notice about this is in the python subforum, i just wanted to show some tool for kid learning :)
« Last Edit: May 24, 2012, 09:47 AM by flamerz, Reason: clarification »

daddydave

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 867
  • test
    • View Profile
    • Donate to Member
Re: Book: Invent Your Own Computer Games with Python
« Reply #13 on: May 24, 2012, 10:09 AM »

edit: sorry, i didnt notice about this is in the python subforum, i just wanted to show some tool for kid learning :)

No problem, but you're right, a link for a BASIC IDE could easily get lost in the Python forums, I suggest starting a new thread here so no one misses this nice link!

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 11,186
    • View Profile
    • Donate to Member
Re: Book: Invent Your Own Computer Games with Python
« Reply #14 on: May 24, 2012, 11:08 AM »
I know this is an old thread but that book looks awesome, even for non-10 year olds, and now there's a sequel that delves more into pygame. Being able to dive right into small real-world applications is a great motivator.

I was considering using this book myself except that it is using Python 3 which is not the  "status quo" yet according to python.org, and Python 2 seems to be used for any program I've seen that uses Python as its scripting language (Calibre, Plex, etc.). However that should give the book some nice longevity.


If you're trying to learn, I recommend Hello World! Computer Programming for Kids and other Beginners by Warren D. Sande and Carter Sande, and The Quick Python Book by Vernon L. Ceder.  I used the Hello World! book for my Brother-in-Law when he was thinking of getting into programming, and it worked wonders.  He's on to more advanced things now, but that grounding in Python helped him prepare for his college classes.  It also delves into pygame, so you might want to look into it.  The other is just a really good reference.