The Fun way to learn programming
In the early 1980s, my brother and I bought a computer. My mom thought we were crazy, because it didn’t do anything. She was right. There was very little software available. We spent many nights typing in programs (usually games). They almost never worked when we finished typing, so we always had to look back carefully over the code. Eventually, we were able to fix typographical mistakes and make the games work. Then, we found ourselves changing the code, so we could improve the games that we were typing in.
That was a great way to learn how to program. We were working in a simple language without too many confusing options. We were writing games that were even more fun to play because we had crafted them ourselves. We were able to combine both logical thinking and our creative drives. Game programming was especially rewarding, because the results were programs that we actually wanted to use. Our skills improved because game programming provided lots of challenges. We later found that the skills we learned by developing games were very useful in more “serious” applications as well.
Today it would appear difficult to learn programming in the same way that my brother and I did. Computers are much more complicated than that old machine that my brother and I used. Programming languages have become far more complex at the same time, and the programmer’s toolbox of compilers, integrated environments, and debuggers seems expensive, complex, and forbidding to somebody who just wants to get started and play around a little bit.
Still, it is possible to learn to program in almost the same way. A new crop of beginnerfriendly languages is popping up. Specifically, the JavaScript language has emerged as a new programming language perfect for beginners who want to see what programming is all about, and who want to learn in a non-threatening but real way. JavaScript is embedded into popular Web browsers, so the language costs nothing. It is available on nearly every major type of computer system. The language has a reasonably straightforward syntax that provides beginners a gentle introduction to some important modern concepts, such as object-oriented and event-based programming. It also does not have so many features that it requires a degree in computer science to understand.
The purpose of this book is to teach you the main principles of programming. You will learn the major concepts used in most programming languages, and you will apply them specifically in JavaScript. I will use the context of game programming to teach the concepts, but you will find that you can use the techniques for purposes far beyond game programming. If you already know JavaScript, you will still probably find some new ideas in the descriptions of game programming. If you have already done some game development, you might be surprised at the things that you can do with JavaScript. If both areas are new to you, you’re going to have a great time exploring some new things.
Although you will probably not immediately make a million dollars selling computer games, I think that you will find this book’s approach reasonably friendly. You will also see that you can easily apply the skills that you learn more generally to other kinds of more serious programming. Besides, the addition of a game to a Web site can drastically improve its popularity, making game programming a very practical skill for any Webmaster.
I am not presuming that you have any programming experience at all. I do expect that you are comfortable with HTML and that you know how to build Web pages with a plain text editor. You should have a good text editor, a graphics editor, and a sound editor. The CD-ROM that accompanies this book has examples of all these programs.
Of course, you will need access to a computer that can run these programs. You will be running your programs in a Web browser, so you should have access to recent versions of Netscape Navigator (4.0+) and Internet Explorer (5.0+). Some of the later examples in this book take advantage of gameLib, a special programming library.
For Download:
Click Here