OS Basic Studio Development

Discussion of software development within Commodore OS and the future development of Commodore OS.
Post Reply
NibbleNut
Posts: 23
pinterest Kuchnie na Wymiar Warszawa
Joined: Sat May 03, 2025 12:30 pm
Contact:

OS Basic Studio Development

Post by NibbleNut »

Hi all. I'm playing around in here and having a blast making simple games. What I'm struggling with is multiple windows and canvases. I've been reviewing the Canvas Test program in the examples but not having much luck.

What I'm trying to do is have an background image on canvas(0) and do all my movement/animation on Canvas(1) so all I have to do is update X & Y and then Clearcanvas() (leaving the background) and redraw my images/Text on Canvas(1).

Any suggestions/examples would be appreciated.

User avatar
LeoNigro
Site Admin
Posts: 492
Joined: Mon Aug 14, 2023 1:29 pm
Contact:

Re: OS Basic Studio Development

Post by LeoNigro »

I think Commodore OS BASIC is a little bit fresh, and so people won't have enough experience to comment on some of the technicalities.
However, this BASIC dialect is quite mature, as it is based on the fantastic RCBASIC which has been developed over several years.
It might make sense for you to reach out for help on the RCBASIC forum for more technical assistance. https://rcbasic.freeforums.net
RCBASIC is up to 4.3 right now, so you'll have to specify you require assistance for RCBASIC version 3 on which Commodore OS BASIC is based.
Some of the syntax has changed in later versions of RCBASIC, but the capabilities are pretty close.
The later RCBASIC version utilises a different graphical engine, more appropriate for 3D, that is proving more difficult to port to Commodore OS, but hopefully it'll work for COS4. The author, Rodney Cunningham, is confident we can work out the issues and get the new version ported.

Of course, part of the technology roadmap for Commodore OS BASIC is the capability to produce C64 and Amiga games on the same codebase, but this will be an add-on feature, utilising a different API that abstracts functionality across the platforms. I wish I'd gotten this feature going so we could have had such software built and available to use on the new Commodore 64 Ultimate. I imagine it will come together pretty quickly once development officially starts, and I will be providing regular updates on the features.
Image Leo Nigro. Co-founder and Lead Engineer - PC and Amiga at Commodore
Commodore OS and C64x Creator. Site Admin.

NibbleNut
Posts: 23
Joined: Sat May 03, 2025 12:30 pm
Contact:

Re: OS Basic Studio Development

Post by NibbleNut »

Awesome. Thanks so much Leo

Mandrake
Posts: 28
Joined: Sat Jun 07, 2025 8:24 pm
Contact:

Re: OS Basic Studio Development

Post by Mandrake »

I can't even imagine... my own little 3D game inside my surrogate "Commodore". Learning BASIC all over again with new capabilities to create some of those dreams from childhood of just creating my own little forest to walk around in, etc. :)

NibbleNut
Posts: 23
Joined: Sat May 03, 2025 12:30 pm
Contact:

Re: OS Basic Studio Development

Post by NibbleNut »

Well, I have no idea why but it's working now. I typed the Canvases example for 1 window and 2 canvases and it just wouldn't work. When I just copied ALL the sample coded and widdled it down to 1 window and 3 canvases....it worked just fine. Not sure what I was doing wrong but I'll just copy/paste this code from now on.

tbrandon92
Posts: 1
Joined: Tue Jun 10, 2025 12:16 pm
Contact:

Re: OS Basic Studio Development

Post by tbrandon92 »

Since we're talking BASIC, has anyone here heard of a book entitled "Golden Flutes & Great Escapes" written by Delton T. Horn? Horn originally wrote four adventure programs for the TRS-80, and then ported them to such computers as the Apple ][ and the Commodore 64. My question is, if anyone's seen this book and its programs, can they give me some hints on how to port them to Commodore OS BASIC?

Here's a link to the book in case anyone's interested. https://archive.org/details/golden-flut ... scapes-c64

Mandrake
Posts: 28
Joined: Sat Jun 07, 2025 8:24 pm
Contact:

Re: OS Basic Studio Development

Post by Mandrake »

tbrandon92 wrote: Sat Jul 26, 2025 11:29 pm Since we're talking BASIC, has anyone here heard of a book entitled "Golden Flutes & Great Escapes" written by Delton T. Horn? Horn originally wrote four adventure programs for the TRS-80, and then ported them to such computers as the Apple ][ and the Commodore 64. My question is, if anyone's seen this book and its programs, can they give me some hints on how to port them to Commodore OS BASIC?

Here's a link to the book in case anyone's interested. https://archive.org/details/golden-flut ... scapes-c64
I took a quick skim through - I can tell you that the new Commodore OS BASIC has no line numbers, so from the quick glance I took, it will just be a rewrite using the code as reference. For example, the GOSUB routines would be turned into functions, there are a ton of "IF" checks by assumed progression for health checks using damage multipliers, etc. that would be whittled down into else / if groups.

So, it's a complete re-write, but looks like it would be a fun one. I love those kinds of games. You will just have to learn the "dialect" of this particular BASIC and program it accordingly. I'm still wrapping my mind around it - I've only written a few test programs here and there. Nothing of any consequence. Just trying to get a handle on structure, handling, and operations. I'm looking forward to diving in when I get some vacation time coming up! :)

NibbleNut
Posts: 23
Joined: Sat May 03, 2025 12:30 pm
Contact:

Re: OS Basic Studio Development

Post by NibbleNut »

Here's the working solution if anyone else needs it.

visible = true
fullscreen = false
resizable = false
borderless = false
highDPI = false
vsync = true

WindowOpen(0, "test", WINDOWPOS_CENTERED, WINDOWPOS_CENTERED, 1400, 980, WindowMode(visible, fullscreen, resizable, borderless, highDPI), vsync)

Window(0)
CanvasOpen(1, 1400, 980, 0, 0, 1400, 980, 1)
CanvasOpen(2, 1400, 980, 0, 0, 1400, 980, 1)
CanvasOpen(3, 1400, 980, 0, 0, 1400, 980, 1)
SetCanvasZ(3,7)
SetCanvasZ(2,6)

Canvas(3)
Setcolor(RGB(255,0,0))
Circlefill(100,100,50)
Update():waitkey

Canvas(2)
Setcolor(RGB(0,255,0))
Circlefill(140,140,50)
Update():waitkey

Canvas(1)
Setcolor(RGB(0,0,255))
Circlefill(180,180,50)
Update():waitkey

Canvas(2)
Clearcanvas
Setcolor(RGB(255,255,255))
Circlefill(140,140,50)
Update():waitkey

While true

Wend

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest