4 ms·
The BASIC dialects that most of us cut out teeth on (ZX Spectrum user here) would indeed have made Dijkstra weep, but they all had a single cardinal virtue that
by tragomaskhalos 4y ago
The BASIC dialects that most of us cut out teeth on (ZX Spectrum user here) would indeed have made Dijkstra weep, but they all had a single cardinal virtue that is unmatched by any of its successors - it was trivial to do simple graphics in them using the facilities of the language itself. This was the 'hook' for most of us, as graphs, animations but most importantly games could be dreamed up and implemented so easily. Were these mostly garbage with terrible performance? You bet they were. Did that matter? Not one bit. And, with growing experience and some POKEing you could salt in a bit of hand-assembled machine code to jazz things up, even if you lacked the inline assembler the fancy BBC micro kids had.
This topic comes up on HN from time to time and people often cite Javascript, Processing, Pygame and others as counterexamples, but none of these are remotely as accessible nor as simple to get going on as these crude BASICs were.
- mhd 4y agoTrue, more languages should include a simple 2D canvas in their standard library. Even something totally unoptimized is better than having to hunt for basic game engines or a 3rd party SDL2 binding.
- zozbot234 4y agoPOKE isn't a "facility of the language" though, it's just a raw memory write. The modern equivalent would be using the lowest-level graphical API's.
- tragomaskhalos 4y agoPoke was a facility of the language - it was a keyword built right in. I was referring to using it to put a machine code routine into memory via BASIC, but yes you certainly could and did control screen memory directly using it, this was also very accessible because there was typically a fixed region of memory with a simple logic to its layout that made that direct connection and feedback available.
- bibanez 4y agoI don't know BASIC, but I would say Processing is very accessible. They tought it in my Middle School and I would say making games is trivially easy with it, even if it is more designed for animations than interactivity. I would argue the problem is, back then, as a kid, you most probably had access to only one machine, and one PL. Now too many choices can make learning unfocused
- greenbit 4y agoMy son dabbled with Scratch for a while, where you can conjure up multiple large full color sprites with minimal effort, even animate them, but pretty quickly lost interest in programming altogether. Whereas when I entered "SET(1,1)" on a TRS80 model-I and got a single white pixel on the screen? That was some Magic, let me tell you. Maybe the difference is that today it's harder to get the feedback between I-typed-this and that-happened, when there's already a whole lot of that happening all over the screen. For a kid in 1980, there was a definite dopamine hit to be had from discovering the trail to High Technology, right there at your command. You could make Pong! Or Space Invaders! The possibilities were endless.
- lll-o-lll 4y agoI think the real difference is that the excitement came from the technology being brand new. In the 80s this was the future. The future has been around a long time now, and that turns it into the past. Oldies such as us are quite into the past, but kids not so much. The generation before us, it was all electronics and radios. Kids today want to make the kind of games they play. Except that’s not really possible of course. Roblox, youtube, that’s the kind of thing they can actually do _and_ is the future as they see it. Poor kids. Robotics is the edge I’m trying to push; better than that other crap at least.
- PaulHoule 4y agoThe support for graphics depended a lot on the particular computer. The TRS-80 color computer had BASIC commands to draw lines, circles, and flood fills. Appleoft BASIC could draw lines. The C-64 had a great selection of block and line drawing characters you could type on the keyboard but you had to use PEEK and POKE to do dot addressable graphics. For that matter the C-64 had the best sound chip of any computer that that point but using it in BASIC was all PEEK and POKE.
- richardjam73 4y agoOn the VIC20 you had to make the video chip change the address of the character ROM so part of it pointed to RAM. Then you alter that memory to change the pixels in a character (8x8). Then anywhere that character was drawn on screen the altered graphics would show. In order to draw graphics like a bitmap screen you had to use multiple characters in a grid like. ABCDEF GHIJKL MNOPQR Then you had to calculate the which character held which pixels and then alter the bytes inside that character to alter the exact pixel you wanted. So a pixel at 7,7 would be inside the A but a pixel at 10,10 would be inside the H.
- greenbit 4y agoIf you had a C64, you had to have that book, The Programmer's Reference Guide. It was all in there. Still have mine here somewhere
- PaulHoule 4y agoIt wasn't until the C128 came along that BASIC gave you more amenity than PEEK or POKE to access that GFX and sound but the capability of that system was better than any other computer of its era.