Introduction


Staring back at me on the screen was an image I recognized: a face—my face. Grainy and pixilated, it was still me. I watched with detached curiosity as my expression twisted and contorted beyond human limits until finally, an alien embryo burst from my skull. A voice behind me said, "You wanna see it again?"

No, this wasn't some horrible dream, it was my job. I worked at a company producing and designing computer games. I also got to "star" in our first release, an adventure game where the player clicks me around the screen. And if the player fails to solve the game in time . . . well, I think you know how that turns out. I've also worked as a programmer for a major Internet services company, traveling to sites around the country. And while those two lines of work may seem quite different, the basic skills necessary to succeed in each started to take shape while I wrote simple games on my home computer as a kid.

The goal of this book is to teach you the Python programming language, learning to program the same way I did: by creating simple games. There's something more exciting about learning to program by writing software that's fun. And even though the examples are entertaining, you'll still see some serious programming. I cover all of the fundamental topics you'd expect from an introductory text and then some. In addition, I point out concepts and techniques that you can apply to more mainstream projects.

If you're new to programming, you've made the right choice. Python is the perfect beginners' language. It has a clear and simple syntax that will get you writing useful programs in short order. Python even has an interpreted mode, which offers immediate feedback, allowing you to test out new ideas almost instantly.

If you've done some programming before, you've still made the right choice. Python has all the power and flexibility you'd expect from a modern, object-oriented programming language. But even with all of its power, you may be surprised how quickly you can build programs. In fact, ideas translate so quickly to the computer, Python has been called "programming at the speed of thought."

Like any good book, this one starts at the beginning. The first thing I cover is installing Python under Windows. Then, I move through concepts, one step at a time, by writing small programs to demonstrate each step. By the end of the book, I'll have covered such fancy-sounding topics as data structures, file handling, exceptions, object-oriented design, and GUI and multimedia programming. I also hope to show you how to design as well as program. You'll learn how to organize your work, break problems down into manageable chunks, and refine your code.

You'll be challenged at times, but never overwhelmed. Most of all, you'll have fun while learning. And in the process, you'll create some small, but cool computer games.

Throughout the book, I'll throw in a few other tidbits, notably the following:

HINT

These are good ideas that experienced programmers like to pass on.

TRAP

There are a few areas where it's easy to make a mistake. I'll point them out to you as we go.

TRICK

These will suggest techniques and shortcuts that will make your life as a programmer easier.

start sidebar
IN THE REAL WORLD

As you examine the games in this book, I'll show you how the concepts are used for purposes beyond game development.

end sidebar

Challenges

At the end of each chapter, I'll suggest some programs that you can write with the skills you've learned so far. This should help you start writing your own programs.




Python Programming for the Absolute Beginner
Python Programming for the Absolute Beginner, 3rd Edition
ISBN: 1435455002
EAN: 2147483647
Year: 2003
Pages: 194

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net