Memory & Storage;
A Historical Perspective.
Completed
Encryption vs Encoding
Cryptography in History
Revisit Info Theory Concept
About Control Flow
Finish our Caesar Cipher
Today
About Memory
Upcoming
Flux
Quiz eventually
Let's pause for a moment there to talk a bit more about sending compressed files and a conceptual look at how to compress images.
One of the first widely available formats used for data storage for the general public, including for computer games, were casette tapes.
In the previous video, we saw a Commodore 64, programmed with Basic. This sort of technology is approaching half a century in age at this point. Old technology, especially computer technology, tends to get lost. However, this was popular enough, and recent enough, that people have recreated it.
Let's look a bit more at it, and then try our hand at an emulator.
Use the emulator on the right. We'll try probably the most famous program for this system. Try typing in the following:
10 print chr$(205.5 + rnd(1));
20 goto 10
run
What happens if you try different values inside of CHR$()? What happens if you try different values in RND()? Different values in RND() didn't work for me... or did they?
When you used the value 1 in RND, did you get the result over on the left? Everytime I run the program with 1 in RND(), I get this same result. Do you get the same result over and over again?
RND is the random() function in basic... but if it's random, why do we keep getting the same result?
Instead of 2 lines of code, this can also be done on 1. Let's learn a little bit more about what we just wrote. Here's an excerpt from a longer video (you can check it out if you want) about this specific program from the 80s. There's also this somewhat entertaining online website that brought the concept to the web, with adjustable sliders, it's fun to play with for a few minutes.
Here's a few of my experiments after learning a bit more about the code, and experimenting a bit.
10 print chr$(180.5 + (rnd(1)*6));
20 goto 10
run
10 print chr$(149.5 + (rnd(1)*10));
20 print chr$(218);
30 goto 10
run
This one is my favorite one so far.
10 printmid$("UIJK", rnd(0)*4+1, 1);
20 goto 10
run
NOTE: The UIJK inside of the " " will not display that way in the Commodore 64 emulator, instead they will be little curved lines.
Here's another cool one that might inspire you to create your own designs.
This home computer, and easy system for programming expanded rapidly. The first wildly succesful and popular computer programming book was due to Basic and the Commodore64 (and similar early home computers). You can find scans from the Programming Basic Games book from that time period, as well as other examples pretty easily via Google.
Other interesting examples of how Basic and the Commodore64 helped expand computing included adventure books for kids that included a mix of writing and coding; like the Arcade Explorers books (can find PDFs here) and the Micro Adventure series (which has been recreated online).