What was Coding like 40 years ago?

2024 ж. 21 Мам.
1 694 548 Рет қаралды

🧠 Sign up for Nebula! - go.nebula.tv/codingtrain
Take a trip back in time and let's code the Snake Game in AppleSoft BASIC on a restored Apple II+ computer! GOTO and GOSUB! Line numbers! thecodingtrain.com/challenges...
🎥 Previous video: • Coding Challenge 172: ...
🎥 All videos: • Coding Challenges
References:
🧠 What is Code?: nebula.tv/what-is-code
🎶 Coding Together: / coding-together
AppleSoft BASIC:
🍎 Basic Programming Reference Manual: mirrors.apple2.org.za/Apple%2...
🪧 Peeks, Pokes and Pointers: archive.org/details/peeks-pok...
Apple II Emulators:
☕ Applesoft BASIC in JavaScript: www.calormen.com/jsbasic/
🍎 Apple IIjs: www.scullinsteel.com/apple2/
🍎 MicroM8: paleotronic.com/software/micr...
Editing by Mathieu Blanchette
Animations by Jason Heglund
Coding Together Theme by Will from America ( / willfromamerica )
Eye of the Tiger cover by Leon from @neoexplains
Additional music from from Epidemic Sound
Timestamps:
0:00 Hello from 1981!
0:35 Opening Theme
1:29 Getting started
1:50 Fundamentals: PRINT, line numbers, LIST, RUN, GOTO
3:50 HOME (clear screen)
4:10 Variables
5:11 HTAB, VTAB
5:24 GOTO
5:44 Animation
6:20 Subroutines and GOSUB
7:17 Peeks, Pokes, & Pointers
8:07 RETURN
8:35 Write IF for keyboard interaction
9:35 Delay loop
11:16 Working with Arrays (DIM)
13:47 Remarks (REM)
14:01 Random Food Position (RND)
15:26 Debugging Montage
17:34 Snake Subroutines
23:15 Move Food
25:44 Improvements
27:02 Emulators
27:25 Nebula Class! What is Code?
🚂 Website: thecodingtrain.com/
👾 Share Your Creation! thecodingtrain.com/guides/pas...
🚩 Suggest Topics: github.com/CodingTrain/Sugges...
💡 GitHub: github.com/CodingTrain
💬 Discord: / discord
💖 Membership: kzhead.infojoin
🛒 Store: standard.tv/codingtrain
📚 Books: www.amazon.com/shop/thecoding...
🖋️ Twitter: / thecodingtrain
📸 Instagram: / the.coding.train
🎥 Coding Challenges: • Coding Challenges
🎥 Intro to Programming: • Start learning here!
🔗 p5.js: p5js.org
🔗 p5.js Web Editor: editor.p5js.org/
🔗 Processing: processing.org
📄 Code of Conduct: github.com/CodingTrain/Code-o...
This description was auto-generated. If you see a problem, please open an issue: github.com/CodingTrain/thecod...

