I suddendly felt the urge to buy a commodore and create a c64 game, i found this series, i discovered that it was never continued, i fell into depression. Now the C64 mini is out, PLEASE, GO ON WITH THIS SERIES
To save typing, you do not need to use "LET". You can also use the "?" instead of typing "PRINT", it will show up as "PRINT" when you list the program. You can also type "gO" (g = shift O) instead of "GOTO", it will show up as "GOTO" when listed. To list, you can type "L" plus shift "i". There were a lot of shortcuts for the C64 to save some typing. You could also insert cursor movements between the quotes for printing and it would move the cursor the way you want when it was printed. Good for placing text at specific location on screen. The C64 actually has some cursor locate commands built in, but you needed to call them in machine language or know the SYS address for it (which I have in some notes somewhere). There was actually a SYS call for clearing the screen if printing a clear didn't suit your tastes (SYS command called a machine language subroutine at the address specified). I had some good times programming that machine.
Great work, thank you. I spent more hours than I care to remember programming in BASIC, first on the Atari 400, then Commodore vic 20, then Commodore 64, then QBasic on the PC, finally AMOS on the Amiga 1200... I found some of my old cassette tapes the other day with "Word pro v2" on them for the Vic 20, which was my attempt to create a word processor on an unexpanded vic 20 in BASIC. All it did, really, was accept keyboard input at the cursor location, and F1 allowed a "save" of the whole screen to a specified flename on tape, while F3 allowed a loading of the whole screen. Even just cramming that into the tiny memory of the unexpanded vic in basic was a task, but i was proud of it. Now, I wouldn't have the foggiest idea how to do it, hahaha
"A better way is to step out onto the pitch and start playing", this is 100% true, I never would have learned to program if I didn't dive right into something way over my head and learn by necessity.
You're very natural at teaching and I think this will be of genuine use to people who want to code but feel intimidated by it. I used to enjoy making simple programs on my Speccy back in the 80s and QBasic on my DOS PC in the 90s and even had delusions of becoming a professional. I then hired a book on machine code from my local library and realised I was out of my depth! Nowadays I just stick to the occasional simple web app as HTML/Javascript as it's all my simple brain can understand.
I'm having a good time using the c64 maxi to write basic games again like I used to back in the 80's. I start with a very simple idea "swinging a golf club and seeing how far the ball goes". No graphics. Just 4 lines and eventually I expand it to hundreds of lines as I keep expanding the idea. I used to eventually add graphics but I don't really care these days. It's a fun diversion and one bug can so focus your mind that hours can go why without notice while you think yourself through the code trying to find it.
Wow, nice show... its been abot 20 years since i touched basic.... oh such memeories.... this videos removes abot first 100 pages of any manual and a lot of confusion for starters... oh if only i had tutor like that back in the days... great video, thank you very much for nostagic memories
4 ปีที่แล้ว +1
C64 blue screen reminds me of my childhood. I was 8 when my parents bought me one. That blue screen caused alot of tears but also joy.
You brought back so many good memories from the "How 2" intro. That was a great TV show. That's where I first learnt about non-Newtonian fluids where Craig cut the stream of pouring liquid. Awesome.
Getting happy flashbacks to programming in BASIC on my VIC-20, when I was something like 6 or 7 years old. I was a little computer geek, and I loved every minute of it!
BlackburnBigdragon I find JVM to be a good modern equivalent to learning basic on c64 because with JVM you can make complex programing from layers of simple code which the Linux kernel builds into complex program for you and you can go back and edit the program in its original stage of being a collection of simple codes vs something a c++ program where you must built the nativity into a complex program which makes the difference of 5 minutes vs 2 hours to find the code were you forgotten a symbol.
Excellent - I just got myself an old C64 (bread bin type) from Ebay, so I'm trying to relearn all my basic knowledge. Looking forward to seeing more of your videos :)
Oh man, this was really awesome! Thanks! I learned a lot about what programming was like on early systems. This video was a little beginner for me so I can't wait for further more advanced episodes. I'm very interested in how graphics like sprites and draw commands were created and handled on these systems.
You could have added this line to the beginning of the program : 15 X = RND(-TI) that would initialize the random number generator and then you won't have the same sequence every time you reboot
Another way to generating integers without the INT keyword: 10 X% = RND(0) * 10 20 PRINT X% The % sign tells the interpreter to expect a signed 16 bit number, so has a range of -32768 to +32767, so it will automatically round it to an integer (I think it rounds down)
My biggest achievement in C64 basic was a Cross-stitch pattern maker program for my wife. It was mostly done in basic, but with ML routines to manipulate the multi-color mode. Many, many hours of hard work!
I'm guessing when you started this you didn't realize how much work it would be. But I hope it's still on your list of things to revisit, because it's a great idea!
I rember there was a "guess my number" program in the Commodore 64 User's Manual. It would give you some hints too, such as "my number is lower" or "my number is higher". I remember I was quite enthusiast of this program when I first typed it in (I was 9 or 10). There were also a dice throwing simulator and a maze generator, both using random numbers. For example, this one line program will draw a maze: 10 print chr$(205.5+rnd(1));: goto 10
For the listing in your description, instead of "*Insert Clear Screen Character*" you could also write chr$(147). Does the same thing, just looks a bit nicer on paper.
Thanks ! I got one last year and I've been planning on coding a video game since 1988... Been a programmer since 2003 put the project of my own game on the back burner and now i the time. But I've never coded basic : COBOL, C, , C++, java, js, xthml, etc...
I was such a soft kid whenever we'd visit WHSmith in the 80s all I'd write is 10 Print "Hello" 20 Goto 10 Everyone else wrote swear words. It never even crossed my mind to do that :)
I love programming I found a coding game on the Nintendo DSI and 3DS called Petit Computer and SmileBASIC they both use Basic and are a blast to make programs and games on. My 1st game was a chose your own path text game mixed with a maze-like dungeon my 2ed game was a slot machine game, I spent weeks working on the animation not using sprits just symbols. I would spend hours just adding code and would find my self looking at 400 new lines of code thinking how did I add all this with no programming experience. lol
At this point it's fair to say you do have programming experience... If you tried to get into modern programming, especially comething high-level and simple like phyton, you would probably find it very easy and entertaining. Phyton does have some similarities to Basic, and it's often used as a learning ground for new programmers, but it's still an incredibly powerfull language. If you wanted, you could build an entire game engine and game worth of the best productions with it, but of course there are better and more efficient ways of doing so by using C++/C# or Java.
I used to code a lot (Basic and Assembly language) on the C64 back in the days. Now, almost 30 years later, I'm back at it, because I decided to write a Basic V2 interpreter in Java. It's shocking how man quirks this language actually has that I either forgot or never knew about back then. I hope that your tutorial programs will be limited to text output for some time, so that I can use them as test cases for my interpreter...
I haven't messed around with BASIC as a programming language. More used to C++, though I would like to go backwards and learn more for the old PCs. I have attempted 6502 Assembly with a Commodore 64 Emulator. Would use my real C64 but my tv fell on it and its no longer functioning. Man is assembly rough. I have got as far as understanding the algorithm to multiply binary numbers using the carry bit. Due to time constraints in my life, I just haven't got any farther with it.
Before this video the only thing I could do in basic was: 10 print "Hello World!" 20 go to 10 run I tried writing this program on N-88 basic for the NEC PC-88 computer and well, it kinda worked! I could guess numbers and stuff, but some of the code (like clearing the screen and restarting the game after I got a number wrong) didn't work because the PC-88 and the C64 have some different functions, and well, I don't really know what are the PC-88 equivalents to them... But still, I think I've learned a thing or two about basic from this video!
Most of the "games" I programmed using the RND function were for pen and paper RPGs and table top games like battletech where I would tell the computer all the variables for a particular task such as how many hexes the target was away, the type of weapon being fired and how fast the target was moving and it would tell me if the shot hit and how much damage it did. which saved time I would of spent rolling a dice and looking up the various tables and such and made the game run much smoother.
Nice, it's pretty straightforward. I wonder how would you program graphics... the 8-bit guy said it's not so convenient. What were the most popular programs/games programmed in BASIC?
I remember having a few simple games made in basic. i dont think any real games ever were coded in basic since it is very slow compared to assembly code. I did small graphics (Sprites) by drawing them on paper and calculating their values by hand. (Binary to decimal). The DATA command was then used in basic. Ah those memories.
That was super helpful. Thanks. I just spent some time looking for part 2 because I just bought original Commodore 64 and want to learn to code in basic. Now I know of assembly and not sure where to start. I suppose the guide that came in the box is a good start. But after that...?
Here is a better one that rolls TWO dice. 5 PRINT "CLR-HOME" 10 X = INT(RND(1)*6)+1:Y=INT(RND(1)*6)+1:Z=X+Y:REM ROLLS TWO DICE, GENERATING RANDOM NUMBERS BETWEEN 1 AND 6 FOR EACH AND ADDS THEM. 20 PRINT "THE COMPUTER HAS ROLLED THE DICE. CAN YOU GUESS THE TOTAL (BETWEEN 2 AND 12)?" 30 INPUT G. IF G < 2 OR G > 12 THEN PRINT "YOUR GUESS MUST LIE BETWEEN 2 AND 12": GOTO 30:REM REJECTS OUT-OF-RANGE GUESSES IMMEDIATELY 40 IF G Z THEN PRINT "SORRY, YOU GUESSED WRONG." 50 IF G = Z THEN PRINT "WELL DONE!" 60 PRINT "DO YOU WANT TO TRY AGAIN (Y/N)?" 70 GET G$:IF G$="" THEN GOTO 70:REM RETRIES EMPTY KEY BUFFER 80 IF G$="Y" THEN GOTO 20:IF G$="N" THEN GOTO 90 85 GOTO 70:REM REJECTS ANY ANSWER EXCEPT Y OR N 90 PRINT "OK, SEE YOU AGAIN SOON.":END
One thing I don't get is why the text just splits when you go to the next line halfway through a word, I think my obsessive compulsive is coming out. Great idea for a series though will be dusting off my c64 for this!!!
there is a version of BASIC i remember on C64 that conformed to the PRINT CLS function instead of the heart symbol , it so long ago i can't remember which one
POKE 211,X : POKE 214,Y : SYS 58732 - this will set the cursor at the location specified. SYS 58692 - same as the CLR/HOME, clears the screen. POKE 775,200 - disable LIST POKE 775,167 - enable LIST
The Commodore 128 had IF/THEN/ELSE. BASIC V 7.0 If they would have made a Commodore 256, it would have had IF/THEN/MAYBE: 10 X=INT(RND(1)*100)+1 20 IF X>50 THEN GOTO 30 MAYBE 40 OR EVEN 50ish 30 GOTO BED
I have a few memories of programming on a C64 (my friend had one). I don't think we ever got much past printing characters to the screen, trying to make text art! it wasn't until many years later I started using Turbo Basic and it all came back to me
Eh, how am I supposed to type the "clear screen" symbol if I'm trying to do this on the VICE emulator, where I assume my Windows keyboard doesn't have such a button? I just spent whoever long typing out all that stuff above only to notice you weren't telling me to literally type "*Insert Clear Screen Character*". :-o
is there a way to save your program to a cartridge? I know there are some places that make new circuit boards and sell the components and cases needed. I would love to make my own even if just for my own sake.
I am using an Emulator, how do I get the clear screen symbol there? emulating on retropie with raspberry pi and a german (qwertz) layout, though retropie or the emulator is configured for US
Hi, I would like to ask a question: I'm doing some sprites for the C64 using Spritepad, and want to give my sprites to a programmer to implement them in the code. In the options I can chose between .prg .bin and .spd also when I chose .prg, the program is asking me to put a number (maybe I have to put a different number for every sprite I create)?....thank you!
Is it possible to run 2 instructions at once? Like if i want the screen to flash colors but at the same time constantly wait for an ENTER press to reset the colors back to default
i am just getting a 64 running, someone else already had a crack at it (was missing half the dram chips) recapped and new ram all around. ran your first program and got same results random decimal. also new to basic of any kind other then 20 years ago on a windows machine. if the random result is between zero and zero point nine recurring, why does it randomly post a result above zero? this seems like a glitch or a memory overflow problem, or not strict enough parameters for this code/command, again im really new just trying to learn.
how do you clear it so fast what is the hot key I was testing it and then i tried to go back to my code and i had to retype it all over again it said something about go from start i think
the "?REDO FROM START" thing is just to tell you that you've input an invalid value during an INPUT prompt (When the question mark appears and you have to type in something) To clear the screen, press SHIFT and the button with the diagonal arrow pointing north-west
If you need a couple of cool songs like these in your videos, you can check out Suduaya - Come Back to Life album, I think you might like the songs "Snow and Stars" and "Patience" ... I hope you like them.
WHAT KIND OF EMULATOR DO U USE? THANK TOU SO MUCH READY. More seriously: Vice is a great one, for a lot of Commodore computers.: vice-emu.sourceforge.io/
This is probably such a common question, but how does one break out of the program? I'm learning basic just for shits, I actually kind of despise programming. But it's fun to fool around with old languages to me for some reason.
I suddendly felt the urge to buy a commodore and create a c64 game, i found this series, i discovered that it was never continued, i fell into depression. Now the C64 mini is out, PLEASE, GO ON WITH THIS SERIES
To save typing, you do not need to use "LET". You can also use the "?" instead of typing "PRINT", it will show up as "PRINT" when you list the program. You can also type "gO" (g = shift O) instead of "GOTO", it will show up as "GOTO" when listed. To list, you can type "L" plus shift "i". There were a lot of shortcuts for the C64 to save some typing. You could also insert cursor movements between the quotes for printing and it would move the cursor the way you want when it was printed. Good for placing text at specific location on screen. The C64 actually has some cursor locate commands built in, but you needed to call them in machine language or know the SYS address for it (which I have in some notes somewhere). There was actually a SYS call for clearing the screen if printing a clear didn't suit your tastes (SYS command called a machine language subroutine at the address specified).
I had some good times programming that machine.
Great work, thank you. I spent more hours than I care to remember programming in BASIC, first on the Atari 400, then Commodore vic 20, then Commodore 64, then QBasic on the PC, finally AMOS on the Amiga 1200... I found some of my old cassette tapes the other day with "Word pro v2" on them for the Vic 20, which was my attempt to create a word processor on an unexpanded vic 20 in BASIC. All it did, really, was accept keyboard input at the cursor location, and F1 allowed a "save" of the whole screen to a specified flename on tape, while F3 allowed a loading of the whole screen. Even just cramming that into the tiny memory of the unexpanded vic in basic was a task, but i was proud of it. Now, I wouldn't have the foggiest idea how to do it, hahaha
"A better way is to step out onto the pitch and start playing", this is 100% true, I never would have learned to program if I didn't dive right into something way over my head and learn by necessity.
You're very natural at teaching and I think this will be of genuine use to people who want to code but feel intimidated by it. I used to enjoy making simple programs on my Speccy back in the 80s and QBasic on my DOS PC in the 90s and even had delusions of becoming a professional. I then hired a book on machine code from my local library and realised I was out of my depth! Nowadays I just stick to the occasional simple web app as HTML/Javascript as it's all my simple brain can understand.
I'm having a good time using the c64 maxi to write basic games again like I used to back in the 80's. I start with a very simple idea "swinging a golf club and seeing how far the ball goes". No graphics. Just 4 lines and eventually I expand it to hundreds of lines as I keep expanding the idea. I used to eventually add graphics but I don't really care these days. It's a fun diversion and one bug can so focus your mind that hours can go why without notice while you think yourself through the code trying to find it.
this was the first game i ever wrote on the Commodore when I was 7. so many great memories. thank you
Wow, nice show... its been abot 20 years since i touched basic.... oh such memeories.... this videos removes abot first 100 pages of any manual and a lot of confusion for starters... oh if only i had tutor like that back in the days... great video, thank you very much for nostagic memories
C64 blue screen reminds me of my childhood. I was 8 when my parents bought me one. That blue screen caused alot of tears but also joy.
You brought back so many good memories from the "How 2" intro. That was a great TV show. That's where I first learnt about non-Newtonian fluids where Craig cut the stream of pouring liquid. Awesome.
I sure would love a follow up to this..
Agreed
Getting happy flashbacks to programming in BASIC on my VIC-20, when I was something like 6 or 7 years old. I was a little computer geek, and I loved every minute of it!
I remember the days. I wrote so many games on my C64 back in the day.
BlackburnBigdragon I find JVM to be a good modern equivalent to learning basic on c64 because with JVM you can make complex programing from layers of simple code which the Linux kernel builds into complex program for you and you can go back and edit the program in its original stage of being a collection of simple codes vs something a c++ program where you must built the nativity into a complex program which makes the difference of 5 minutes vs 2 hours to find the code were you forgotten a symbol.
I had fun programming my Commodore 64 and VIC-20 as a kid, back in the day... learned a lot about programming concepts.
You are really good at teaching programming thanks for helping
Excellent - I just got myself an old C64 (bread bin type) from Ebay, so I'm trying to relearn all my basic knowledge.
Looking forward to seeing more of your videos :)
Oh man, this was really awesome! Thanks!
I learned a lot about what programming was like on early systems.
This video was a little beginner for me so I can't wait for further more advanced episodes. I'm very interested in how graphics like sprites and draw commands were created and handled on these systems.
I'm so surprised you don't have more viewers 😲
This is such a great way to get my retro computer fix haha
I love the part at 5:00 with the long pause, and then "question mark". I found that really funny for some reason.
I think he was trying to decide if he wanted to correct the spelling mistake or pretend he didn't see it.
My first "computer". You've come a long way baby.
You could have added this line to the beginning of the program :
15 X = RND(-TI)
that would initialize the random number generator and then you won't have the same sequence every time you reboot
Another way to generating integers without the INT keyword:
10 X% = RND(0) * 10
20 PRINT X%
The % sign tells the interpreter to expect a signed 16 bit number, so has a range of -32768 to +32767, so it will automatically round it to an integer (I think it rounds down)
My biggest achievement in C64 basic was a Cross-stitch pattern maker program for my wife. It was mostly done in basic, but with ML routines to manipulate the multi-color mode. Many, many hours of hard work!
I'm guessing when you started this you didn't realize how much work it would be. But I hope it's still on your list of things to revisit, because it's a great idea!
Thanks for this, I've just this week added a c64c to my collection and was thinking of learning basic coding! Awesome.
Just found your channel, cool stuff, loved learning from this video! Very cohesive teaching style you've got going on. When can we expect Ep. 2?
I rember there was a "guess my number" program in the Commodore 64 User's Manual. It would give you some hints too, such as "my number is lower" or "my number is higher". I remember I was quite enthusiast of this program when I first typed it in (I was 9 or 10). There were also a dice throwing simulator and a maze generator, both using random numbers.
For example, this one line program will draw a maze:
10 print chr$(205.5+rnd(1));: goto 10
Did you ever make a part two???
Zane Revai Came here to ask the same thing.
😢
Its been 5 years and still no
For the listing in your description, instead of "*Insert Clear Screen Character*" you could also write chr$(147). Does the same thing, just looks a bit nicer on paper.
This brings back good memories, loved programming back in the day. Also probely the reason why i love to use Linux today :)
Thanks ! I got one last year and I've been planning on coding a video game since 1988...
Been a programmer since 2003 put the project of my own game on the back burner and now i the time.
But I've never coded basic : COBOL, C, , C++, java, js, xthml, etc...
Thanks! Im gonna try this on my C64 Mini tonight!
I was such a soft kid whenever we'd visit WHSmith in the 80s all I'd write is
10 Print "Hello"
20 Goto 10
Everyone else wrote swear words. It never even crossed my mind to do that :)
Nice Nerd, looking coding on C64 is always great!
Excellent video. I'm looking forward to part two.
Clear home should be shift clear home.
You are correct. Still it gives people a bit of a challenge.
Nostalgia Nerd True😊
I love programming I found a coding game on the Nintendo DSI and 3DS called Petit Computer and SmileBASIC they both use Basic and are a blast to make programs and games on. My 1st game was a chose your own path text game mixed with a maze-like dungeon my 2ed game was a slot machine game, I spent weeks working on the animation not using sprits just symbols. I would spend hours just adding code and would find my self looking at 400 new lines of code thinking how did I add all this with no programming experience. lol
At this point it's fair to say you do have programming experience... If you tried to get into modern programming, especially comething high-level and simple like phyton, you would probably find it very easy and entertaining. Phyton does have some similarities to Basic, and it's often used as a learning ground for new programmers, but it's still an incredibly powerfull language. If you wanted, you could build an entire game engine and game worth of the best productions with it, but of course there are better and more efficient ways of doing so by using C++/C# or Java.
This video has really helped me start learning to code. I hope you'll continue the series, because you're really good at making this all make sense.
I used to code a lot (Basic and Assembly language) on the C64 back in the days. Now, almost 30 years later, I'm back at it, because I decided to write a Basic V2 interpreter in Java. It's shocking how man quirks this language actually has that I either forgot or never knew about back then.
I hope that your tutorial programs will be limited to text output for some time, so that I can use them as test cases for my interpreter...
new how2 tutorial looks nice :D
I haven't messed around with BASIC as a programming language. More used to C++, though I would like to go backwards and learn more for the old PCs. I have attempted 6502 Assembly with a Commodore 64 Emulator. Would use my real C64 but my tv fell on it and its no longer functioning. Man is assembly rough. I have got as far as understanding the algorithm to multiply binary numbers using the carry bit. Due to time constraints in my life, I just haven't got any farther with it.
Before this video the only thing I could do in basic was:
10 print "Hello World!"
20 go to 10
run
I tried writing this program on N-88 basic for the NEC PC-88 computer and well, it kinda worked! I could guess numbers and stuff, but some of the code (like clearing the screen and restarting the game after I got a number wrong) didn't work because the PC-88 and the C64 have some different functions, and well, I don't really know what are the PC-88 equivalents to them... But still, I think I've learned a thing or two about basic from this video!
I remember making a text game rpg on here (I even made a social media replica out of boredom one night)
VERY cool, keep up the good work!
This was great. Used it to make a coin flip where it guess 2 numbers then if they were the same it was heads
Made a short little number guessing game. Turns green when right, Red if wrong
Great tutorial, thank you very much! =D
scnclr was usually clear screen in most commodore basic languages good video
Bit late now - But I wish I had a video like this when I was a kid!
Most of the "games" I programmed using the RND function were for pen and paper RPGs and table top games like battletech where I would tell the computer all the variables for a particular task such as how many hexes the target was away, the type of weapon being fired and how fast the target was moving and it would tell me if the shot hit and how much damage it did. which saved time I would of spent rolling a dice and looking up the various tables and such and made the game run much smoother.
any chance you could do a few more of these please?
Good idea for a series. Very glad to hear your rig campaign exceeded its goal!
Where is the clear screen character on my c64 emulator?
the one that looks like a heart in a box.
Nice, it's pretty straightforward. I wonder how would you program graphics... the 8-bit guy said it's not so convenient. What were the most popular programs/games programmed in BASIC?
I remember having a few simple games made in basic. i dont think any real games ever were coded in basic since it is very slow compared to assembly code. I did small graphics (Sprites) by drawing them on paper and calculating their values by hand. (Binary to decimal). The DATA command was then used in basic. Ah those memories.
it's remind me of the batch programming
Will there be a part 2?
That was super helpful. Thanks. I just spent some time looking for part 2 because I just bought original Commodore 64 and want to learn to code in basic. Now I know of assembly and not sure where to start. I suppose the guide that came in the box is a good start. But after that...?
Here is a better one that rolls TWO dice.
5 PRINT "CLR-HOME"
10 X = INT(RND(1)*6)+1:Y=INT(RND(1)*6)+1:Z=X+Y:REM ROLLS TWO DICE, GENERATING RANDOM NUMBERS BETWEEN 1 AND 6 FOR EACH AND ADDS THEM.
20 PRINT "THE COMPUTER HAS ROLLED THE DICE. CAN YOU GUESS THE TOTAL (BETWEEN 2 AND 12)?"
30 INPUT G. IF G < 2 OR G > 12 THEN PRINT "YOUR GUESS MUST LIE BETWEEN 2 AND 12": GOTO 30:REM REJECTS OUT-OF-RANGE GUESSES IMMEDIATELY
40 IF G Z THEN PRINT "SORRY, YOU GUESSED WRONG."
50 IF G = Z THEN PRINT "WELL DONE!"
60 PRINT "DO YOU WANT TO TRY AGAIN (Y/N)?"
70 GET G$:IF G$="" THEN GOTO 70:REM RETRIES EMPTY KEY BUFFER
80 IF G$="Y" THEN GOTO 20:IF G$="N" THEN GOTO 90
85 GOTO 70:REM REJECTS ANY ANSWER EXCEPT Y OR N
90 PRINT "OK, SEE YOU AGAIN SOON.":END
One thing I don't get is why the text just splits when you go to the next line halfway through a word, I think my obsessive compulsive is coming out. Great idea for a series though will be dusting off my c64 for this!!!
there is a version of BASIC i remember on C64 that conformed to the PRINT CLS function instead of the heart symbol , it so long ago i can't remember which one
Can you make a simplified Doom clone in SimpleBasic? I’d really like to see that done. Raycasting is possible in it, as is simple polygonal 3D.
is there LET command in commodore's language? as i remember it was only x=... without LET.
LET is optional
why was this the only c64 basic guide you made? i think it would be a really good series.
Great video - is there a 2nd part?
If you want to copy and paste basic in to a emulator you will need to convert all the code into lower case as won't display properly otherwise.
POKE 211,X : POKE 214,Y : SYS 58732 - this will set the cursor at the location specified.
SYS 58692 - same as the CLR/HOME, clears the screen.
POKE 775,200 - disable LIST
POKE 775,167 - enable LIST
So you could do a loop by just using the goto command?
I code in BASIC and I love it
i tried to code this on a TI-99/4a. It didn't work, time to get a C64.
sweet sweet memories!
That intro reeks of age
There is a part 2?
When did "else" first appear? select case is always handy too, but I'm pretty sure that didnt exist back then
The Commodore 128 had IF/THEN/ELSE. BASIC V 7.0
If they would have made a Commodore 256, it would have had IF/THEN/MAYBE:
10 X=INT(RND(1)*100)+1
20 IF X>50 THEN GOTO 30 MAYBE 40 OR EVEN 50ish
30 GOTO BED
I have a few memories of programming on a C64 (my friend had one). I don't think we ever got much past printing characters to the screen, trying to make text art! it wasn't until many years later I started using Turbo Basic and it all came back to me
Eh, how am I supposed to type the "clear screen" symbol if I'm trying to do this on the VICE emulator, where I assume my Windows keyboard doesn't have such a button?
I just spent whoever long typing out all that stuff above only to notice you weren't telling me to literally type "*Insert Clear Screen Character*". :-o
Why not use the CLS command instead to clear the screen?
is there a way to save your program to a cartridge? I know there are some places that make new circuit boards and sell the components and cases needed. I would love to make my own even if just for my own sake.
I am using an Emulator, how do I get the clear screen symbol there? emulating on retropie with raspberry pi and a german (qwertz) layout, though retropie or the emulator is configured for US
Hi, I would like to ask a question: I'm doing some sprites for the C64 using Spritepad, and want to give my sprites to a programmer to implement them in the code. In the options I can chose between .prg .bin and .spd also when I chose .prg, the program is asking me to put a number (maybe I have to put a different number for every sprite I create)?....thank you!
This is what I get when I search for how to basic
Is it possible to run 2 instructions at once? Like if i want the screen to flash colors but at the same time constantly wait for an ENTER press to reset the colors back to default
MarioKart7z
100 poke 53281,int(rnd(0)*16)
200 poke 53280,int(rnd(0)*16)
300 get a$: if a$ = "*keyboard button*" then goto 500
400 goto 100
500 poke 53281,14:poke 53380,6
i am just getting a 64 running, someone else already had a crack at it (was missing half the dram chips) recapped and new ram all around. ran your first program and got same results random decimal. also new to basic of any kind other then 20 years ago on a windows machine. if the random result is between zero and zero point nine recurring, why does it randomly post a result above zero? this seems like a glitch or a memory overflow problem, or not strict enough parameters for this code/command, again im really new just trying to learn.
Nice!
When it got to the point when it kept running the program every time. I couldn't stop the program.
Escape or Caps lock are usually mapped to the 64 Stop key.
Unless a programs starts with....
10 POKE 53280,0 : POKE 53281,0
...it sucks
And poke 646,5 for that traditional greenscreen look...
does nothing
BSM?
i so agree i started every one with this but i made the border white instead.
Where is the continuation of the tutorial?!
Is Nostalgia Nerd How 2 Basic? *get it*
how do you clear it so fast what is the hot key I was testing it and then i tried to go back to my code and i had to retype it all over again it said something about go from start i think
the "?REDO FROM START" thing is just to tell you that you've input an invalid value during an INPUT prompt (When the question mark appears and you have to type in something)
To clear the screen, press SHIFT and the button with the diagonal arrow pointing north-west
When's the next part coming?
Good question. I haven't forgotten, just haven't got round to it. I would say definitely soon.
If you need a couple of cool songs like these in your videos, you can check out Suduaya - Come Back to Life album, I think you might like the songs "Snow and Stars" and "Patience" ... I hope you like them.
Still waiting for the next part (note how long ago my OP was)...
Nostalgia Nerd nah
ngl, this is fun.
It says there is a syntax error in line 40 pls help
can you make a video on how to make a platformer c64 game? thx
10 print "Willy"
20 goto 10
Used to do that in boots 30 something years ago. :D
90 Print "Do you want another go?"
100 Get A$ : If A$"Y" And A$"N" Then 100
110 If A$="Y" Then 10
120 If A$="N" Then Print "Goodbye!"
I'm looking forward to the rest of this series, I used to do a lot of basic programming back in the day.
Why not replace the inputs with "getkey A$"?
Getkey will come all in good time.
+Nostalgia Nerd sweet, all bases covered then. :)
@@Nostalgianerd in good time? nothing like the present... 5 years later.. lol...
it would be cool if the program told you the number the computer picked.
No part 2 ?
What is a good price for a commodore 64?
About £30 should give you a nice 64C
Episode 2, please!
10 PRINT "WHAT KIND OF EMULATOR DO U USE?"
20 PRINT "THANK YOU SO MUCH!"
RUN
WHAT KIND OF EMULATOR DO U USE?
THANK TOU SO MUCH
READY.
More seriously: Vice is a great one, for a lot of Commodore computers.: vice-emu.sourceforge.io/
How can you print the inverted heart
This is probably such a common question, but how does one break out of the program? I'm learning basic just for shits, I actually kind of despise programming. But it's fun to fool around with old languages to me for some reason.
You can actually use the command "END" inside a program, or you just let it reach the end of the code.