Invent Your Own Computer Games with Python

Invent Your Own Computer Games with Python — page 7
Many programming books for beginners fall into two categories The first category includes books that don’t teach programming so much as game creation software or languages that simplify so much that what is taught is no longer programming The other category consists of books that teach programming like a mathematics textbook all principles and concepts with few real-life applications for the reader This book takes a different approach and teaches you how to program by making video games I show the source code for the games right up front and explain programming principles from the examples This approach was the key for me when I was learning to program The more I learned how other people’s programs worked the more ideas I had for my own programs All you’ll need is a computer some free software called the Python interpreter and this book Once you learn how to create the games in this book you’ll be able to develop games on your own Computers are incredible machines and learning to program them isn’t as hard as people think A computer program is a bunch of instructions that the computer can understand just like a storybook is a bunch of sentences sentences that the reader can understand To instruct a computer you write a program in a language the computer understands This book will teach you a programming language called Python There are many other program ming languages you can learn like BASIC Java JavaScript PHP and C When I was a kid I learned BASIC but newer programming languages like Python are even easier to learn Python is also used by professional programmers programmers in their work and when programming for fun Plus it’s totally free to install and use you’ll just need an internet connection to download it Because video games are nothing but computer programs they are also made up of instructions The games you’ll create from this book seem simple compared to the games for Xbox PlayStation or Nintendo These games don’t have fancy graphics because they’re meant to teach you coding basics They’re purposely simple so you can focus on learning to program Games don’t have to be complicated to be fun Who Is This Book For Programming isn’t hard but it is hard to find materials that teach you to do interesting things with programming Other computer books go over many topics most new coders don’t need This book will teach you how to program your own games you’ll learn a useful skill and have fun games to show for it This book is for (cid:120)(cid:3) Complete beginners who want to teach themselves programming even if they have no previous experience (cid:120)(cid:3) Kids and teenagers who want to learn programming by creating games (cid:120)(cid:3) Adults and teachers who wish to teach others programming (cid:120)(cid:3) Anyone young or old who wants to learn how to program by learning a professional programming language xxii Introduction