Пікірлер
  • This guy is like the Bob Ross of coding. His enthusiasm it's contagious!

    @crism8868@crism8868 Жыл бұрын
    • There are only happy accidents and programming bugs.

      @jayak3768@jayak3768 Жыл бұрын
    • Agreed. Immediately reminded me of a high energy bob ross.

      @JoshuaPritt@JoshuaPritt Жыл бұрын
    • THATS WHAT IM SAYIN!

      @nicktender@nicktender Жыл бұрын
    • reminds me almost of a Bill Nye haha

      @cheeko8080@cheeko8080 Жыл бұрын
    • That describes him perfectly

      @zackattack7103@zackattack7103 Жыл бұрын
  • This is how I started learning programming. In the Soviet Union in 80s we didn't have personal computers at homes and we didn't have a computer class at school. So we we had lessons, where we studied syntaxes of basic and we wrote programs on paper. Then, once in to weeks, we went to a computer class, where we had 45 minutes to type in a program and debug it. That was a challenge.

    @Alex_C_5605@Alex_C_5605 Жыл бұрын
    • Мы так и в 2006-2007 году код писали на бумажках и даже экзамен так сдавали, большая часть занятий по программированию не за компами была

      @mikesummer670@mikesummer670 Жыл бұрын
    • @@mikesummer670в 2019 году, когда я учился в школе, все было точно также, код на листочках. Преподаватели видимо сидят там со времён перфокарт и особо не хотят ничего менять.

      @mnzcrsh@mnzcrsh Жыл бұрын
    • Woah I remember doing that in 2011 in India. 😅

      @ishikilucas8148@ishikilucas814811 ай бұрын
    • I can't Imagine doing It

      @Bruh-jh7vj@Bruh-jh7vj11 ай бұрын
    • This is what I experienced exactly in 90s in China by using Apple //e, which amazed me shockingly. So that I am still an Apple fan

      @seanyao7491@seanyao749111 ай бұрын
  • Back in the 1960s, you sat down at a card punch machine with your code scribbled on notes and CAREFULLY typed out the commands and syntax and punctuation, then took the card deck brick to the mainframe window, logged it in, and left. Next day you found that there was a typo _somewhere in the deck,_ and the program didn't run. Yet somehow, humans went to the moon on DOS 6.0, and designed the Golden Gate Bridge _without computers._

    @robertmarmaduke186@robertmarmaduke186 Жыл бұрын
    • I would love to try this! Any recommendation on a vintage machine I could purchase and restore?

      @TheCodingTrain@TheCodingTrain Жыл бұрын
    • I would have loved an alternate universe where Apollo ran DOS 6.0 It was an RTOS though, hard coded to core memory.

      @laincobayne@laincobayne Жыл бұрын
    • Plenty of people designed bridges that failed without computers too.

      @gabrielpaiz5954@gabrielpaiz5954 Жыл бұрын
    • haha. the moon.

      @mikkirefur@mikkirefur Жыл бұрын
    • DOS 6.0 was way more advanced than any computer software on Apollo. It didn't even come out until the 1990's. Also punch cards were used well into the 1970's. But, I get your point.

      @pseudocoder78@pseudocoder78 Жыл бұрын
  • Whenever I'm putting off doing my coding work, I put on this video. When most people try to explain computer science to me, I get intimated. This guy is different. He has a cozy, comforting sort of enthusiasm that is super motivating.

    @chipotlewhitegirlstarbucks1015@chipotlewhitegirlstarbucks1015 Жыл бұрын
    • nice user name haha

      @leroyjenkinsss1767@leroyjenkinsss1767 Жыл бұрын
    • Coders will code themselves out of a job in the end.

      @yousuck6222@yousuck6222 Жыл бұрын
    • I could actually say the same. I'm the kind of person to just be always demotivated seeing others make things that are far out of my reach, but in this case, even though I am by far not even a decent programmer (yet?), this guy just made me think of making Snake in C++. Sure, for obvious reasons C++ is not Apple Basic, but in general that's still programming. I don't think I've ever been motivated to do something after seeing someone else do something before. EDIT: After watching the video more, I think I've noticed _why_ that's the case. Most (if not all) other content creators just show the finished product and what's in it. This person, on the other hand, shows the failings and the thought process as well, and that unlike other creators, he shows that even professional developers can make silly mistakes, and that it's normal.

      @Fafr@Fafr8 ай бұрын
    • woah haven't seen a marshall pfp in years

      @MrJuliankilla@MrJuliankilla5 ай бұрын
  • Less than 2 minutes in and you've already put a smile on my face. 😊

    @nagualdesign@nagualdesign Жыл бұрын
    • Came to the comments to say exactly this! The intro seemed like a labor of love.

      @JohnDoe-sp3dc@JohnDoe-sp3dc Жыл бұрын
    • Especially the first minute is opening so less than 1 minute

      @stoliczek6362@stoliczek6362 Жыл бұрын
    • Absolutely true, this guy does everything with love

      @tiksman17@tiksman17 Жыл бұрын
    • Same

      @sbrunner69@sbrunner69 Жыл бұрын
    • Same here! It seems so natural for him to be like this ☺️

      @GerardHennemann@GerardHennemann Жыл бұрын
  • In the late 1970s I was a software engineer at Digital Equipment Corporation, working in their old mill spider-laden building in Maynard, MA, mostly on PDP-8 and VT-78 systems software. One lonely night during a weekend or holiday I decided to program a snake on the screen of my favorite small computer, the PDP-12. I did it in assembly language, as was most systems programming on the LINC and PDP-8 computers, which had merged to make the PDP-12. The result was a wonderful, keyboard-driven little game that worked perfectly. I wish there had been a way to release it to the world, but all we had was a mostly clunky user group, DECUS, and I didn't feel up to filling out forms and waiting. I guess I'm the only person who ever played that game I wrote on the PDP-12.

    @david203@david203 Жыл бұрын
    • Thank you for sharing this story!

      @TheCodingTrain@TheCodingTrain Жыл бұрын
    • What an expensive console to run Snake !! ;-)

      @markussteinbacher8807@markussteinbacher8807 Жыл бұрын
    • I wrote Assembly on a PDP-11... what beautiful code that was... with it's indirect addressing...

      @axelschweiss7066@axelschweiss7066 Жыл бұрын
    • @@axelschweiss7066 I also wrote in assembly language for early PDP-11s, when the programs were on punched cards--I designed a way to pack pages using groups of cards to maximize the use of same-page addressing. So after I'd written a program I would then manually pack the cards into pages. The programs thus made efficient use of memory. This was for an early hospital information system that tracked patients as they went through Kaiser Permanente clinics.

      @david203@david203 Жыл бұрын
    • @@TheCodingTrain I could so picture you in a past collab with Bob Ross (I know of him because of an artist friend of mine) :) Anyways, I remember back in elementary school computer class, whenever we had any downtime, we would always be allowed to choose 1 of the following 3 games which are absolute classics: The Oregon Trail, Odell Lake & Number Munchers :) And don't even get me started about the Atari 2600 (I still have one, and it actually works!!) with games like; Crossbow, Frogger 1 & 2, Midnight magic, Pitfall 1 & 2, Time warp, Dig dug, Plaque attack, Pole position, Radar lock, Challenge, Mario bros, Donkey kong, Asteroids, Space adventure, Spider fighter, Moon patrol, Millipede, Mouse trap, Solaris, Pacman Jr, Mrs Packman, Galaxian, River raid 1 & 2, Desert falcon, Centipede, Ghostbusters, Crystal castles & Q-bert

      @jordanphilipperris@jordanphilipperris Жыл бұрын
  • This might be the best video that I have seen on the internet. It's like a kid's television program but for adults who were kids in the 80's. Makes me feel so good.

    @CrowMacnas@CrowMacnas Жыл бұрын
    • It's got a little bit of Bits & Bytes energy.

      @bitwize@bitwize Жыл бұрын
  • You reminded me of my first computer, which I got in 1992. It ran MS-Dos, and had QBASIC as a programming language. It came equipped with a Braille display since I am born blind, and since Snake is a text-based game, I used to let the snake go one character at a time, pressed "p" to pause the game and continue its course when I could feel the distance between it and the number it had to eat. And that was challenging because my PC's Braille display only showed 40 characters and one line at a time. That was before audio games came around and I could hear my position on the board and my goals' position. I had fun! Thanks for the video!

    @supermalavox@supermalavox Жыл бұрын
    • This is a fascinating look into older disability nerd culture, ty. How would you say games are nowadays considering blindness?

      @mihaelandnate1@mihaelandnate1 Жыл бұрын
    • @@mihaelandnate1, screen readers have evolved a lot, allowing us to play some text-based games like the old - but still fun - Colossal Cave Adventure and hear a good narration, virtual assistants also help us play voice-based games and even the video game industry provides some degree of accessibility, like spoken menu options, stereo positioning, normally silent items that can make noises to indicate how far we are from them, etc. Lots of work still needs to be done, but it is certainly much better than when I had to rhythmically play NES' Punch Out! and memorize moves! Thanks for asking!

      @supermalavox@supermalavox Жыл бұрын
    • @@supermalavox this is good to know! sorry I did not reply sooner, as I suffered from acute sinus infection that sent me to the hospital. The reason I asked is because a friend of mine is going blind, and his comfort game is skyrim, with mods enabled for easier godmode. He sits less than a foot in front of his 60 inch TV, and despite having difficulty seeing, I am impressed that his ability to locate enemies is spot on. If you wouldn't mind, do you know of any PS4 games that are exciting, let you kill things, and feature stereo positioning, or maybe even allow for interaction not based on vision?

      @mihaelandnate1@mihaelandnate1 Жыл бұрын
    • @@mihaelandnate1, I hope your health is getting better now. I have not played games for a while, especially the newer ones. However, if I am not mistaken, "The Last of Us 2" had some accessibility features for blind people. But surely stereo positioning is found in a lot of games. Even Metal Gear Solid for PS1 had that feature and the player could use it to locate Liquid Snake's helicopter by hearing its sound!

      @supermalavox@supermalavox Жыл бұрын
    • ooh great. I am also blind and didn't know that msdos supported braille.

      @denizsincar29@denizsincar2911 ай бұрын
  • Really enjoyed the video (and that intro was just incredible)! I had a lot of fun trying to code my own version afterwards, although the line number thing really made me appreciate how good we have it these days. Will submit my attempt to the passenger showcase :)

    @SebastianLague@SebastianLague Жыл бұрын
    • Thanks for the kind feedback! So glad you tried it out!

      @TheCodingTrain@TheCodingTrain Жыл бұрын
    • I would love to see the result aswell!

      @ahmetemiruludag@ahmetemiruludag Жыл бұрын
    • Hey hey! You are very much an inspiration. God bless you for the work you put out.

      @andtechie5210@andtechie5210 Жыл бұрын
    • Don't get any ideas Sebastian! I wanna see that part 2 of neural networks, not how you rendered a whole open world in AppleSoft BASIC 😂

      @pedrohpf1990@pedrohpf1990 Жыл бұрын
    • Sebastian when I saw your coding adventure I realized that you and Daniel has a lot in common. And Glad to know that you are also fan of Daniel. You both are blessing to coding community.

      @himanshudas9042@himanshudas9042 Жыл бұрын
  • what I love about your channel is that most of the other coding youtubers only talk about efficiency, jobs, why this or that language sucks because it's 0.0000003ms slower running a very specific thing and so on. Your videos really remind me how coding can be fun

    @hidoryy@hidoryy Жыл бұрын
    • To me, limited technology is almost more fun. Trying to figure out how to do something with a constraint is more fulfilling than being overwhelmed by the oceans of libraries.

      @matttondr9282@matttondr9282 Жыл бұрын
    • @@matttondr9282 That's a good point. People often state video games were better in those days because the constraints meant you couldn't rely on processing power to overwhelm you with graphics and suchlike, so you actually had to make an enjoyable game.

      @archvaldor@archvaldor Жыл бұрын
    • @@archvaldor totally! Look up how much space the original mario bros took up. You'll be astonished.

      @nathanjohnson9715@nathanjohnson9715 Жыл бұрын
    • @@nathanjohnson9715 LOL I'm actually old enough to remember the 1k memory limit of a ZX81 one of the the first home computers sold commercially. The Mario Bros stuff looked like really advanced technology to me when it came along:)

      @archvaldor@archvaldor Жыл бұрын
    • @@matttondr9282 scarcity of resources is always a terrific catalyst for new and good ideas on how to use those resources very efficiently for exciting things. 😉

      @Semeyaza@Semeyaza Жыл бұрын
  • I think learning to code on something like this is great. Gives you a solid base and forces you to think about details we don’t even realize these days due to abstractions and frameworks.

    @pjf7044@pjf7044 Жыл бұрын
    • I taught myself how to program using the TI-83+ and had no idea I was even doing BASIC until years later. I had no one to teach me, only the manual. Managed to make Tic Tac Toe eventually. Had an AI player as well. I eventually became a desktop tech, took on learning Powershell to automate tasks. Then I became a web developer... I miss the days where I could make something without running into a ton of configuration headaches.

      @lastraven3017@lastraven30177 ай бұрын
  • The year is 1984 and I'm in my grade four classroom. The school had provided our class with a Commodore 64 and I watched a friend writing lines of code in Commodore Basic during recess (yes, we were those kids). I instantly fell in love with the notion of solving the worlds problems with code and the best parts of my day are still doing essentially the exact same thing that we did in that classroom so (SO) long ago. LOVE this video and would happily binge watch a series on Apple Basic.

    @leftfishjet4029@leftfishjet4029 Жыл бұрын
    • The problem i had as a kid was no-one said you can make money with code. They were just trying to sell games. No-one said i could basically hack any bank with a phone line because that would have peaked my interest.

      @yousuck6222@yousuck6222 Жыл бұрын
    • 1984 was the year of the Macintosh (well, 1983).

      @miblish5168@miblish51688 ай бұрын
  • That video brought so many memories. High school, 1987, we had one lesson of informatics a week. It was the first time I touched a computer. Archaic Polish Meritum, 32KB memory, 64x128 monitor pixels, programs loaded via even more archaic cassette recorders. As lessons were facultative, nobody cared much and most pals just played the snake. I was rather curious though and bought a Z80 processor programming textbook, just published. I learned the demands in machine code and started coding. It was easy! The first program I wrote was an improved version of the snake - ca. 800 commands + a short initial program in Basic. I remember how long it took me to type those 800 numbers without errors. But the result was fantastic. Pure satisfaction. You could accelerate the snake's movement from one side to the other by keeping the button pressed and slow down immediately by releasing it. Eating different signs gave different results. I even added some sound and visual effects. And the speed! Had to put a 1000x loop just to make it run slow enough to be playable. I was thinking about studying informatics but came to the conclusion that it would be boring as a life-long work. Missed opportunity, from today's perspective. I went humanistic and the next time I touched a computer was years later when I had to type up my MA thesis. On a borrowed comp. DOS, Windows, floppy disks, Microsoft Word! At first I had no idea how to get to a new line in Word and had to call my friend, who said "this big button, Enter". :D Have never coded again. Maybe I'll come back to it some day. But writing in machine code on a 8-bit processor was so much fun. I felt like a magician.

    @grawl69@grawl69 Жыл бұрын
    • Great story. I never got access to learning machine code as a kid, which was a great frustration to me.

      @pedroteran5885@pedroteran5885 Жыл бұрын
    • this story made me laugh hahah

      @devindepina7660@devindepina7660 Жыл бұрын
    • Yeah you’re gonna code again. Very soon. For fun!

      @chromosundrift@chromosundrift Жыл бұрын
    • Omg, you really should jump in again! C was introduced in 1978 and it’s still overwhelmingly popular today. There’s a crazy depth to it now but it’s still fun, and the manual “The C Programming Language” by Kernighan and Ritchie who made the language is incredibly well written and gets you up to speed quickly. Im younger and never really looked up what the state of computer science and technology was in Poland over the years but I’ve always wondered, so thank you for sharing and shining a light on it. Trzymam kciuki :D

      @CPSPD@CPSPD10 ай бұрын
  • In the mid 70's we got our first computer as my dad was programmer. I was immediately enthralled with it and soon learned to program. This game was the first program I wrote. It was on a Radio Shack TRS-80. I graduated HS in 1980, college in 1983 and in 1982 I started my 35+ year career in IT. Thanks for this video. I've been looking for an old PC just so I could do what you are doing!

    @wrkey@wrkey Жыл бұрын
    • Amstrad CPC464 or preferably CPC6128 (disk) which can run CP/M. Amstrad seems to be the pinnacle of 8bit, they learnt the lessons from all the rest.

      @joefish6091@joefish6091 Жыл бұрын
    • I don't know about Radio Shack TRS-80, but there is an Atari 800 emulator out there (you have to find the bios file separately, the dev indents you to rip if from your own atari but it's online found via google) it boots straight to a basic prompt and has a save/load function for your basic programs. I still rough draft ideas in basic before moving on to C when the emulator get's to slow to execute my code.

      @stickfigure31@stickfigure31 Жыл бұрын
    • Ah. The good old TRS80 (nick named it trash 80 as a kid :D ) A fellow student had one of those and I had my Commodore 16 or maybe Commodore 64 a bit later. I've never owned a TRS 80 but have owned atari 2600, commodore 16, commodore vic20, a few Commodore 64's, commodore 128, about 9 Commodore Amiga 500's, a few Commodore Amiga 600's, Amiga 1200, 2 Amiga 2000's, 1 apple IIe, 1 intellivision , a few PC's and even 3 Playstation 2's. Of course I've also had 3 laptops as well (still have 2 of them) plus my gaming PC

      @Exposingscammers@Exposingscammers Жыл бұрын
  • About ten years ago, my brother was studying for his PhD and a company in the UK offered to pay for a significant chunk of it if he spent the summers working for them as a coder. The company in question was a supercomputing firm and had a large legacy FORTRAN codebase. My brother's job was to convert from the legacy version of FORTRAN into a newer version and to optimise the code - 77 to 2008 (I believe). It just so happens that our Grandfather used FORTRAN in his job back in the 70s and my brother would call him for tips and tricks at least once a week. It made me laugh...

    @mediocrefunkybeat@mediocrefunkybeat10 ай бұрын
  • You captured the excitement of learning your first coding language 👌 Love the debug montage btw

    @thephoenixsystem6765@thephoenixsystem6765 Жыл бұрын
    • Montage was 🔥🔥

      @mattstevenson1334@mattstevenson1334 Жыл бұрын
  • Please do more coding challenges on vintage hardware, maybe even make it it's own series! Everything about this is perfect, from the way it's edited to your wardrobe. Your best format so far

    @matanzohar6783@matanzohar6783 Жыл бұрын
    • Yes!!! Would love to see some C64 or ZX Spectrum stuff!

      @flflflflflfl@flflflflflfl Жыл бұрын
    • Mat Zo? 😮

      @_crys_@_crys_ Жыл бұрын
    • A TurboPascal challenge!

      @johnwilliams3075@johnwilliams3075 Жыл бұрын
  • Nice...this was the programming language where I started my journey as a programmer back in the 90' in elementary school...I remembered everything

    @real2nick@real2nick Жыл бұрын
  • This is awesome! Took me STRAIGHT back to my TRS-80 Model I programming days from grade school to junior high school in the 1980s! ❤ (Today, I'm a senior software engineer specializing in C++/C, F#, and C# at a major corporation, coding SDKs and services for other programmers worldwide.) Such an immensely exciting period of discovery and growth. What a time to be alive! When he started talking about switching program flow to another function, I said out loud, "Here comes GOSUB," LOL! And I *KNEW* that he would use line number 1000, classic!

    @MiloDC@MiloDC8 ай бұрын
    • I was exactly the same, shouting GOSUB 1000! I started coding at school in 1979, so at 14, I worked on a RM 380Z programing CESIL and BASIC. I always remember the power I felt, when I coded my first program and it appeared on the old black and white valve televison! Fantastic. Now, I am a senior embedded software engineer, but started my coding career as a games programmer. in the 80s. Thoses were amazing times and I worked with some amazing people. I feel very lucky being very old! :-)

      @NeilBeresford@NeilBeresford7 ай бұрын
  • So good!

    @PracticalEngineeringChannel@PracticalEngineeringChannel Жыл бұрын
    • Thank you Grady!

      @TheCodingTrain@TheCodingTrain Жыл бұрын
    • Hey Pratical Enginnering, I watch your videos every day and love all of them :D

      @palamz7027@palamz7027 Жыл бұрын
    • Hey, an "Engineering like it's 1981" video would be cool too!

      @oskrm@oskrm Жыл бұрын
    • hi

      @JohnPaulBuce@JohnPaulBuce Жыл бұрын
    • fancy seeing you here

      @torphedo6286@torphedo6286 Жыл бұрын
  • This makes me appriciate modern IDE and text editors so much more than I previously was.

    @AleksanderFimreite@AleksanderFimreite Жыл бұрын
    • True! But i remember on the C64 i could do a List and then arrow up to a line and make changes, then hit Enter.

      @johnhopkins849@johnhopkins849 Жыл бұрын
    • I found arduino`s easy after learning BASIC in the 80`s. It`s like being a big kid again.

      @damianbutterworth2434@damianbutterworth2434 Жыл бұрын
    • @@johnhopkins849 You can also do that on the Apple 2. Originally ESC A was right ESC B left ESC C down and ESC D up. You were pressing ESC a lot. The Apple ][+ ROM made it better where ESC once enabled the cursor mode and I J K M moves it. Saves a lot of typing.

      @joe--cool@joe--cool Жыл бұрын
  • I bought a Sinclair ZX81 with 16k RAM expansion in 1981 when I was in high school. I wrote my own Snake game on it and loved playing it, I got the idea from a snake game I saw on a TRS-80 that the school owned.

    @Noycey64@Noycey64 Жыл бұрын
    • I wrote a snake game for the TRS-80 that I sold through the Radio Shack Software Catalog. Maybe that one :-) I wrote it in a hybrid of basic and machine code. The Machine code was to overcome the obvious performance limitations. My parents wouldn't buy assembler so I wrote it in machine code completely manually. Wish I still had the code to look at but my dad said that computers where a fad and sold the whole thing out from under me and wanted me to not learn any more computer stuff. He said it was a waste of time so I did and took 20 years before I returned to the profession after missing some of the best years.

      @JSYoutuber2@JSYoutuber2 Жыл бұрын
    • @@JSKZheadr2 wow. i wrote the game snake in 1982 or 1983. maybe i was inspired by you. i cant remember what inspired me though. I continued with programming, but went from vic 20, 4k memory, to a Kaypro II CP/M system, business computer. so i learned databases and spreadsheets, it did not have built-in graphics. I sometimes also wonder what would have happened if I got a Commodore 64 or Amiga, and really got into graphics. If we would have only known then, what we know now.

      @mikkirefur@mikkirefur Жыл бұрын
    • @@mikkirefur I created a dBase database for managing a local baseball league as a internship in college on a system with CP/M in the 80's. Don't remember if it was a Kaypro II or something else.

      @lifeinbitsmedia7681@lifeinbitsmedia7681 Жыл бұрын
    • @Life in Bits Media I created a dice (random6) game for a fantasy baseball game my friend created. He loved stats and would roll through whole games and seasons. I used his logic (walk, xo, 1b,2b,3b,hr,etc) and kicked out games in seconds. I look back at all these early programs (print invoices for dads friend company, moving company software) and realize I had million dollar business starting so early. Well, here's to crypto, ai, web3, and promoting integrity

      @mikkirefur@mikkirefur Жыл бұрын
    • @@mikkirefur I did similar things like create a program to track golf scores for my Dad's golf group, printing out baseball game score cards for my brother who liked to score baseball games while watching them, though those efforts were a little later in the IBM PC days. And they said home PCs what never sell because people would have no use for them. The one thing I did in that time period that I was most proud of was create a solitaire game. That took a while.

      @lifeinbitsmedia7681@lifeinbitsmedia7681 Жыл бұрын
  • I think the slowdown is from shuffling the snake segments through the arrays as you move. You could speed it up dramatically by using something like head and tail pointers into the array. Then instead of N operations for an N segment snake, you only have 2 for any length >=2. Draw the new head and delete the old tail.

    @alexmcd378@alexmcd378 Жыл бұрын
  • I haven't coded anything in 15 years, but watching someone nerd out over something they love is seriously infectious. Easy sub!

    @notjux@notjux Жыл бұрын
    • Yeah i can relate

      @jonathandyer6385@jonathandyer63852 ай бұрын
  • Tip 1; Don't print the whole snake on each loop. New position gets the "S" and first position get a space. Tip 2; Use the screen memory for collision detection, rather than looping though the X and Y arrays. Same for border. Print a border all around, and a single check to see collision (if same character for snake and border). Tip 3; As someone pointed out, Read and Write pointers on a fixed array is far more efficient as the snake grows larger, and won't slow down the game speed as it grows. Tip 4; Forget "snake" and do multiplayer "tron" instead. Tip 5; Multi player; Keyboard not liking multikey presses then leads to some other input device, or use a separate computer connected with cables.

    @niclash@niclash Жыл бұрын
    • Ahhhhhh such good tips!!

      @TheCodingTrain@TheCodingTrain Жыл бұрын
    • @@TheCodingTrain Well, wrote (with a friend) ~80 games in a year or so, on PET2001. Most of them in Basic, and figured out every trick to go a little bit faster, use the 7168 bytes (+1024 bytes of screen RAM of which 24 bytes weren't visible) as efficiently as possible. Those were the days...

      @niclash@niclash Жыл бұрын
    • @@niclash i envy you so much. Wish i was a teenager at that time when the tech was budding

      @bavidlynx3409@bavidlynx3409 Жыл бұрын
    • @@bavidlynx3409 There is always "budding tech", but few people has the mind set to dig into such. 3D printing, federated social media, nano technology, IoT, the maker community, open source architecture, and so on. We were a total of 5 on the school who were interested, out of 1100. Most of the others hanged out with friends, played cards or sports... I.e. the easy path, the equivalent of "computer games" and "Facebook" in the last decade or so.

      @niclash@niclash Жыл бұрын
    • Here we go, was looking for those hints 1 to 3 - which instantly came to my mind as I grew up in the 80s with PET, 4032, C64.

      @-Jakob-@-Jakob- Жыл бұрын
  • Well in 1982 coding on the Commodore VIC-20 was pretty simple, even in machine code, thanks to excellent books and magazine articles and a user interface superior to the $4000 IBM PC :)

    @madcommodore@madcommodore Жыл бұрын
    • The Commodore fullscreen interface/editor was the definition of elegance, but hunting down the handful of relevant books and tips in magazines was very pedestrian!

      @Breakfast_of_Champions@Breakfast_of_Champions Жыл бұрын
    • @@Breakfast_of_Champions I had the VIC-20 programmer's ref guide plus Commodore User UK magazine had lots of programming tutorials. Finding this info again now is tricky without the magazines, took me months to find out how to do a full screen reverse scroll in BASIC again so I could write a car game with the sprite on the bottom of the screen. Sad but loads of information for little hacks like that are very difficult to find in the age of the internet.

      @madcommodore@madcommodore Жыл бұрын
  • That was incredible, you made me feel like a little kid in front of my Commodore 64 (the BASIC was very similar to the one you used here). I still remember the Baloon coding example in the C=64 manual... those were the days

    @tecnoworldsgamingchannel5341@tecnoworldsgamingchannel5341 Жыл бұрын
  • If you ask me, Daniel Shiffman is the most important person on youtube. I basically own my current career within IT thanks to Shiffmans inspirational videos. I started following and recreating his projects many years ago in Processing 3 and have sticked around ever since. Thank you Daniel!

    @masterstroggo@masterstroggo Жыл бұрын
    • Thank you for your kind comment!

      @TheCodingTrain@TheCodingTrain Жыл бұрын
    • @@TheCodingTrain now we have a video upload of what coding had looked like in the analogue days, comparison to what is in the digital era.

      @byronrobbins8834@byronrobbins8834 Жыл бұрын
    • @@byronrobbins8834 What? That was very much the digital era. Analog computers were something else entirely; totally alien even compared to this. :)

      @eekee6034@eekee6034 Жыл бұрын
  • Man the camera angles reminds me of those old creative TV shows really love 'em. Please keep on coming

    @heyyou4686@heyyou4686 Жыл бұрын
  • This is so cool!! I'd absolutely LOVE to see more of this old-time coding content!!

    @Luis0n7i@Luis0n7i Жыл бұрын
  • What a blast from the past - I started coding on an Apple II myself around 1983. I had that same Beagle Bros poster too! :)

    @MattReidy@MattReidy Жыл бұрын
    • Yep. I took a course in school around 1982 where we learned Basic on a Apple II Europlus (6 Apples, 1 floppy drive for all of them). At the end I've coded a tennis game for 2 players using the graphics mode. That mixed graphics / text mode really made debugging easy. Keyboard input from 2 players didn't really work well, but I still have fond memories of the Apple II.

      @stvj@stvj3 ай бұрын
  • I would love to see this as a series. I just love code writen with technical constrains

    @juliusbecker8451@juliusbecker8451 Жыл бұрын
    • oh yes, that would be amazing!

      @williamist@williamist Жыл бұрын
    • Same

      @WindowsDrawer@WindowsDrawer Жыл бұрын
  • I used to write programs in basic in 80's when I was a kid. So similar to this but different. You brought me back 40 years when I was doing this. Thanks so much fun and remembering old tricks.

    @YugoZex@YugoZex Жыл бұрын
    • How was it different?

      @DielsonSales@DielsonSales Жыл бұрын
    • @@DielsonSales It's different in some details. With small adjustments it can be used on different computer with basic. First difference is number of characters on screen (lines and columns), second is number of pixels, third basic vary from basic to basic. This basic is 90% similar to Sinclair ZX spectrum but there are differences how you write the line.

      @YugoZex@YugoZex Жыл бұрын
    • @@YugoZex Was a lot fast typing in the code on the Spectrum when you got used to all the keywords. Still got my ZXSpectrum.

      @damianbutterworth2434@damianbutterworth2434 Жыл бұрын
  • I love how I was always been taught that BASIC is an easy programming language for beginners, and here I am, realizing that it's basically syntactic sugar for Assembly.

    @loupax@loupax Жыл бұрын
    • Easy to get started, but it can take years to really perfect an approach to it. You can go with something similar to what he uses in the video or with a little more modern basic that can make some pretty powerful programs depending on your style of programing. That's part of what makes BASIC so fun is you can do what ever you want with it, just depends on how much effort you want to put forth.

      @dudenoway1267@dudenoway1267 Жыл бұрын
    • yeah, basic is a great way to start learning assembly.

      @QuizmasterLaw@QuizmasterLaw Жыл бұрын
    • I mean a lot of languages are just syntactic sugar like kotlin, Go, Assembly itself is a syntactic sugar for binary.

      @Vexxel256@Vexxel256 Жыл бұрын
    • @Stephen Porter Chris Sawyer is his name. you do well to show him the respect he deserves

      @C.K.MillerPoet_Extraordinaire@C.K.MillerPoet_Extraordinaire Жыл бұрын
    • @Stephen Porter that was a huge part of the games commercial success as well. Being written in assembly made it very small and fast. Could run on basically any computer of the era.

      @moxxy3565@moxxy3565 Жыл бұрын
  • When I was kid in the mid 80s my dad got a big book with the code for a couple of different games. It was a project we would work on together sometimes. We'd take turns one would read it out loud and the other would type it. We ended up with a semi-functioning game that we were always tinkering with and trying to modify with our own ideas and trying weird stuff with the code. I learned a lot from it and we had good bonding time.

    @firstnamelastname2552@firstnamelastname2552 Жыл бұрын
  • Watching this brought back many happy childhood memories of typing out game programs that used to be printed in magazines back in those days on my Sinclair ZX Spectrum 48K. Myself and dad used to take it in turns of one typing while the other read out the code. I still remember some of the terms we used to use for speaking some of the special characters. A colon was read out as two dots whereas a semi-colon was a dot and a comma. I used to rip the programming sections from those magazines and but them in folders to type out at a later date. Wish I’d kept them.

    @IcelandCastleford@IcelandCastleford Жыл бұрын
  • I’m bringing an Apple 2 to my next coding interview - for flex purposes exclusively.

    @Mutual_Information@Mutual_Information Жыл бұрын
    • I don't think an Apple 2 will flex very much before it breaks.

      @david203@david203 Жыл бұрын
  • Character 13 is carriage return - or, simply said, the "Enter" key you have pressed when executing the program. Anyway, this is a great video. I´m enjoying it a lot!

    @upir_upir@upir_upir Жыл бұрын
    • The "RETURN" key on an Apple IIe ;)

      @error.418@error.418 Жыл бұрын
  • Your enthusiasm about coding in BASIC on a system 40 years old is infectious. It makes me remember the time I - as a 10 year old - wrote a BASIC program on an MSX-1 system that would function as a catalog program for my dad's vinyl collection. Took me days to complete, but it was worth it. I never had any experience with Apple computers though. My first system was a MSX-1 and I learned BASIC on it. Some years later I moved on to a regular IBM 386 system and worked with QuickBASIC. Eventually I started coding in PHP & JavaScript and build my own web-applications.

    @deenamiq.@deenamiq. Жыл бұрын
    • Those were the days, I remember them well!

      @pyhead9916@pyhead99166 ай бұрын
  • Qbasic was my first language and I did goto also. I remember a computer coming into the class in the 80s and everyone was so excited. We were allowed to play the snake game on it. Then we let it count for the day to see how high it could get.

    @KennTollens@KennTollens Жыл бұрын
  • This brings back memories! BTW, you don't need to switch off and then back on the Apple to stop your running program - just hit control-C (which I see you use later on in the video!).

    @johnman8673@johnman8673 Жыл бұрын
  • I love old hardware. I have this old graphic LCD, a raspberry pi, and a mechanical keyboard that I was gonna turn into a digital typewriter to take to coffee shops, but maybe I should make it so it can also run some kind of basic so I can make little games for it.

    @DylanMatthewTurner@DylanMatthewTurner Жыл бұрын
    • If you do please share!!

      @TheCodingTrain@TheCodingTrain Жыл бұрын
    • Implementing a programming language is called systems programming, and I did it for 40 years. It can be done and it's lots of fun.

      @david203@david203 Жыл бұрын
    • For some reason i feel so wrong about using powerful modern hardware to simulate old weak hardware... Raspberry Pi is a real modern computer, it can run modern linux, it can do tasks like speech and image recognition, it can run high-resolution graphics... definitely an overkill for digital typewriter. If i were you I'd rather buy real old system on ebay, restore and use it for fun, or recreated one with microcontrollers or something of comparable resource capacity.

      @voidseeker4394@voidseeker4394 Жыл бұрын
    • @@voidseeker4394 Why would I buy something else when I already have like 10 raspberry PIs lol?

      @DylanMatthewTurner@DylanMatthewTurner Жыл бұрын
  • Oh the joys of Apple line code... 'goto' takes me back to writing my own programs in high school - the simplicity , the ease, the joy. I aced that class.

    @shawn4990@shawn49906 ай бұрын
  • This was such a fun video! Your enthusiasm for programming is so enthralling, it really comes through.

    @Melarancida@Melarancida Жыл бұрын
  • I'm 1 year into my career as a software developer and I always wonder what it was like coding back in the day. Thank you! By the way I love your enthusiasm!

    @ImDissonance@ImDissonance Жыл бұрын
    • This is why I made this video, yay!

      @TheCodingTrain@TheCodingTrain Жыл бұрын
    • I had to punch cards and do the same thing this guy is doing, except had to wait on the program to be compiled, put into a que , then wait for it to run,, the horrors! I hated CS classes, had to learn all the dead languages, FORTRAN, SAS, and COBOL.

      @mikewalker1081@mikewalker1081 Жыл бұрын
  • This is so nostalgic! Reminds me of my very first coding attempts in GW BASIC on MS DOS in 1988! Thanks for sharing the warmth, Daniel!

    @Amr-Ibrahim-AI@Amr-Ibrahim-AI Жыл бұрын
    • @ghost mall Yes! Same here :) I had been trying to simulate buttons on text mode, too :)

      @Amr-Ibrahim-AI@Amr-Ibrahim-AI Жыл бұрын
  • Oh my god that intro get up really does make him look like some bedroom programmer who just got out of the late 1970s with his wire glasses and beard, absolutely brilliant

    @inkmime@inkmime Жыл бұрын
  • So nice to see how quickly it boots up

    @wristocrat@wristocrat Жыл бұрын
  • Wow. I'm taking C++ classes at my college, and I've become pretty familiar with how to code basic things, but in the style of a modern programmer. Seeing just how coding works on something just a bit more primitive is actually so amazing to see. Something as simple as a computer dedicated to making programs and drawing things is really neat and I want to see you do more things like it. I actually really interested in reading up on the manual to see all the sorts of cool stuff these computers can do. Thank you for sharing both your computer and your programming expertise :)

    @rinka4560@rinka4560 Жыл бұрын
    • It may look like a computer dedicated to programming and drawing stuff but actually, some of the most popular uses of this computer were playing games (there were thousands of them), connecting to bulletin boards (which were sort of like sites on the internet, without the internet part) and there was even productivity apps like VisiCalc and WordPerfect. You could also expand the computer with other cpu's and memory cards and run programs like dBase. dBase, as its name implies, had a pretty sophisticated database system built into it, but it was also an incredibly powerful general purpose programming language. I wrote a program in dBase (released in '83) that emulated what google does today, but there was no internet to speak of back then so it just indexed your local machine, but it did allow you to host the resulting index online for dialup access and searching using the TBBS bulletin board system.

      @marksmith2738@marksmith2738 Жыл бұрын
  • I was a very young coder in this era. You totally caught all of the nuances of coding during this time. I loved watching every minute of it!

    @WilliamLeeSims@WilliamLeeSims Жыл бұрын
  • 5 years ago you got me interested in coding and now I’m a teachers assistant and a computer science major 👌

    @erlking9910@erlking99109 ай бұрын
  • This guy is an amazing human being. I feel like a kid again in the 80s-90s when I was incredibly obsessed with my first computers.

    @hockeyguy9974@hockeyguy9974 Жыл бұрын
  • My favorite character, hands down, is this.dot! Can’t wait to see their story arc this season! You’re awesome, Dan!!!

    @rdear@rdear Жыл бұрын
  • Super insightful video, the last key pressed at 8:08 was ASCII 13 = CR (Carriage return) which is the return/enter key on apple. Fun fact the Carriage return is named like that because of mechanical typewriters (the steel lever to return the carriage is named the same way) 😆

    @lobsangbarriga5324@lobsangbarriga5324 Жыл бұрын
    • I have always thought that Apple got it right by using the carriage return as the new line character. After all, the carriage return lever on manual typewriters not only moved the carriage so that the next key typed would be at the left edge of the paper, but it also advanced the paper up by one line. Unix used the line feed character as the new line character and Microsoft could not decide, so it used both.

      @TheGuyThatEveryoneIgnores@TheGuyThatEveryoneIgnores Жыл бұрын
    • @@TheGuyThatEveryoneIgnores And we've been dealing with that decision ever since :) Computer Science in the early 80s, we pretty much memorized the ASCII chart. My machine then was the 16K Tandy Color Computer.

      @danbailey9591@danbailey9591 Жыл бұрын
  • Nice, this reminds me of my C64 times, the BASIC there was pretty similar from what I remember. I did program Snake, but some time later, for DOS in x86 assembly, that was fun, too :)

    @kallek5655@kallek5655 Жыл бұрын
  • When you showed the PEEK and POKE keywords, I lost my mind. Man, back then I actually USED these keywords on the Apple IIe! had completely forgotten about these. What a trip to memory lane (Just realized I'm getting old). Thank you for that!

    @JacquesZahar@JacquesZahar2 ай бұрын
  • This is really cool, I made a snake game almost exactly like this on a graphing calculator in a basic-like language. It's so fun to deal with the constraints of the hardware - initially it was O(n) and visually slowed down as the snake grew before I switched to a ring buffer structure. Very fun!

    @AbelShields@AbelShields Жыл бұрын
    • Yeah, i also made snake for my graphing calculator! Good times. Though I only ever added on on the front and didn't move the end of the snake. my snake was infinitely long, and the goal was to make it through predrawn mazes without hitting the wall

      @Ludix147@Ludix147 Жыл бұрын
  • I actually once did this in the late 80s while I was chronologically on an Atari ST already, when we had Apple IIe in school in computer science lessons (yes, back then already it was a school subject). I did reuse my 6502 knowledge from C64 programming and the snake mainly was implementing a stack (well, or a queue. I used two indexes on a memory array. You could literally do this in your array implementation, too, which removes the need to shift array elements). I added levels with barriers as I knew from one snake clone game on the ST and the computer science teacher told me his son actually enjoyed playing this.

    @OlafDoschke@OlafDoschke Жыл бұрын
    • Thank you for sharing this story! (And great tip too!)

      @TheCodingTrain@TheCodingTrain Жыл бұрын
    • @@TheCodingTrain Also thank you for reminding me of these times back in school. I don't know by how much the two index queue accelerates the snake, it I guess it gives a bit headroom for turning up the difficulty level.

      @OlafDoschke@OlafDoschke Жыл бұрын
  • Bro, I just want to let you know you are my favorite coding channel and I LOVE your personality and the work you put into your video's. I appreciate it.

    @RolandRegus974@RolandRegus974 Жыл бұрын
  • i did my A Level in computer science on a BBC model B using BASIC. The nostalgia is strong ( and my first computer was a Spectrum 48k also with BASIC or if you were super clever machine code on Z80 Zilog. would love you to take us on a trip down amnesia avenue. Do you remember using overflows to make self modifying code?

    @artful1967@artful1967 Жыл бұрын
  • I remember trying to analyze a BASIC tic-tac-toe game where the original coder had not left enough space between line numbers to add statements. So, every inserted line required a GOTO to the inserted code somewhere else, and another GOTO back to the main program. There were hundreds of these, making it impossible to sort out how it worked.

    @snaplash@snaplash Жыл бұрын
    • This was known as spaghetti code.

      @TheGuyThatEveryoneIgnores@TheGuyThatEveryoneIgnores Жыл бұрын
    • no gosub?

      @noimnotarobotcanubeleiveit7024@noimnotarobotcanubeleiveit7024 Жыл бұрын
    • Spaghetti code FTW. I need to find another old listing and try to doctor it up into a modern language...

      @darkphoenix68@darkphoenix68 Жыл бұрын
    • Lol, this is why writing the code out in a notebook was common at the professional level. They even made BASIC specific notebooks with layouts that supported specific boxes for line numbers, etc. and cheatsheets at the beginning or end of the notebook. Planning out your code was an important step, and still is today just in a slightly different way.

      @error.418@error.418 Жыл бұрын
    • @@darkphoenix68 I once used spaghetti code to modify the Notepad.exe file on Windows XP. I was tired of the default tab size being eight spaces, so I modified the machine code to jump to some unused part of the file. There I added machine code to send a message to the edit control to set the tab size to four spaces. I then had to replicate the machine code I overwrote with my jump instruction and then jump back to the address after my first jump instruction. The Jump machine code instruction is basically the same as a GOTO instruction in BASIC.

      @TheGuyThatEveryoneIgnores@TheGuyThatEveryoneIgnores Жыл бұрын
  • I learned coding with a "game" called Basic on a toy laptop when I was seven or eight years old. Didn't even know what "programming" was but I thought it was a fun game! Nostalgia hardcore here.

    @thebeardedgnome766@thebeardedgnome766 Жыл бұрын
    • MEEE TOOO!!!! :)

      @Lenore4Evermore@Lenore4Evermore Жыл бұрын
  • Snake is one of my first coding experience in 82. I was 11 years old. I spend 4 month in the Summer on my fresh new zx spectrum learning basic and some z80 assambler borrowing books in the public library. Audio cassette for saving file and 48KB of memory. Was so fun. PS: No , i am not a genius I just have a father that star teaching me binary calculation and algebra at 4 and problem solving at 6, coding at 11 was just normal for me and a way to make my father proud of me.

    @blender_wiki@blender_wiki Жыл бұрын
  • 40 years ago I was on my second and favourite computer of all time, the Acorn BBC micro. The BASIC had structured constructs and I believe only had line numbers at the BBC's request. The BASIC also had a built in assembler which I think was unique at the time. I only had the user guide which covered part of the OS and BASIC and the advanced user guide which had more OS, assembler and all the hardware. The machine also came with a copy of the circuit diagram!

    @trickysoft@trickysoft Жыл бұрын
    • We grew up learning how to program and then how to build a PC. No tablets or Google :)

      @GG-qo4qo@GG-qo4qo Жыл бұрын
  • OMG!!! This is the most fun I've had in years! Takes me right back to 1981 and having to learn to operate the Apple IIe for the company I worked for. Gosub was always my favorite too. Thank you sooooo much for this!

    @BountifulOne2024@BountifulOne2024 Жыл бұрын
    • The Apple //e was released in 1983.

      @TheGuyThatEveryoneIgnores@TheGuyThatEveryoneIgnores Жыл бұрын
  • This brings back memories. I didn't own an Apple, but when I was a kid our family got a Coleco Vision system, and a few years later I was very lucky to come in contact with a full-fledged PC with DOS. I tried my hand at several Basic programs, and had lots of fun (but I never got to a full-fledged understanding of all I needed). I recall that I attempted to create a chess board in Basic, which was kind of cool for the time, but very difficult to program and maintain (the graphic resources for Basic are quite limited).

    @xnick_uy@xnick_uy Жыл бұрын
    • I started out on a Coleco ADAM as well. They had their flaws but were actually cool systems. I still have a couple of them.

      @1robhook@1robhook Жыл бұрын
  • This brings back so many memories. Love it!! I used to take code examples from the old 3-2-1 Contact magazine and program them onto different machines, making changes to compensate for variations of BASIC. From there I would make my own games, birthday cards, etc. It was such a great way to learn how to program.

    @bereanracer@bereanracer11 ай бұрын
  • I had an original Apple II back in the 70s and wrote a similar game, only the snake was a Tron light cycle and it supported 2 players on the same keyboard. Fun times.

    @stevenranck5478@stevenranck5478 Жыл бұрын
  • I wish I could have watched this in the late 80s when I was a little kid reading the BASIC books in the library and programming on my parents Apple IIe. Brought back a lot of good memories.

    @thefroable@thefroable Жыл бұрын
  • I remember when I was in 4th grade in the 80s, our class got an Apple II. We were allowed to program it, so my friend and I programmed Breakout on it. It took us about a thousand lines of code, and it worked. IIRC, we even had a second level (we didn't have time for more levels). And not to be outdone, I decided it needed some music, so I programmed the Raiders of the Lost Ark theme which was really popular at the time. Looking back, I am amazed that two 9 year olds were able to do that without any prior experience or knowledge. We just sort of figured it out on our own because our teacher was no help. And it didn't take us that long either seeing it was just sort of a project we managed to do during class. My adult mind would probably balk at the task paralyzed by the obstacles it would envision. My kid mind didn't care and just got it done, and everyone in our class wanted to play it.

    @ddognine@ddognine Жыл бұрын
    • @ghost mall One way might be to adjust the angle based on the speed and direction of the paddle when the ball hits it. And if IIRC in breakout you could reverse the direction of the ball (send it back from where it came).

      @atlantic_love@atlantic_love Жыл бұрын
    • i want that childlike curiosity and motivation back, it's been a while.

      @gasun1274@gasun1274 Жыл бұрын
    • @@atlantic_love yes 4th grade stuff

      @aspol12@aspol12 Жыл бұрын
    • @@aspol12 Are you making fun of OP?

      @atlantic_love@atlantic_love Жыл бұрын
    • This was me on the TI-84 calculator with TI-BASIC and using the link cable to share it with everyone since that calculator was a class requirement.

      @error.418@error.418 Жыл бұрын
  • I learned BASIC on a 48K Oric-1 and this code is so like that code. Wonderful to see it happening and seeing retro code in a live demo. Thanks for this. I'm definitely going to subscribe to this as it was very relaxing watching the video. Almost like the watching Bob Ross of the coding world.

    @ShanesQueenSite@ShanesQueenSite Жыл бұрын
  • I've been doing ComputerCraft Lua for 8 years and I feel like this video gave me insight I don't think I had before. ComputerCraft is a modification for Minecraft that adds programmable computers and robots to the game, and it works very similar to the computer you used in this video, but obviously with a more modern language and hardware, and programs can be edited in files with any text editor or ide including the one built into the mod. I often recommend lua as a first language because of how easy it is to learn compared to other languages. The Basic language you showed here gave me similar vibes. Very good, insightful video!

    @RaiuTheEevee@RaiuTheEevee Жыл бұрын
  • (commodore 64 connected to an old TV) . . brings back memories: "spagetti programming", data storage on cassette and later a very expensive floppy drive, trying to be tough by learning assembler and later a very clumsy and expensive Pascal compiler, long discussions with Atari and ZX80 programmers (Apple was only at school - too expensive). Still ... it was way more than I learned at school and I still have the benefits of basic knowledge (pixels, hex numbers - binary calculations, etc.). Nice history college, thanks !

    @bennybrouwer@bennybrouwer Жыл бұрын
  • Oh my goodness, the nostalgia hurts so good. Cheesy intro check! Retro computing check! Synthwave music and graphics check! And one heck of a shirt check! Love it! Daniel, since you are going down this path would love to see some content on coding for a fantasy console such as Pico-8 or Tic-80!!

    @deckarep@deckarep Жыл бұрын
  • This was a really enlightening video. I ended up understanding the code well enough that I was able to port it to Commodore BASIC for the C64. This meant replacing the HTAB and VTAB statements with POKE. So placing the food becomes: 2020 poke 1024+fx+40*fy,6

    @PeanutNore@PeanutNore Жыл бұрын
  • Finally, someone who doesn't just talk about BASIC, but actually programs on it, and shows the step-by-step. 😊

    @elpaco9587@elpaco9587Ай бұрын
  • Very cool episode. Would be cool to see some assembly too!

    @slendi9623@slendi9623 Жыл бұрын
    • Some years ago I also programmed snake for fun on the original gameboy in assembly (however while using a modern computer to do so)

      @christianh2581@christianh2581 Жыл бұрын
  • 13 is the [return] key. If you want to speed up your program use "%" after all of your variables that don't need to have a decimal. By default applesoft treated all unspecified variable types as floating point variables. Using the % after a variable makes it an integer (16 bit) variable.

    @pocoapoco2@pocoapoco2 Жыл бұрын
    • Numbers in Apple's FP BASIC (Floating Point BASIC) were stored as character strings. Converting the character string numbers to binary numbers, as the BASIC program ran, was very, very slow. I wrote a simple BASIC compiler that only understood the hi-res instructions (HGR, HGR2, HCOLOR=, HPLOT, and TO) and hard-coded coordinates. My compiler did the work of converting the character string coordinates to binary numbers and then generated machine code to call the same ROM routines used by the hi-res instructions. A program written in BASIC literally ran a hundred times as fast once it was compiled. Most of the BASIC program's execution time was the number conversions, not the line drawing.

      @TheGuyThatEveryoneIgnores@TheGuyThatEveryoneIgnores Жыл бұрын
  • I was there, I started coding at 18 programming in Basic language with a TK-90, a ZX Spectrum computer like. It was an inexpensive and easy-to-use computer, a small box connected to a TV monitor and everything is ready to go.

    @acjazz01@acjazz01 Жыл бұрын
  • Flashbacks of doing the exact same thing through the middle of the night on my TI99 back in '82.

    @jeffweber8244@jeffweber8244 Жыл бұрын
  • One of the greatest creators. Brining wisedom, fun, and smiles while coding. Love all your videos! :) and you did a great nostalgic feeling for the one of us from the c64 generation :D

    @chrizzzly_hh@chrizzzly_hh Жыл бұрын
  • Wow... I hadn't watched a video of yours since back when I was learning JS a few years ago, but this truly reminded why I loved watching you so much back then. You're so entertaining Mr. Shiffy.

    @keemkorn@keemkorn Жыл бұрын
  • The mere sound of that keyboard gives me some serious childhood nostalgia~

    @erikhendrickson59@erikhendrickson59 Жыл бұрын
  • Totally love this. It brings back memories of creating crazy games with my friends in high school. I’d love to see more of these!

    @TomMcComb@TomMcComb Жыл бұрын
  • I sent this to my dad. He always tells the story of how he coded a full featured Monopoly game in BASIC, with over 10k lines of code. But unfortunately his program was too big and he ran out of memory, so he scrapped the project. He said this video brought back lots of good memories.

    @smileychess@smileychess Жыл бұрын
  • Ahhhh, I had a nostalgia rush there, although for me it was with the ZX Spectrum. But I honestly think this was almost exactly the same! You're a madman, but eminently watchable. We need more people like you in this world :)

    @widearchshark3981@widearchshark3981 Жыл бұрын
    • Must have been awful programming on a rubber keyboard..

      @deang5622@deang5622 Жыл бұрын
    • @@deang5622 You know, you got used to it. One thing about the Spectrum was that each key would be a shortcut for a function. So pressing "H" for instance, and the Spectrum typed "GOSUB" for you. The biggest problem I think was that BASIC was pretty rubbish (and I include AppleSoft BASIC as well), even back then. If you wanted proper games you really had to use Assembly. But because you only had 48K, and the expectation of graphics was MUCH MUCH lower, it was pretty incredible what you could create. You should never have asked... I could go on all day ! It was a sea change over the ZX81 I had. Don't even ask about that "keyboard" !!

      @widearchshark3981@widearchshark3981 Жыл бұрын
    • @@widearchshark3981 Yes, BASIC was pretty much useless when it came to writing video games that could run in real-time. I never had an assembler back in the day, so I thought in assembly and typed in hexadecimal (machine code). However, BASIC was useful for figuring out some things. I once wrote a 3D maze program in BASIC that animated ten frames to advance one space in the maze and eighteen frames to turn left or right. My BASIC program took about two and a half minutes to draw one frame! Once I had fully debugged it though, I manually converted the program to machine language which made it run a thousand times as fast.

      @TheGuyThatEveryoneIgnores@TheGuyThatEveryoneIgnores Жыл бұрын
  • You just brought back a lot of memories. I was always curious what that screen meant

    @zzzsleeper-_-3653@zzzsleeper-_-36532 ай бұрын
  • 15:25 I'm glad that I'm not the only one who has these moments while programming.

    @brannocktaylor6740@brannocktaylor67403 күн бұрын
  • This could be made much more performant by treating the position arrays as ring buffers and advancing head and tail positions. Then you only need to draw and erase one character per step. It will run at constant speed no matter how long the snake is. More in-depth Apple II knowledge will help when it comes time for collision detection. It is possible to read the screen memory directly, which will save a lot of time compared to iterating over the length of the snake, allowing it to run in constant time. Because the text screen and low resolution graphics share the same memory, the graphics function SCRN() will do the trick.

    @xotmatrix@xotmatrix Жыл бұрын
    • ooooh, this is such amazing info! Thank you for the comments and feedback!

      @TheCodingTrain@TheCodingTrain Жыл бұрын
    • Really, you just need the start and the end of the snake, for each frame clear the end and move the start in correct direction. Since you just check if the head is written on a byte that contains a space or food, when hitting food you just dont delete the end until the food is consumed.

      @Trashbd@Trashbd Жыл бұрын
    • @@Trashbd this is such a good point! I'm not sure how I missed this! That said, for the expanded version where I check if you've lost the game I use the array to check all the existing positions of the body. Maybe there's a clever trick around that too?

      @TheCodingTrain@TheCodingTrain Жыл бұрын
    • @@TheCodingTrain When you draw your next position you just need to check if the position you draw it at already have a drawn body, if it is food or if it is empty space. This breaks down to a really simple gameloop. that possibly could be made in like ten to twenty lines of readable code.

      @Trashbd@Trashbd Жыл бұрын
    • The point is that when the head have entered a legal portion of the screen it becomes a part of the body in the next iteration and all you have to focus on is the ends of the snake.

      @Trashbd@Trashbd Жыл бұрын
  • The thought process and iterration is the star of the show. Great content!

    @JanWestin@JanWestin Жыл бұрын
  • A long long time ago (c1980) in a universe far away (UEA Village) I sat next to Jeff Minter at computer club one lunchtime while he coded a version of "Burning babies" for the Commodore Pet. The shell of the program was in Basic, but he was already coding directly in assembly for all the little subroutines and his approach was very similar to this i.e. suck it and see. Thanks, brought back some interesting memories.

    @joh22293@joh22293 Жыл бұрын
  • So much nostalgy. So happy I found this video. Thank you!

    @yoniziv@yoniziv Жыл бұрын
  • I love everything you do man, I feel at home watching your videos. It's been 6 years now programming profesionally, my LinkedIn says Im senior software developer now. You always make me go back to the joy of the beginnings of learning programming.

    @emalorenzo2415@emalorenzo2415 Жыл бұрын
  • You are a legend, so well done - beautiful! Thank you!

    @salvadorian3288@salvadorian3288 Жыл бұрын
  • This just took me back to elementary school in the 80s. I had a vague memory of doing all of this and now it has all come flooding back. Thank you!

    @bunmonk1903@bunmonk190325 күн бұрын
  • As a fan of retro tech and retro video games, I love that you're so aware of 4:3 ratio that you notably transition from it back to wide screen after the intro. Very refreshing after seeing so many "lets' plays" of DOS games being played stretched into WIDESCREEN!! >:(

    @Domarius64@Domarius64 Жыл бұрын
  • I first learned Applesoft Basic roughly 40 years ago in December 1982. I still can code it.

    @BarackBananabama@BarackBananabama Жыл бұрын
  • Well, I wasn't expecting that. What a pleasant and nostalgia-filled surprise. Very good video. I got into computers and programming in the 80s on a PC XT with GW-BASIC (like Amr Ibrahim), not really knowing what I was doing. It spawned a passion that I still have today... and a career as a programmer.

    @CedLePingouin@CedLePingouin Жыл бұрын
  • Thank you. Thank you for reminding me that everyone started somewhere, even forty years ago. I’m learning Swift and I what I realized is that it is lifelong journey, even at 50.

    @JoeDoe1@JoeDoe1 Жыл бұрын
  • I absolutely love your enthusiasm. My programming professor has a little bit which actually helps a lot but yours is top notch and I enjoyed every second of this video and learned something new.

    @nick1512@nick15126 ай бұрын
KZhead