Apple ][ Coding Challenge: Fractal Tree
Вставка
- Опубліковано 16 тра 2024
- Take a trip back in time and let's learn all about GR (graphics) and HGR (high resolution graphics) in AppleSoft BASIC on a restored Apple II+ computer! Can we render a fractal tree? Code: thecodingtrain.com/challenges...
🚀 Watch this video ad-free on Nebula nebula.tv/videos/codingtrain-...
🎥 Previous video: • What was Coding like 4...
🎥 All videos: • Coding Challenges
References:
🧠 What is Code?: nebula.tv/what-is-code
🎶 Coding Together: / coding-together
Related Videos:
🎥 AppleSoft Basic Snake Game: thecodingtrain.com/challenges...
🎥 The Bouncing Ball: thecodingtrain.com/tracks/cod...
🎥 Polar Coordinates: thecodingtrain.com/tracks/the...
AppleSoft BASIC:
🍎 The AppleSoft Tutorial: cini.classiccmp.org/pdf/Apple/...
🍎 Basic Programming Reference Manual: mirrors.apple2.org.za/Apple%2...
🪧 Peeks, Pokes and Pointers: archive.org/details/peeks-pok...
🔢 Renumber: www.callapple.org/programming...
Apple II Emulators:
☕ Applesoft BASIC in JavaScript: www.calormen.com/jsbasic/
🍎 Apple IIjs: www.scullinsteel.com/apple2/
🍎 MicroM8: paleotronic.com/software/micr...
Timestamps:
0:00 Hello from 1981!
0:16 Coding Together Theme
1:10 Getting started
1:30 Graphics Mode (GR)
1:56 Apple II+ Screen Capture
2:08 Plotting Points and Lines
3:33 Bouncing Ball
13:01 Adding Sound
14:39 High Resolution Graphics (HGR)
17:43 Fractal Tree
18:10 Trigonometry Explanation
20:05 Coding the Tree
23:12 Explaining Recursion
33:00 Adding User Input
34:52 Share your version!
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
🚂 Website: thecodingtrain.com/
👾 Share Your Creation! thecodingtrain.com/guides/pas...
🚩 Suggest Topics: github.com/CodingTrain/Sugges...
💡 GitHub: github.com/CodingTrain
💬 Discord: / discord
💖 Membership: ua-cam.com/users/thecodingtrainjoin
🛒 Store: standard.tv/codingtrain
🖋️ 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...
#fractal #1980s #appleii #bouncingball #basic
There's an extended version (with a few more minutes about COLOR and HCOLOR) on Nebula! nebula.tv/videos/codingtrain-coding-challenge-174-fractal-tree-on-apple-ii
psshey what is drought
among
I asked no painkillers
Can you ask @ImbaMarinesto unblock me? I got blocked iny sleep.
me
I'm a big fan of this new series. I like the commitment you have to the style of the era, even with the silly intro and a theme song. Something about you programming in this reduced environment is very relaxing. I always try to use the least complicated tool for a task and this feels just perfect. Thank you for making these videos.
Totally agree. I'm not big on processing or P5, but this series has me completely fascinated. There's something very relaxing about it, definitely.
Maybe this is the programming equivalent of manual machining videos, compared to CNC?😁
I love this series too!
Thank you I really appreciate this feedback!
Totally share the feelings. As a kid I started to make silly programs in a friend's house who owned an Apple IIe and these videos about programming in the apple IIe makes me travel to those times.
The intro is just ❤😍 but I am an eighties fan
Cheer from France
They should honestly make a retrospective movie about your life. You're the Bob Ross of programming, my guy. 💕
Happy little trees as well
Happy little fractal trees!
YES! That’s a great description of this guy. Bob Ross of programming. I learn so much and feel better about life on earth at the same time.
Exactly. Man, if he can have this kind of fun today, I can only imagine the wonders he must have witnessed with his apple when he was twelve. Funny thing, my 1st home pc was a 286, and I was very bad at coding then, and the only thing I could imagine to do was pixels with random colors all over the screen. These first examples of him put me a bit on TBT mode... lol...
Despite his infectious enthusiasm, the whole video does have a cool, calming, almost hypnotic effect, The video flew by too fast, I'm watching it again. Taking notes this time around.
I literally watched this in between college classes and I’m just so happy that I can watch a coding video as pure entertainment. Please keep this series going!!!
I literally watched this too! With my eyes!!!
Apologies for some of the comments on this thread, they have been removed. Thank you for watching!!
Wholesome and educating entertainment!
I have been struggling with bouts of depression as of recently and I just wanted to say that your videos are one of the only things that actually make me feel happy. Seeing you work through algorithms on this old outdated computer and seeming so happy whilst doing it genuinely makes me feel so good for some reason. It's taking something that I have a lot of interest in, that being programming, and making it purely entertaining instead of making it to be a sort of monotonous chore. Thank you for putting so much effort into these videos.
When I was a kid in the '80s I "invented" push and pop by using a string as a stack and pushing numbers on by converting integers between 0 and 255 to characters using CHR$. I think that was before I learned machine code and learned about stacks. I probably didn't even realize they were the same thing.
I really miss being able to just turn the computer on and start plotting pixels. The stuff you have to do on any modern OS and programming language to just plot a pixel is ridiculous. Installing some kind of framework like Processing or SDL2 is usually the easy way and is not always easy and never as satisfying as doing it natively.
I wish there were more capable versions of the renderers that processing provides. Getting a triangle, or even a pixel with something like openGL with plain code (meaning not as easy as "pixel(40,60)" is just garbage. It's either starting easy with processing or directly getting into vulkan, shaders and whatnot. No small step up...
I'd love to see a 3D Renderer for an Apple 2. I did one for an ESP32 Microcontroller and it was so much fun!
thats cool, how does that work? I wasnt aware the esp32 could do graphics
@@mikejones-vd3fg I'm just using an adafruit library to some draw triangles on a oled screen.
Not a renderer, but back then I loved GraForth!
@@robertsyrnicki5638 ahhh cool yeah i forgot they can drive LED's really nicely , been watching Dave's Garage and he's done some cool stuff with esp32's and led's, i thought maybe you made some kind of gpu out of the esp32 or something like for another micro controller to use. I think the esp32 is fast enough on its own, my 25mhz 486 computer from way back could run doom, im sure a 240mhz dual core esp32 could do it but i hear the limits is the ram, not big enough for a screen buffer
@@smanzoli shudders in RedPower 2 FORTH
LOVE THIS!! Brings back 9th grade memories. HGR!! Parents bought an Apple ][ + a year later and my "career" started...
the intro song, the aspect ratio, the colour grading … pure perfection
The variable name length used by Apple Basic is 2 characters. You can use longer, but "10 STARTX=5; STARTY=10;Print STARTX" will print "5" as the actual variable name in applesoft is "ST"
Also, what's this whiteboard thing, That's some weird futuristic magic. That should be a blackboard and chalk.
renumber was a BeagleBros tool.
I think you meant, "10 STARTX=5: STARTY=10:Print STARTX" will print "10".
I left a similar comment before reading yours.
I think we can all accept his use of a witchcraft whiteboard! I never liked blackboards, their noise just sends shivers down my spine.
It's so much fun to see you having so much fun with this thing. I love the little Ziggy (from Quantum Leap) moments from Future Dan. Also, I think a double buffering video would be pretty interesting indeed.
I'm glad you point out mistakes for the people that are somehow following along, so they don't have to fix it by the time you realize it in the video
Stick with basic! This is great. I haven't been so excited about a series in a long time.
Daniel - this is so cool! There are people out there that are still teaching kids how to code using BASIC and computers from the 80s. Your videos are very good for that. All the best with you Apple II nebula series as well! ;-)
I am puzzled about the reason why someone would teach a kid that 😵
@@eBrunoro 8 bit computers are very friendly for coders. There is nothing to install, they have a simplified language with a simple graphics API. There are also tons of type-in programs. ... and there is also nostalgia. However - I think the best method to introduce kids to coding is by using a simplified online platform... (I have my preferences here).
@@eBrunoro because the machine is 'instant on". You flip the power switch and it's there ready for your input. And coding is not confined to some programming language, it is more the kind of thinking required to break down tasks into managable steps until the computer understands it. Although I must say 'unlearning' all the unsavoury habits BASIC put into my brain was really one of the harder tasks 😉
I was thinking all this time: "whay does it look so familiar?" Then it came to me: I used to have an Agat - USSR clone of Apple II and I used to learn coding on it when I was in school...
I love this new style of videos keep it up!
This actually looks like fun. The overall tone and snobbery on coding forums, all this "the right way to do stuff", actually prevented me from getting into coding multiple times. The same thing happened with music. Then i found youtubers (like this one) that make it actually fun to learn things.
Yeah as a beginner one should just code however one likes, keeping track of software architecture can come way later, at first it should just be fun
I no joke loooooove these videos. There's something crazy about how intuitive and usable coding in BASIC is that makes these so fun to watch! Hope to see more!
A basic 3D-ish renderer in apple basic sounds way to cool to just ignore!
I remember typing in a Mandelbrot plotting program listing from a copy of Incider magazine and letting it run all day while I was at school. It still hadn't finished by the time I got back home. Regarding renumbering; the DOS 3.3 Master disk came with a Renumber program that would load a renumbering utility into memory. It utilized the so-called "ampersand hook" in that you invoked it by typing '&' at the prompt and pressing RETURN. By default it would renumber all lines in the program so they start at 10 and increment by 10.
I can't express how I enjoy your 80s-retro-series, this is totally awesome!
I grew up with the C64 of my dad and I have a special sentiment to this decades computers.. thank you very much!
I was never interested in BASIC until I watched this series. And I also love the fact that you have so much joy while coding. It makes me feel at home to see other people enjoy it as well!
i expected it to be boring, but the peek made me laugh with nostalgia. The second part of video is where the story begins ;)
I've recently been binging a bunch of your coding challenge videos and these recent apple II+ videos have been great!
I would also like to mention that the genuine fascination and happiness you convey in your videos have brightened my days, during some recent tough times, thank you for doing so much for the coding community. You are like the Bob Ross of programming! 🚂
This is truly so entertaining to watch! The theme song at the beginning and the whole setting just gives such a good vibe.
I'd love to see more of this 🤩
I am loving this series, and I would love to see more!
Holy cow, I love your energy! I was so excited every time you got something working and threw your arms out in joy.
back in 1989 my mother was 14 and actually helped pay for her education by learning Basic on an Apple ][ and then teaching at schools, showed her this video and she loved the fact people still enjoyed the wonders of the past. thanks for the videos!
I absolutely love the style of these videos, they're really fun to watch and teach you a lot without you even realizing. Keep it up!
genuinely loving this series, incredible work man!
Love your enthusiasm, it is contagious. I was a little burnt out while learning to code and this really helped. I hope one day have this much passion about programming and life in general. Keep up the good work!
Thank you for making these, sincerely. The Apple IIc was my first computer, BASIC my first language, and this fills me with such warm nostalgia.
GOTO statements. Those sweet monochrome graphics. The simple joy of coding something and seeing it happen.
We're so lucky to be able to do this for a living
i'm not sure what he's better at: math, coding, or keeping the viewer interested in the process. TOTALLY subscribing, love the video, love the attitude, love everything. keep it up!
This is such a throwback to the past. I honestly prefer this to modern graphic apis! Thank you so much for this!
What a brilliant feel good channel. Takes me back to my childhood days on my Atari 800XL.
What a great series! I really feel like I am experiencing the same wonder and joy that my parent's generation must have enjoyed when this was all brand new. Keep it up!
This is by far the best thing I’ve accidentally stumbled upon.
I took coding classes in late middle and high school. None got hem matched this guys absolutely adorable energy. He’s funny, smart, and extremely relatable. I laughed so many times while watching your video and really want to try coding in basic.
Keep doing what you’re doing, you’re inspiring the young generation. :)
Thanks for this video. I appreciate seeing you struggle through this. Because I tend to program on my own, I never get to see how others do it, or see what they don't know.
You've actually got so quality stuff on your channel. Keep that up man!
aaah yesss. the Bob Ross of programming. Thanks for all your content, it's really enjoyable and inspiring.
All of the effort you put into that intro was sooooooooo worth it :) Hilariously entertaining. Keep up the good work. Love your videos
its really beneficial that your video includes making mistakes, figuring out where it went wrong, then fixing and explaining it. i dont think many newcomers realize that often times debugging takes far more time&effort than writing code to begin with. and that never, ever ends; no matter how good you get :)
This totally gave off retro/nostalgic vibes, reminding me of how fun it was to simply sit at the computer and figure out how to make the lines dance every which way in HGR mode. You've re-captured the excitement and sense of adventure in exploring the possibilities many of us experienced in our teens (give or take), and how satisfying it is to write code, and make it work. Thank you for this.
I don't know how I missed this the first time around, I see that I'm still subscribed and I check my subscriptions page every day. Especially considering that I love fractals. The interesting thing about this fractal tree is that you don't need an array, stack or recursion to draw it. You just need to keep track of the angle and count of the nodes. Then each level can be drawn left to right or right to left and it'll run faster on older hardware that way too. One of the more beautiful aspects of symmetric fractals, they're super easy to make efficient.
There you go, makin me smile. Love the intro. Love the energy. Awesome stuff!
You’re doing a great job to keep the beginnings of coding! ❤
I love this channel so much!
I got into programming by watching your videos and learning Processing alongside, and now I'm doing a master's in machine learning and robotics.
I love you, Dan!
His happiness and energy is contagious! ✨
So glad UA-cam recommended this and the previous AppleSoft BASIC video... absolutely fantastic. Thank you so much for making these; they've really revived my interest in programming! You're great at teaching and so genuinely enthusiastic-it's really a beautiful thing. Please continue.
i'm so glad to hear this!
This series is sooooo cool! I love it! Please make another one! Don‘t stop now! What about reading a graphics file from disk and display it in HGR? Or programming a simple racing game with horizontal lines, steering a car with a joystick?
I only recently discovered your channel. Love your enthusiasm and the effort you put into your videos. Cheers
These Apple II+ videos are super interesting and entertaining! I'd love to see you tackle 3D like you mentioned in the outro, it honestly sounds quite surreal to me!
This is the kind of joyful second to second programming that I think gets us all hooked initially. Really fun stuff to watch.
absolutely loving this low series, please keep it up. I'd love to see the 3D renderer!
i love these so much i actually saved this for my lunch break so I could watch it all in one go!
Man, this brings back SOO many memories.
Go on! I love this flashback of my youth!!!!!
I really LOVE your apple II+ videos! That very machine was the first computer I ever had. I learned programming on it. Also spent hours and hours playing Wizardry, Zork, and other games. Please make more! :)
Is such a joy watching you really enjoying coding. Congrats for your great vids!
Really loving these videos as it takes me back to when I was learning to code in the 80's on a TRS-80 CoCo 3 and looking at code written in another computers Basic and trying to replicate it on your own machine then wondering why certain syntaxes don't work the same.
This is a great series. It's cool to see that relatively primitive technology can actually do pretty advanced stuff.
I like that you keep your mistakes in rather than editing it out. Reminds people new to code and programming (like myself) that everyone makes mistakes
I do enjoy watching you work through the problem and update the code.
This is the first video of yours that I have seen. I really like your style and enthusiasm. Definitely more retro videos please. I would love to see you play around with forth on the Apple ][!
I love this! I started programming when I was 11 on a TRS-80 CoCo, at first in Microsoft BASIC, then supplemented with 6809 assembly for performance, eventually moving on to PC's with C and other languages. It turned into a career for me, and sometimes I long for these days when it was pure programming - no DLL or library hell, odd OS and driver bugs, connectivity issues, or weird bugs in one of the 30 packages you import.
very fun to watch what I learned back in high school. We (computer programing class) would try to make a video game with mini fractals with trees, and snow flakes. The game was of a skier and you had to miss the trees. The snow flakes were just for background. When we were able to use a color monitor we would put in a random color for the snow. The trees were always one color, but the skier would have different color clothes at first of the life. Its been over 30 years since then. Thanks for the walk down memory lane.
I love your enthusiasm! Too many programming related channels are monotone. I always learn something interesting in your videos. Also, the intro video for this series is amazing :)
These videos are great, I just recently picked up an apple //e and without any disk drives, and these videos let my try different things to do with it!
This is so extremely cool, please continue that series. Actually each of your previous Coding Challenges would be interesting to seen recreated 🙂 (even that lots of them probably would run really slow^^)
Really nice series, I would be super glad to see anything else on this topic, it's so fascinating.
I love how you always reach the point in wich you say "this does't work, we need an array". We all love arrays
Your enthusiasm for graphics programming on retro devices is infectious, and this brings back wonderful memories of writing similar programs for my Tandy TRS-80 Color Computer 2 when I was a kid. Thank you for this video, it was so much fun!
My first 3D programme was on my CoCo2. 21 lines making the shape of a jet plane. It ran at 1.5 frames per second.
@Ryan : those good old memories from 40++ years ago :-)
my first "computer" was the SR-52 from TI in 1975, and my first real computer in 1979 had a 6502 with hex keyboard, 8 digit 7-segment display, and 1.25 kb ram. a year later i got the apple ][+ (choice was between trs80, pet, and apple).
later we severely modded its hardware by soldering stacks of ram chips to its mainboard to increase it from 48kb to 4×48 kb, getting an additional 144kb (just enough for a ram-floppy disk of 140kb and 4kb of tricky driver software to do the bank switching; loading of new levels of one game reduced from two minutes every minute to only less than one second each time), and also replacing the character generator prom with another eprom and a ram so that we could load variable fonts, or separately access each single dot to do better graphics. a friend designed the hardware and i did the software (mostly not even in 6502 assembler, but directly in hex, lol). too bad that all this is not possible to do with any emulator :-(
btw: i also found that the sound generator (done with software in the apple rom) had a timing bug and replaced it with a new gosub to a short routine that i placed in some free bytes among dos :-) ... later, i extended this to playing two selectable notes at the same time by changing the ratio of on/off (using hystheresis of the transistors) on that original speaker (the simple toggling by peeking created that sound you heard in this video)
a year later we blew the power supply by pulling 5A from it while it could only deliver 4A (officially only 1A or 2A) ... which then got me the Atari 1040, while other people switched from pet/c64 to amiga ... the apple's corpse still is somewhere in my storage ...
Absolutely love this series. So fun.
Absolutely love your Basic programming series, I’ve got my Amstrad CPC 464 Plus out the attic to try it for myself!
That was all oddly satisfying. I love how enthusiastic you are!
I really love these serie on Apple II+, it's really awesome for me, a young programmer, to see how people used to code
I coded a Mandelbrot fractal on the Apple 2+ circa 1982 when I was a kid. I'd got a copy of Mandelbrot's book and spent quite a bit of time working out the mathematics - That's where I first found out what a complex number was. The program took 2 days to run. Many years later I'm designing cryptographic circuits for a semiconductor company. Maybe there's a connection there.
This content is on another level, love it. Great job dude, keep it up.
Ahh, so nice to watch this very simple yet powerful programming environment!
I love that you do stuff on the apple II. I just got one, this is going to be so much fun
I love that vintage 4:3 goodness!
With your videos my learning curve will shrink drastically. Thank you.
Holy moly. This is so cool. Millennial programmer here. Graphics are just too easy today 😄 this just seems like too much fun.
Seeing that fractal tree drawing out was incredible! What a little trigonometry and logic can do!
Just WOW.... No words to describe this, congratulations man!
Loving this series!
You are the prof that programing skill is not about Hi tech computers or hi level language, but about reasonning, patience, problem solving and efficient algorithms..good job.
PLEASE do more vids in this series. So so good
OMG Daniel! You've joined THE CLUB-welcome! That club? That would be anyone who's effortlessly melded two or more "worlds"- computer art with cinema in your case, as per the opening. Still, you have a seriously wonderful curiosity that you're pouring into these tutorials-kudos! ! !
Seeing recursion in basic blew my mind!
His teaching methods and enthusiasm really makes me wanna get an apple ii and just code for the fun of it.
It's not the same as the real thing but this emulator is pretty great! www.scullinsteel.com/apple2/
Exactly what I needed and was looking for! Thanks!!
Love the new series, I'm still coding with Commodore Basic because of your videos
I thought I'd poke in to say how much I'm really, really enjoying this series. As useful and informative current as the other videos are, I feel like there's a lot to be learned about the basics of computing from using BASIC or ASM on a limited system. No libraries or includes or additional bits to use, nothing else going on elsewhere to think about. It makes the ideas clear an immediate and easy to follow. I'm sure there are some frustrating elements like constantly re-writing most of a line. But something tells me you think more about a line of code the fourth time you have written it out.
I really want this series to continue, it would be really interesting to see how an assembly version of the same fractal tree program would run vrs the basic one on the same system.
Keep up the good work sir. It means a lot!
Keep em' comin' and thanks for all of the help!!
Stumbled in on a were youtube journey and subbed. Great vid. Looking forward to more
This brings memories back
The keyboard typing is so nice! Sound is majestic
Really enjoy watching this series!
with this series we now know you are not in the programming business. neither the empire business. you are in the coding-content-creation business. and you are doing it so well!