Vision BASIC for the Commodore 64 - Tutorial #1 - Sprite Programming (Example, Spr-editor Review)

  Рет қаралды 3,666

Vision BASIC

Vision BASIC

Күн бұрын

Пікірлер: 50
@visionbasic
@visionbasic 2 жыл бұрын
I do apologize that the video capturing is not the best, so even smooth movements appear jerky in the video. I plan to either update my software (since I haven't done it in eons) or find something better to do the capturing with. I know that Microsoft makes it easy to capture game play (and the resulting video appears smooth), but videos seem to include the window borders and menu and I don't want that in the shot. Anyhow, just know that I will work on this.
@crookedmouth1971
@crookedmouth1971 Жыл бұрын
Great video! Let me also say that Mr. Berger's message is mirrored by myself and I'm sure many others. Amazing job and thank you for working on the most endearing and enduring computer of all time.
@visionbasic
@visionbasic Жыл бұрын
I appreciate the nice words! I uploaded a new video less than 24 hours ago, if you are interested in random numbers. I tried to rush it out the door because I'm trying to create awareness about the project "I Adore My 64", but also because I need to get back to my tinkering. Thank you for supporting Vision BASIC!
@GRayDefender
@GRayDefender 2 жыл бұрын
Excellent video and follow up to your first terrific video on Vision! Please keep them coming!
@visionbasic
@visionbasic 2 жыл бұрын
Thank You! I want to release videos every few weeks, if possible. This video took at least a couple weeks to put together (in my free time). I need it to only take maybe a week to help make this a better fit into my schedule, so I will be trying to streamline where I can. I could add tons more pages to the manual to make tutorials and such, but I figure that I can do videos instead to act as supplemental material. Over time I could have a good collection going. I also can give "insider secrets" for even better programming outcomes. :) Anyhow, by doing videos, the resources could be "endless" and not limited to a page count.
@zeedee3929
@zeedee3929 2 жыл бұрын
I appreciate the simplified explanations. This is exactly the instructions I need to better understand Vision Basic. Thanks for the video and keep them coming!
@visionbasic
@visionbasic 2 жыл бұрын
I will try to put out videos as time permits. I plan for such videos to be supplemental because there's only so much you can fit into a manual without making it super huge. Even though Vision BASIC can make programs easier to make, programming is still an art form that takes many strokes of the keyboard, and some planning. In the 80's, you had to learn how to program via the manuals and magazine subscriptions. Younger generations don't realize how much learning is required to make stuff on old computers. The manuals gave you the basics, and the magazines gave you the tips and tricks! :) And this video even gives some tips for just regular BASIC programmers -- win-win! :)
@paullee3660
@paullee3660 Ай бұрын
I like how the assembly can access the basic variables and line numbers. Also the way you can guide the basic into creating efficient machine code. Brilliant stuff!
@visionbasic
@visionbasic Ай бұрын
Thank you! I realized that there are times where my knowledge of assembly language comes in handy for the programs I want to create, so I built features into Vision BASIC that allowed me to do what you're talking about. This was important in getting Vision BASIC to be able to compile programs faster -- since Vision BASIC was written in its own code (originally in 100% regular BASIC). I converted the important stuff over to assembly language (in the source code).
@paullee3660
@paullee3660 Ай бұрын
@@visionbasic I am doing a Turbo Rascal game with my brother, but this looks like the quickest way to get good performing code done quick, so I am giving it a go for the other game I am writing. It looks like a great product. Can’t wait.😀👍
@visionbasic
@visionbasic Ай бұрын
@@paullee3660 I've heard of Turbo Rascal, and I learned a bit of Pascal a number of decades ago. I loved learning new languages and different computers, but now I have to stick to the C64 because I truly want to master it. I don't expect to fully program in assembly, though (for large programs).
@v8volkswagen38
@v8volkswagen38 2 жыл бұрын
Another awesome video! Loving Vision BASIC. 😊
@visionbasic
@visionbasic 2 жыл бұрын
Thank you so much!
@menotu000
@menotu000 2 жыл бұрын
What I love about this is being able to mix BASIC and ML soo easily. Painless in fact. You can get such speed from it, that it is ridiculous. There is only one difference I would like to see in the compiled output. Specifically, I would like to see a selective RTL output. In other words, if a routine isn't being used, it should not be included in the RTL output. That would shorten the physical size of the output of your program. For example, if you are not using any FP math, then no FP routines should be output in the RTL of the compiler. If no graphic/sound commands then no graphic/sound RTL output. That would make this absolutely perfect.
@visionbasic
@visionbasic 2 жыл бұрын
Vision BASIC does this to a small degree. If you use no graphics commands, the output code would be smaller (by I think 4K). But to do it on a per-command basis, I would have to do a massive rewrite. Also, I think the Vision BASIC program would end up larger, and it already uses up pretty much all the free space. A cross compiler could do this better, sadly. I have wanted to look at a solution for this, but it would be way down the road because it would take a long time to implement. I typically don't worry about having large files anymore because Vision BASIC makes accessing all 64K pretty easy. Plus, REU access also makes things easier (if you need more memory). The main issue would be slow disk drives and loading times there.
@visionbasic
@visionbasic 2 жыл бұрын
I was rushing out responses (had to go to work) and I didn't get to address your first sentence. I wanted to be able to use machine language more easily than what was normal for most programming (like having a BASIC program that would load in a separate ML chunk of code and calling routines with SYS). I didn't want to have to use machine language to print text to a screen when BASIC could do that much more easily. I didn't want to have to try to come up with ways to deal with decimal numbers in machine language unless absolutely necessary. Some tasks are simply much easier in BASIC. Poking in X-coordinates for sprites is a bit of a pain in machine language AND in BASIC, so Vision BASIC makes it simple with MOBXY. A double compare in machine language is a tiny bit of a pain, but COMPARE makes it easier. So I really just wanted to make programming easier overall. Of course I wish I could have made Vision BASIC as versatile as Blitz when it comes to compiling almost everything thrown at it, but my skills only go so far. Creating a stable program is first and foremost. Being able to place machine language and BASIC together on the same line just made sense to me at some point because some of the commands actually get turned directly into machine language. GOTO, GOSUB and RETURN are obvious ones. But THEN and ELSE also get converted to machine language. And the "fast commands" also get converted to machine language.
@ArneChristianRosenfeldt
@ArneChristianRosenfeldt 2 жыл бұрын
@@visionbasic it is graph theory I think. Pretty old and compact ( the code ). Only the data needs the REU. Every package manager does this as does cmake. I don't get why so many compilers shipped with a bloated ( non-micro ) runtime. Then I read, that in C you can omit stdlib and then don't have to link it. Only Borland and Microsoft deployed those bloated runtimes, probably to protect their IP.
@DevilsHandyman
@DevilsHandyman 2 жыл бұрын
Your videos are an excellent source not only for usage of your product but for programming in general. You show and explain how to get the best performance even from stock BASIC programs and that is a good basis for people to have when working in any environment but especially a more resource limited environment such as an 8-bit retro computer.
@visionbasic
@visionbasic 2 жыл бұрын
Thank you! I've had to struggle all these years trying to maximize the speed of my programs. I created Vision BASIC in response to that struggle. But unless a person is programming in full machine language, you pretty much have to come up with all kinds of tricks to get decent speeds out of your programs. I do have a video idea in my "pipeline" that will benefit programmers of both Vision BASIC and regular BASIC equally. I don't know when I'll do that video, but it's on my list. In the beginning of our venture into the world of C64 programming, I think we all were under the impression that we could whip up all kinds of super awesome games in regular BASIC, and then reality smacked us hard, LOL. I do think great things CAN be done in regular BASIC, though.
@DevilsHandyman
@DevilsHandyman 2 жыл бұрын
@@visionbasic Yeah back in the day it was learn assembly language or give up. Now I dally with Asm, Basic and C (CC65). I do C++ professionally so it's fun to go to a restricted version of C to try to get performance.
@visionbasic
@visionbasic 2 жыл бұрын
@@DevilsHandyman It's cool that you made programming your career. I think my father bought us a C64 in the hopes that it might steer us into the programming field, but that didn't happen. I'm a creative sort who doesn't like being told what to do with my creativity, so it's always been hard to find my niche. Vision BASIC was the result of me doing exactly what I wanted to do. And modern programming doesn't really entice me. I think that's because I've always lagged behind (in the learning process). Toying with the C64 for so many years now has allowed me to catch up. It might be cool one day to try my hand with a modern game engine (just for fun), but for now I'm solidly busy with the C64 stuff.
@DevilsHandyman
@DevilsHandyman 2 жыл бұрын
@@visionbasic As they say you can easily ruin a hobby/joy by turning into a job. I think many younger modern programmers are starting to see the value in learning on older more limited systems like the C64. You accomplished something someone who does this for a living would be proud to have done.
@zwfilmsalt
@zwfilmsalt 2 жыл бұрын
Hey there, it would seem that I've found my way to your website and I'm looking into the launch package. I have no experience in regular BASIC, is your book that is included with the package well documented?
@visionbasic
@visionbasic 2 жыл бұрын
Vision BASIC adds over 100 new commands, so a book that would fully cover everything would be huge. So you would need supplemental reading material for sure. If you know how to program other languages, that could help. But C64 programming in general is a messy and frustrating thing in the beginning -- I read posts on Facebook where people ask questions about programming on the C64 all the time. I just want to answer your question in the most honest way possible. If you have the patience and determination and you really like the retro aspect of it all, I certainly think it's worth it. But if you want to make a super awesome program in only a few weeks of coding, then I can only say that the goal isn't realistic. Vision BASIC does make the process a lot easier for pretty much anyone, but "easier" is a relative term. So I recommend playing around with the VICE emulator and getting to know the C64 better in an overview kind of sense (I'm assuming that you're not familiar with the C64 and do not know 6502 machine language, right?). Use the following books to learn from: Commodore 64 Users Guide Compute's Mapping the Commodore 64 Commodore 64 Programmer's Reference Guide Compute's Machine Language for Beginners They are all out of print, but can be viewed on archive.org (as for the legality of this online "library", I don't know how that part works). Anyhow, after getting a better taste of the C64, it should help you decide whether or not Vision BASIC is the next step. The Vision BASIC manual assumes that the user is familiar with C64 BASIC and knows how to create sound and graphics on the C64, and a general understanding of memory layout is recommended too. The Vision BASIC manual only covers what you'll need to know on top of what you should already know about the C64 and C64 BASIC. If you check out these books I've mentioned, you'll understand why it would take a huge manual to explain everything. It's not that you necessarily have to know everything about the C64, but the more knowledge you have about the C64, the more you'll get out of Vision BASIC. Anyhow, I just want to give you the best and most honest and most informative answer I can. Like I said, tinkering around with VICE and reading the reference materials should help you make a better decision. As much as I look forward to a sale, I want happy and content customers.
@igork3522
@igork3522 2 жыл бұрын
@@visionbasic Thank you for this answer and the explanation what is needed in order to utilize your Vision Basic to the full potential. Also, such an honest response, showing that you care about potential buyers of your software. With Vision Basic in play and possibility to use machine language easily in the same editor, the limitations of BASIC are almost all gone and the possibility to use whole power of C64 as a machine is available. That means that now we are not limited to the first 50 pages of a C64 book (the usual BASIC part :)) but that we should read the whole book now :)
@visionbasic
@visionbasic 2 жыл бұрын
@@igork3522 I'm always glad to see people wanting to pick up programming on their C64's again, or people picking it up for the first time. I don't know if such a thing exists out there, but it seems that a good solid modern (
@TimePilot2084
@TimePilot2084 2 ай бұрын
Man, what I could've done with Vision BASIC back in the 80's as a kid! BLITZ! used to seem like magic to me.
@visionbasic
@visionbasic 2 ай бұрын
Blitz! was magic to me too, but I was still frustrated with the lack of speed for some things. I actually had made a version of Vision BASIC that was pretty far along back in 2000, but I was running out of local memory and then I had to focus on raising a child, so I dropped it for a long while.
@igork3522
@igork3522 2 жыл бұрын
Thank you for the video. You really did a great job. And thank you for pointing to not a wizard channel and I hope he will be back to making a new videos soon. Maybe also using your Vision BASIC :)
@visionbasic
@visionbasic 2 жыл бұрын
You're welcome! I'm about to put out another video (sorry it's been awhile). This next video will be about sprite design and will have a follow up video within a few weeks as well. I'm hoping Not a Wizard is doing alright -- haven't seen a video posted in awhile. I love our community and I want to keep the connections going!
@bozimmerman
@bozimmerman 2 жыл бұрын
Perhaps a future version of Vision BASIC compiler could do those optimizations for you? e.g. detect that you are comparing two integers and just branching, detect that you are doing a simple addition, etc..
@visionbasic
@visionbasic 2 жыл бұрын
It is an excellent point. The main reason I didn't go this route is because the faster commands usually output significantly more bytes into the stream than the regular commands. To do this for the entire program could expand the size of the program considerably. BUT, I am looking into making some of this stuff easier (I already have ideas). I do plan to make a lot of improvements to the software, but I am also running up against a lack of memory since Vision BASIC consumes pretty much all the free RAM up to 53247. I do have plans for the RAM under the Kernal as well. Part of the versatility with the fast commands is that you can also combine them with assembly language. For example, a "double compare" is a tiny pain to set up in machine language, but the COMPARE command makes doing so in machine language easier. Today's assemblers may already have macros for things like double compare for all I know. A lot of what Vision BASIC can do was dreamed up while programming it. I would write some of the code for Vision BASIC and think "it would be cool if I had 'this' command or feature available to do what I'm trying to do right now!". It evolved over its creation. I could have improved it forever. At one point I just had to stop for a moment and just release it. There's always room for improvement (as long as the memory is there).
@joecan
@joecan 2 жыл бұрын
Very cool. Is there a reference or manual posted up for this anywhere yet so potential buyers can get a better idea of all the new commands and what not Vision Basic has?
@visionbasic
@visionbasic 2 жыл бұрын
C64 Basic has absolutely no commands for graphics, sprites and sound. C64 BASIC is also notoriously slow. All graphics and sound capabilities of the C64 require tons of memory POKEs. Vision BASIC, on the other hand, makes it to where NO POKEs are needed to work with graphics and sound -- with the benefit of significantly increased speed. But a list of commands really doesn't do much to explain what Vision BASIC can do, so I am making these videos to show EXAMPLES of how to get the most out of Vision BASIC. More videos will follow. Try making a Pac Man style game with regular C64 BASIC (and no machine language). Such a game would be sorely lacking in multiple respects. But check out the Harold game on my website (it's a free download). It took a certain amount of strategy to get the speed you will see (since there are multiple ways to accomplish the same task in Vision BASIC, and some ways are faster than others), but it shows what's possible. Only pure machine language would do better (and Vision BASIC allows the addition of ML into the code in whatever amounts you wish to add).
@joecan
@joecan 2 жыл бұрын
@@visionbasic is there a code sample of it? just want to see something concrete / written
@visionbasic
@visionbasic 2 жыл бұрын
@@joecan Here is the code from the routine (in "Harold") that controls the cat's movements. I originally started with IF-THEN statements and normal variable definitions, but then optimized the code with faster equivalents because the higher-level commands have more "overhead" and thus run slower: 3997 ; 3998 ; move player 1 3999 ; 4000 comp lives1,0:[bne4002 4001 subtract pl1y=27-ry: subtract pl1x=39-rx:return 4002 comp died1,0:[beq4006 4004 gosub9800:goto4070 4006 mob0,bm1:comp bm1,2 4008 [bcc4010]:dec bm1 4010 gosub5600:comp cntr,0:[bne4070 4020 gosub4100 4030 ad=sy(pl1y)+pl1x:pk=peek(ad) 4040 comp pk,32:[beq4060:; space 4041 comp pk,46:[bne4043:; pellet 4042 gosub4700:goto4060 4043 comp pk,28:[bcc4050:bne4045:; nip 4044 gosub4800:goto4060 4045 comp pk,92:[bne4047:; mousetrap 4046 gosub4900:goto4060 4047 comp pk,94:[bne4060:; hairball 4048 gosub4920:goto4060 4050 gosub4940:; extra life 4060 comp af1,0 :[beq4095:decaf1 4062 goto4091 4070 add sprx1=sprx1+ax1 4080 add spry1=spry1+ay1 4090 comp af1,0 :[beq4095 4091 comp af1,11:[bcs4094 4092 letg=af1:halfg:doubleg 4093 comp g,af1 :[beq4095 4094 add pk=40 +cntr:goto4096 4095 add pk=sh1+cntr 4096 pk=peek(cash,pk):mob0:shape pk 4097 mobxy sprx1,spry1:return 4099 ; ** movement options for cat ** 4100 addpl1x=pl1x+ax1:addpl1y=pl1y+ay1 4102 let sprx1=pl1x:double sprx1 4104 double sprx1 :double sprx1; time8 4106 let spry1=pl1y:double spry1 4108 double spry1 :double spry1; time8 4110 ba=cy(pl1y)+pl1x:; base address 4112 comp pl1x,1 :[bcc4130; pl1x38 4120 add ad=ba+ax1 4122 pk=peek(ad,p40(ay1))and15 4124 comp pk,6:[beq4128 4126 comp pk,1:[bne4130 4128 gosub4400 4130 comp pl1x,40:[bcc4150; pl1x>39? 4140 subtract pl1x=39-pl1x:return 4150 dx=joy(4):dy=joy(6) 4152 comp dy,0:[beq4154:gosub4200 4154 comp dx,0:[beq4160:gosub4300 4160 rem 4170 :::::::: 4180 return 4197 ; ** joy is up/down ** 4200 pk=peek(ba,p40(dy))and15 4210 comp pk,6:[beq4240 4220 comp pk,1:[beq4240 4230 let ax1=0,ay1=dy:goto4360 4240 return 4297 ; ** joy is left/right ** 4300 pk=peek(ba,dx)and15 4310 comp pk,6:[beq4340 4320 comp pk,1:[beq4340 4330 let ax1=dx,ay1=0:goto4350 4340 return 4349 ; ** pick cat shape by dir ** 4350 comp ax1,1:[bcc4360:beq4354 4352 let
@customsongmaker
@customsongmaker Жыл бұрын
Vision BASIC is best BASIC
@dr.ignacioglez.9677
@dr.ignacioglez.9677 2 жыл бұрын
I LOVE C64 👍🥂🎩
@alifarsani2469
@alifarsani2469 2 жыл бұрын
hi, it is a dream come true, thanks a million! qq for you: would it run on TheC64 Mini and Maxi? I think they are emulating hardware but not sure if you can actually reference and access memory maps like you are doing here on an actual Commodore64
@visionbasic
@visionbasic 2 жыл бұрын
It should run on both devices. I have tested it on the Maxi (and the mini is pretty much the same device). The problem with the mini is a lack of keyboard, though you can plug a real PC keyboard into it (from what I've heard). You will need to change the filename of the Vision BASIC disk image (the D64) to include the appropriate extension to enable the REU feature on the C64 Maxi. I don't know what the extension is offhand, but the Maxi documentation explains it. Make sure to add 512K or more (expanded memory). The benefit of using a C64 Maxi is that you can save the state of a fully loaded Vision BASIC so that you won't have to keep reloading it from disk. I think the boot program doesn't work with the C64 Maxi, so you'll need to load Vision BASIC via LOAD"VISION BASIC.VEX",8 instead of loading the boot program (which only works in NTSC mode anyhow).
@alifarsani2469
@alifarsani2469 2 жыл бұрын
@@visionbasic awesome, thank you very much for explaining. I am going to order my copy of vision basic next week. Keep up the great work 💜💙
@visionbasic
@visionbasic 2 жыл бұрын
@@alifarsani2469 Thank you!
@dr.ignacioglez.9677
@dr.ignacioglez.9677 2 жыл бұрын
You are a Genius 👍🥂🎩
@visionbasic
@visionbasic 2 жыл бұрын
Smart, sure. Genius? A stretch, lol.
@gklinger
@gklinger 2 жыл бұрын
I think a less expensive digital download with manual in PDF form might be well received.
@RetroGameCoders
@RetroGameCoders 2 жыл бұрын
All-digital would increase the likelihood of it getting pirated - everything seems to end up on "crack" forums now, even DRM-free stuff
@kraftwerk974
@kraftwerk974 2 жыл бұрын
Is this an interpreted language like other basics ? Without disrespect If yes it will never be able to handle all that's needed within a raster interrupt. The line refresh will always catch you redrawing the sprites... don't see the point really. Why not learn learn 6510 assembly instead and code a cool proper shmup.
@visionbasic
@visionbasic 2 жыл бұрын
This particular video doesn't discuss raster interrupts. Vision BASIC is a compiled form of BASIC that converts some commands into pure machine language, and converts other commands into a form that can be interpreted quickly. Vision BASIC makes the process of setting up an interrupt rather easy. The interrupt itself will likely need to be in machine language. But Vision BASIC isn't just BASIC -- it combines BASIC and an assembler into one so that you can program machine language and BASIC even on the same line. Some people love to program in pure machine language, but not everyone does (I certainly don't if I don't have to). So it's different strokes for different folks. Some folks love the interstate, whereas some like the scenic route -- either way, the goal is to get where you are trying to go.
@kraftwerk974
@kraftwerk974 2 жыл бұрын
@@visionbasic I get your point. I personally enjoy every ML step. 🤙☮
@visionbasic
@visionbasic 2 жыл бұрын
@@kraftwerk974 While creating Vision BASIC, my skills in assembly language improved dramatically. For some, Vision BASIC could provide a springboard into improving their own skills in assembly. I can certainly write better programs in full assembly language now than I could have many years ago. Still, it all depends on what I wish to accomplish in a program. I actually enjoy mixing the two, honestly speaking.
World’s strongest WOMAN vs regular GIRLS
00:56
A4
Рет қаралды 11 МЛН
ROSÉ & Bruno Mars - APT. (Official Music Video)
02:54
ROSÉ
Рет қаралды 245 МЛН
ЗНАЛИ? ТОЛЬКО ОАЭ 🤫
00:13
Сам себе сушист
Рет қаралды 3,9 МЛН
Osman Kalyoncu Sonu Üzücü Saddest Videos Dream Engine 269 #shorts
00:26
Doom didn't kill the Amiga...Wolfenstein 3D did
16:58
Modern Vintage Gamer
Рет қаралды 913 М.
Complete beginners guide to creating sprites on the Commodore 64 / C64 in BASIC
25:47
Realtime Generative Minecraft Down To The Pixel
17:27
Jarren Rocks
Рет қаралды 22 М.
World’s strongest WOMAN vs regular GIRLS
00:56
A4
Рет қаралды 11 МЛН