Invent Your Own Computer Games With Python by Al Sweigart
Читать

Invent Your Own Computer Games With Python by Al Sweigart

I have more thanks for your interest and more apologies for this book's deficiencies than I can enumerate. My motivation for writing this book comes from a gap I saw in today's literature for kids interested in learning to program. I started programming when I was 9 years old in the BASIC language with a book similar to this one. During the course of writing this, I've realized how a modern language like Python has made programming far easier and more capable. Python has a gentle learning curve while still being a serious language that is used by programmers professionally. The current crop of programming books for kids that I've seen fell into two categories. First, books that did not teach programming so much as "game creation software" or in dumbed down languages to make programming "easy". Or second, they taught programming like a mathematics textbook: all principles and concepts with application left to the reader. This book takes a different approach: show the game source code right up front and explain programming principles from the examples. My fellow programmers may notice that the games in this book all use console text, and also use a single stream of text rather than a console window system such as the one the Curses library provides. This is on purpose. Even though there are no graphics or sound, I think that the games are compelling enough in their own right. I also think that graphics and images (and especially game construction kits) mask the true nature of programming. I have the perhaps outdated notion that games do not require fancy graphics to be fun.