A video: What was Coding like 40 years ago?

 

A video tutorial on programming a game on an Apple II Plus computer using Apple Basic, with step-by-step instructions provided.

00:00 Making Snake game in Apple Basic

03:40 Creating a snake game with basic programming skills

07:06 Apple Basic allows us to read and write directly to memory

10:28 Adding array for snake and initializing food.

14:05 Debugging random value and creating subroutines

18:18 Animating the snake based on keyboard input and updating its position

00:41 Debugged the snake game in Apple II Plus

26:07 Write error checking for the snake game to prevent invalid moves and crashes


Detailed Summary for What was Coding like 40 years ago? by Merlin

00:00 Making Snake game in Apple Basic
– Programming Snake by printing characters to specific locations on the screen and animating them.
– Showing how to type Basic code, using line number and running it on an Apple II Plus computer.

03:40 Creating a snake game with basic programming skills
– Assigning values to variables like height, width and position of the snake and food
– Using commands like HTab and VTab to position the character and GoSub to write a function (subroutine) for keyboard interaction.

07:06 Apple Basic allows us to read and write directly to memory
– We can use Peek and Poke to read and write memory addresses respectively
– Debugging purposes can be served using printouts and returning to previous code lines

10:28 Adding array for snake and initializing food.
– Added a one-dimensional array for snake with fixed length of 100 spots each for x and y, and initialized first element of x and y arrays
– Created a subroutine to initialize food and picked a random location for it on screen

14:05 Debugging random value and creating subroutines
– Switching lines 17 and 20 fixes random value bug
– Creating separate subroutine for printing S at x and y position

18:18 Animating the snake based on keyboard input and updating its position
– Update snake position by looping through its positions and print ‘S’
– Check if the snake has eaten the food, update its position, and print ‘Yum’
– Shuffle all positions down in the array before animating the snake based on keyboard input

00:41 Debugged the snake game in Apple II Plus
– Modified GoSub 4000 to move the food after execution, added GoSub 2000
– Realized printing F over and over again is unnecessary, modified line 2000 subroutine to print F only once and removed line 55

26:07 Write error checking for the snake game to prevent invalid moves and crashes
– Food should always be picked between rows 1-40 and columns 1-24
– The snake should not be allowed to go off the edge or run into itself

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.