A Modern Day '101 Basic Computer Games'?
pcraven asks: "Back when I learned how to program, I found a book called 101 Basic Computer Games by David H. Ahl. This book had a lot of simple programs that I could type into the Apple //e. It made programming interesting. I'm not sure I would have started a career in programming without it. Today I haven't found any recent equivalent to this book. I want a bunch of sample computer games that students can program that they will find fun and interesting. Something that a CompSci 101 graduate could type in and run. Does anyone know of a book or web site like this?"
Nowadays, it seems that there are almost no "fun" programming books, that don't try to go to nasty details, but simply give you something to play with.
It might partially be that modern operating systems don't provide such easy environments to start programming as the BASIC interpreters used to be in every imaginable computer, and modern operating systems are somewhat more complicated to deal with.
Another possibility is that expectations of wannabe programmers are so much higher, that the only option is to write the book to look professional. No idea. I've wondered your question and mine for quite some time now, and don't see a reason. Could write an easy programming book for some of the scripting languages ofcourse, maybe something with simple text-adventures or something..
There are really really simple books ofcourse, but those usually give you simple constructs, and no example code to play with. One nice thing was when I found an old LISP book from the local library, from about the era you describe. Even if it was this kind of "what LISP is about book" it had source code for meta-circular stuff and all. (Have to add that SICP ofcourse does have that too, but SICP is not at all that simple book for a kid to read, but instead more of academic book.)
Anyone any ideas? Is it just that programming languages today are so hard that the people who used to write those nice books with example programs and all have lost their clue about programming?
Software should be free as in speech, but if we also get some free beer, all the better.
I would recommend The Official Blender GameKit for 3d games.
Ah yes... I remember and look back on those times with a mixture af happy and desperate thoughts. I remember buying one of the many (!) monthly magazines with computer game code listing and spending an afternoon and evening typing a game in on my trusted Commodore VIC20. When the game ran it was wonderful (the VIC20 was after all a pretty impressive computer for the time), but I also remember the times when the code didn't work! Then I had to spend a few extra hours looking for typos because I had no idea what the "complicated" BASIC was doing, so there was only the tedious way of debugging. Those were the days...
That aside I doubt if a lot was learned from those computer games listed in books/magazines that weren't picked up from somewhere else. Mindlessly typing in the games certainly doesn't help with understanding, and only if you approach the problem from an how-does-he-do-this perspective are you really going to get something out of other peoples code. I still find that the most usefull way of learning some programming is to have an itch that needs scratching. In teaching (games)-programming I would guess that getting beginners to write tic-tac-toe, a worm-game etc. is still a good idea, and there are lots of simple code to be found on the net.
when i was a kid we learned apple pogo or whatever it was called and did small programs in basic. Is there any language that is even really comprable today? My console was 320x200 or something lke that .. Now .. its 1024x768. And honestly I dont think any kid is going to be that excited by drawing a box when they have games like half-life to blow up GL-creatures.
.. perhaps pygame
That said, look at libsdl.org and some of the toolkits that go with it
Why not just use the online version that you posted? Just ask your students to program this in Pascal and they will most likely learn a hell of a lot in the process. You could even ask them to write two versions, one in Pascal and one in C or Java, and to make use of each language's strengths in each case, and get them to write some sort of essay describing what they learnt about programming techniques in both cases.
Very educational...
Daniel
Carpe Diem
Witness the plethora of DHTML/Javascript books out there -- that'd cover at least half of the BASIC book programs from the past. Books tend to come with CD's now, so there's no reason you couldn't include the language, a whole environment, hell a whole operating system (can you say knoppix) on that CD.
My theory, however, on the reason you don't see kids programming books anymore is that computers are no longer toys in themselves. When these books were "hot" (actually they never were, so let's say when they were being published) home computers were a relatively new phenomenom and a largely unexplored frontier. Now they're ubiquitous, and the joy of puttering around on the computer isn't really so interesting to most kids as tinkering with something already on the computer.
An updated LOGO type of language with 3d graphics instead of turtles, that might inspire interest again. At least something that can allow kids to create something as eyecatching and appealing as games from 5 years ago. Or just update some of these old saws to modern standards: Imagine rocky's boots on a modern 3d engine. Kids aren't interested because all the educators are still pointing them at computers and saying "this is a COMPUTER billy, can you say COMPUTER?", while the kid's thinking "please, I bet it has less than a gig of RAM and it's not even DDR".
I've finally had it: until slashdot gets article moderation, I am not coming back.
While lots of people designing stuff in Flash are wannabe graphics artists, some of them are digging into the ActionScript and are learning some programming skills. There are a few sites out there with countless little flash apps that are nothing more than simple programming exercises and simple little games. Check out Orisinal, although the art is as good as the programming in this case.
Bleh!
An updated LOGO type of language with 3d graphics instead of turtles, that might inspire interest again.
Well, you still have a turtle (but you can change it's graphic), but MSWLogo has 3D support (however, much of the 3d stuff needs some CPU power - your generic old P75 rig won't work very well), and it's GPL to boot.
I can think of several reasons why these books are becoming less common.
1. Machines are much more complicated than they used to be. DirectX isn't the same thing as messing with BASIC on an Apple IIe or QBASIC in MS-DOS (both of which I did).
2. Expectations are higher. Much Higher. Everyone likes to think he or she doesn't need that 4-line "Hello World" program. You don't. What you need is the surrounding pages of discussion, tips, and tricks that tell you how to set up your compiler and the other "little" things that can be a huge barrier.
3. It's harder to get excited about a neat program you wrote that runs in a command console when you can see all sorts of flashy things going on elsewhere...
You know, literally as I typed that last phrase, it occured to me that we (as established programmers) might be looking at this the wrong way. Why not teach a budding "programmer" flash?
You'll learn the same concepts, won't you? It's visual, so you get immediate feedback, and it's also what every idiot with a computer seems to be churning out anyway on the WWW. Obviously a person won't learn how to write a linked list, or the exact syntax of C, but he or she will learn how to break apart a problem, and start thinking about it in the right manner. By the way, I do mean an interactive flash movie, like a "space invaders"-type game or beyond.
What other sorts of graphical programming packages are there, aside from Flash and Director that are accessible?
Michael C. Hollinger
I faithfully typed in C=64 programs for years never minding that I wasn't learning much from such densely packed, often unreadable code. BASIC wasn't necessarily the problem, rather that memory restrictions and magazine space issues prevented most people from organizing code well. Comments were lost, multiple statements crammed onto the same line, etc.
I agree with whoever said that kids wouldn't be interested in such things today. We have to accept that interests have changed and web page building has replaced classic programming in the minds of novices. The biggest obstacle to a "fun" programming book is the appalling lack of built-in or bundled programming languages with new computers. As much as I enjoy using languages like PHP and Java I think they are much too complicated for the newbie. We should either bring back traditional BASIC with tighter syntax requirements, popularize a version of LOGO with hooks to graphics routines and the ability to build a complete clickable app or popularize some other similar easy to use language for first timers. Only then might we see a renewed interest in learning how to program.
Trivia -- I remember it well, the first few lines of SeaWar asked for the user name, and if the named typed in was "chris" it would jump to the end and say "Game over." What was up wit dat??
www.HearMySoulSpeak.com
Let's see...
And then you say you're looking for...
I still have my copy of 101 Basic Computer Games which I went out and bought with allowance money when I was twelve. The only game in there which might have been a bit over-the-top for someone that young was Star Trek (for sheer length), but I was already a Trekkie by then, so I typed every last line of code in so I could play it.
I guess my question is, Are you looking for something on the level of 101 Basic Computer Games, or are you looking for something appropriate for college students?
As an aside...
Those of you who are saying that typing in the game doesn't teach you anything, I'd like to offer myself as a counter-example. After I played 2-3 games of Star Trek, the very next thing I did was to go into the code and add a "self-destruct" option to the library computer. I made sure it asked you for all three of the codes, too.
Then, I decided that wasn't good enough. I played with nested for loops and the locate statement to display a 30-second countdown in (approximately) real-time. I made use of my rather limited understanding of graphics to try and show the Enterprise exploding when the counter reached zero (very crude, but it got the idea across). Then, I wanted to let the player change his/her mind, so I learned how to use inkey$ so the player could abort the countdown (at 5 seconds, though, it was too late (Oh, and you needed to know the abort code)).
I still keep Star Trek on my hard drive, although currently it's written in Java. Every time I want to learn a new language, I use Star Trek as a measuring rod: if I can successfully re-implement it in the target language, it means I've got all the fundamentals down. Next up: Python.
It's extremely difficult to live up to your own expectations, when you try to program your ordinary pc - Professional programs have simply gotten to advanced.
Try to program something different instead, I suggest Lego Mindstorms. You can find several fun programming books to help you eg. "Core LEGO MINDSTORMS Programming: Unleash the Power of the Java Platform", "Lego Mindstorms Interfacing" and "Creative Projects with LEGO Mindstorms".
It's the ideal combination - You get to play with lego and build cool robots, and you practice your programming skills at the same time
The biggest reason you don't see these kind of books these days is because of the languages being used to teachcomputer science and even just plain programming. Even BASIC has evolved into something for grown ups, something people geting paid use to write apps- VisualBasic, REALBasic, and other similar tools.
Which isn't to say that old-school BASICs don't exist anymore, they do. They are plentiful and free. There is no reason that a kid today, or in 10 or 20 years from now couldn't pick up one of those books, start typing and have a good time learning. There are BASIC implementaitons natively for Mac OS, Windows or Linux that emulate classic BASICs like AppleSoft's or Microsoft's GWBASIC/BASICA. There is also the opton of emulating an Apple ][, Commodore, etc.
But perhaps you want something flashier, something more modern.
One system I'd reccomend is Squeak Smalltalk. Unfortunately, one of the things Squeak really lacks is documentation, especially in book-form. This has a lot to do with the way most folks learn Smalltalk (by doing, rather than reading) as well as aspects of the community and other factors. If you download Squeak (see here) and run it, there are a bunch of demos there to be played with, as well as some tutorials. They make for a great start for someone with a little (or even no) programming experience or formal computer science knowledge.
One of the neat features for Squeak (that you get when you download the version with all the libraries) is an implementation of Alice, which is a scriptable 3D environment for world-building and games. A lot of fun to move that bunny around, especially if you're a kid who likes to see a direct correlation between what you type and what goes on on the screen.
In addition to this, Squeak also comes with a scripting environment called eToys. It
For an example of how to use the Squeak eToys scripting system to make a more traditional application, see this Rolodex tutorial. or, for something a little more fun, check this out. introducing yourself to Squeak makes for a great starting point for experienced folks and newbies alike. Of course, there is also tutle graphics, which even I've used in more "grown up" applications, for modelling dynamic system.
Best yet- Squeak is totally Free. It is free down to its core, the system being open in a way that C, C++ and Java have no analogous structure. Smalltalk has been open since the beginning in almost every way you can think of. Even commercial implemtations, you still have the power to see pretty much all of the source, and changing if you so desire. In addition to being open source and free, Squeak Smalltalk runs on more than 20 platforms, including Linux, Mac OS X & Classic, Windows and pretty much every Unix one could imagine. Unlike what people sometimes experience with Java, it truly is write-once, run-everywhere, with your entire app being encapsulated in just two files- the virtual machine and the image. Even if your target platform doesn't have a VM installed already, it's just a matter having it zipped up in your installer or archive- just one extra file, often less than even a MB.
I meant to say a little, but that is a lot to chew in one mouthful!
Working toward a usable PDA environment in the spirit of Newton OS: Dynapad
But anyway, not only did I learn the art of debugging, but taught me how to effectively read someone else's code, and it also taught me to 'optimize' (those programs were written in very generic basic, but I could replace a few of the generic lines with GW-BASIC specific lines). Logic building was essential, and new tricks as in "Hmm, what he trying to do here? Ah, wow, you can do it thatway too?!?"
The "article" is asking for books that reproduce the simple learning environment from the late 70s/early 80s. Complaining that one of these environments has:
a limited set of fonts, all ugly as sin, and tiny widgets
seems off-topic, as our original BASIC environment:
- had ONE font,
- was text-based, so it could not even strive to be "ugly"
- had NO widgets. You were required to build everything from scratch.
I work with programmers who are not even a decade younger than me, but they did not start with computers until college. They have never built a program that was not on a "platform" that provided the GUI and access to all hardware such as memory. They have never had to PEEK and POKE, so have no clue about how memory really works. They will write (and debug) 60 lines of VB rather than one line of OS commands, because they have never worked at a CLI. I wrote a 3 line batch file that replaced a 400 line program they were having difficulty getting to work.
I am not saying that using IDEs is bad. We can do so much more working within a platform than we imagined in the early 80s, but the knowledge required before becoming productive is much higher.
We had a discussion about this a few months ago, but it is off my Info page so I could not find the posts. (I really wish I could find some of them, but the Info page only shows the latest 24 posts, and search is not very useful for limiting to one user.) Programmers today did not progress from CLI to OOP. They start with the current GUI and have little understanding of what the computer does.
In the late 80s/early 90s, people were learning about programming in college because it was the "good" career path. But they were "studying", not "hacking".
In the mid-90s, many people entered the IT world using HTML as the "programming" language. Then they copy/pasted JavaScript. Some of them took the time to learn how to write their own. A few of those branched into other languages, and they may have more of the hacker attitude because they were forced to figure out how things worked. But they still learned assuming the platform was there.
Today, BASIC is long gone, and HTML is not enough to get started. Colleges are teaching Java to the studying students, but Java really protects programmers from memory allocation. The scripting languages are great for administrators, but do not push you to learn more traditional programming.
I think the computer revolution has stalled because there is no easy entry point. One great programmer can outproduce a hundred regular programmers. Becoming a great programmer requires understanding how software relates to the hardware. Are there any great programmers who started with computers after 1990? Is it even possible to learn enough on today's platforms?
I spend my life entertaining my brain.
C and BASIC aren't even close, though. If you try to throw too much at a beginning programmer, say, C, they'll get overwhelmed and give up. There are likely hundreds of not thousands on this site who say "I learned to program in C, not only that, but we didn't have CRTs and keyboards, no sir, we chiseled our programs into rocks!" Lots of people need the simpler stuff, even if just as a stepping stone to something bigger. How does one translater QBasic's LOCATE into C? Do you really want to teach a beginning programmer ncurses? That's the advantage QBasic and HTML/CSS/JS/etc have - instant gratification that can mimick something greater. Furthermore, people are not going to just jump to linux because they want to program. That's even worse than starting them off in C! You want to teach someone to getting a working install, learn the quirks of a given shell, and learn to program all at the same time?!? They're not even sure they're capable of programming yet! Many people in this threat have suggested Flash as a replacement for the BASICs of yesteryear. What about VBA? It's arguablly better than QBasic, very powerful and very simple to use. Excel's implementation specifically seems very similar to VB's original implementation to me anyways, and it allows for instant gratification. People can bind a few command buttons to the IE activex control and make their mandatory web browser - does it seem to anyone else like this has replace hello world as the first Windows app? It's got a much lower initial timecost than linux, as well as being much easier than C, while also allowing someone to determine whether they actually like this "programming" or not. Forgive my ramblings. It's late.
Implicit Evaluation with PHP
I've thought for some time that Python would be a great language for introducing someone to programming, and that a book like this, but with Python code instead of BASIC, might get another generation interested in programming. Granted, there are a number of features of Python that might be stumbling blocks to someone who goes on to learn a more traditional language-- significant whitespace, semi-weakly typed, etc. However, it's much closer to C than, say, BASIC, and I somehow learned to program by sorting through the rats' nests of GOTO statements that littered the programs in this book.
Which actually raises a question-- why is (or was) BASIC considered to be such a great language for beginners? I remember when I first learned Pascal (the first function-oriented language I learned) it was like a breath of fresh air. The language pretty much forced you to structure your code that was (more or less) elegant, and I found it made much more sense than the spaghetti code I had grown up with. Had I started out with such a language instead of BASIC I doubt the learning curve would have been as steep. Another question: do kids even learn BASIC these days? What language do they typically start out on?
I am Sartre of the Borg. Existence is futile.