BlitzMax OpenSource on COS2

The Commodore OS Vision Linux distribution and Linux software discussion and help.
Post Reply
davidf215
Posts: 12
pinterest Kuchnie na Wymiar Warszawa
Joined: Wed Dec 04, 2024 3:47 pm
Contact:

BlitzMax OpenSource on COS2

Post by davidf215 »

BlitzMax is a strongly-typed, garbage-collected, open-source programming language with built-in support for advanced 2D graphics, sound, unicode and is ideally suited to making all kinds of apps and games. BlitzMax was discontinued several years ago by Blitz Research, but it was open sourced and is now freely available (https://blitzmax.org/downloads).

Image

BlitzMax primarily targets the main three desktop platforms - Windows, Linux and macOS - but also supports building native binaries for Android, iOS, Raspberry Pi and NX (Switch homebrew).

Back in the day, the Commodore Amiga was the initial platform for the BlitzBasic programming language. BlitzMax is a newer version and has continued its development since those early days of BlitzBasic on the Commodore Amiga.

Creating a Command Line or Terminal app is as simple as:

Code: Select all

Print "Hello, World"
Image

And creating a Graphics app is almost as simple with the following code:

Code: Select all

SuperStrict

Graphics 640,480

Repeat
    DrawText "Hello, Commodore OS Vision World!", 200,150
    DrawText "Click Mouse to exit" , 200 , 200
    Flip
Until WaitMouse()
Image

BlitzMax Setup in Commodore OS Vision

Setting up BlitzMax on Commodore OS Vision 2 was fairly straight-forward. Browse to https://blitzmax.org/downloads/. Then scroll down and find the Linux x64 listing and click on the link to download the compressed file.

Once the file is downloaded, open the compressed file in the Downloads folder with the Archive Manager. Extract the file to the default BlitzMax folder. Note it is important to ensure the extracted folder name matches as when running the executable is dependent upon the folder name (including case sensitivity).

Image

After the files are extracted, browse to the newly created BlitzMax folder, and double click on the MaxIDE file. You'll be prompted to build the documentation, so click Yes/Ok to do so.

Image

You can learn the language and find a language reference on the Blitzmax.org website (https://blitzmax.org/docs/en/setup/get_started/). There is also a manual installed in the doc folder of the extracted BlitzMax folder. Those who used BlitzBasic on the Commodore Amiga will find many commands familiar and find many new, modern commands as well.

This is a great tool for revisiting nostalgia feelings from the days of using the Commodore Amiga as well as using an updated BlitzBasic programming language to create modern applications on a modern Operating System.

Now, by default, Commodore OS Vision does not contain the necessary development libraries to compile the sample apps included with BlitzMax. So if you try to compile some of the apps, such as Tempest or Breakout, then you'll get Build errors.

Image

To install the extra development tools, open the CLI Terminal (located under Applications > System Tools). Once open, copy these commands into the terminal and run them to install the base development tools:

sudo apt install g++ libglu1-mesa-dev libasound2-dev libfreetype6-dev libxpm-dev libxft-dev libxxf86vm-dev libpulse-dev libopenal-dev libwebkit2gtk-4.0-dev libgtk-3-dev

Once these are installed, then run the following to get the SDL development tools:

sudo apt install libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxi-dev libxinerama-dev libxss-dev libgl1-mesa-dev libdbus-1-dev libudev-dev libaudio-dev

After these are installed, you should be able to Build the Tempest and Breakout sample programs and run them.

Image

Image

Happy computing!
Please visit my Computer blog: https://davidf215.blogspot.com/

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

Re: BlitzMax OpenSource on COS2

Post by LeoNigro »

That is awesome.
Thank you David, for your most detailed instructions.
I'll include BlitzMax Basic in COS3 with the required libraries.
Image Commodore OS creator. Site Admin. Owns: C64, C128D(Sidekick64), A500, A1000(piStorm), C64x(i7)

davidf215
Posts: 12
Joined: Wed Dec 04, 2024 3:47 pm
Contact:

Re: BlitzMax OpenSource on COS2

Post by davidf215 »

LeoNigro wrote: Tue Dec 24, 2024 8:16 am That is awesome.
Thank you David, for your most detailed instructions.
I'll include BlitzMax Basic in COS3 with the required libraries.
That would be great!

I have discovered two problems with the BlitzMax editor. One problem is that it seems that large files do not entirely load. The editor will truncate the file for some reason. The other problem is that the editor puts a space instead of the underscore (_) character.

Using the Geany app, included in COS, is a way around these issues. The bmx file can then be compiled with the bmk terminal command. The bmk command is in the BlitzMax/bin subfolder.

** Edit Add **
After initially posting this, I eventually found out that the BlitzMax editor was truncating my bmx files due to some formating error in the file. The original bmx file was created on Microsoft Windows, so after deleting and retyping a few characters in Geany near where the truncation happened, this seems to enable the BlitzMax editor to load the bmx file properly.
Please visit my Computer blog: https://davidf215.blogspot.com/

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

Re: BlitzMax OpenSource on COS2

Post by LeoNigro »

So if you start your project in Commodore OS the file formatting won't occur right?
Does it allow you to theme the editor?

I haven't got to this stage yet as I put Commodore OS 3 together, but I can't wait to get this going.

So far it'll have Gambas 3 Basic, BASIC-256, sdlBASIC, and possibly a GWBASIC clone of some kind.
And that's before I even try to get CBM prg Studio(for C64 BASIC programming) working working fully with emulation debugging, which I know is going to be a pain as it is on the WINE/Windows side.
Oh, and I mustn't forget to look into what is possible regarding the Commander X16 BASIC.

Visual Studio Code can also work as a C/C++, Visual Basic, C#, Java and Javascript/Typescript and HTML editor if people are so inclined.
I'll have to check if there are any other useful extensions for BASIC or Amiga programming.

Just a few notes about Commodore OS that you may not be aware of.
If you maximise a window the transparency will disappear. Except for the terminal of course.
Also if you hold ALT and turn the mouse wheel you can change the transparency of any window.
Not to worry though, in COS3 I will make every window with "blitz" in the title automatically solid.

An app called Commodore OS Central is intended to have a section dedicated to programming manuals like BlitzMax.
Image Commodore OS creator. Site Admin. Owns: C64, C128D(Sidekick64), A500, A1000(piStorm), C64x(i7)

davidf215
Posts: 12
Joined: Wed Dec 04, 2024 3:47 pm
Contact:

Re: BlitzMax OpenSource on COS2

Post by davidf215 »

LeoNigro wrote: Fri Jan 03, 2025 10:31 am So if you start your project in Commodore OS the file formatting won't occur right?
Does it allow you to theme the editor?
The editor does format the file, but the underscore character displays as a space, which makes programs with the underscore character hard to read. The editor can be themed a little bit.
LeoNigro wrote: Fri Jan 03, 2025 10:31 am I haven't got to this stage yet as I put Commodore OS 3 together, but I can't wait to get this going.

So far it'll have Gambas 3 Basic, BASIC-256, sdlBASIC, and possibly a GWBASIC clone of some kind.
And that's before I even try to get CBM prg Studio(for C64 BASIC programming) working working fully with emulation debugging, which I know is going to be a pain as it is on the WINE/Windows side.
Oh, and I mustn't forget to look into what is possible regarding the Commander X16 BASIC.
These are good, too. I wrote a small Interactive Fiction game in GWBASIC on my old Gateway 2000 computer around 1990. The WINE implementation in COS2 is really good for me.
LeoNigro wrote: Fri Jan 03, 2025 10:31 am Visual Studio Code can also work as a C/C++, Visual Basic, C#, Java and Javascript/Typescript and HTML editor if people are so inclined.
I'll have to check if there are any other useful extensions for BASIC or Amiga programming.
Visual Studio on COS is great, too. All these options will enable developers and those interested in developing several options to chose from.
LeoNigro wrote: Fri Jan 03, 2025 10:31 am Just a few notes about Commodore OS that you may not be aware of.
If you maximise a window the transparency will disappear. Except for the terminal of course.
Also if you hold ALT and turn the mouse wheel you can change the transparency of any window.
Not to worry though, in COS3 I will make every window with "blitz" in the title automatically solid.
Cool, thanks for letting me know!
LeoNigro wrote: Fri Jan 03, 2025 10:31 am An app called Commodore OS Central is intended to have a section dedicated to programming manuals like BlitzMax.
What is the Commodore OS Central app? Is it like a Play Store/App Store type of app for Commodore OS?
Please visit my Computer blog: https://davidf215.blogspot.com/

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

Re: BlitzMax OpenSource on COS2

Post by LeoNigro »

What is the Commodore OS Central app? Is it like a Play Store/App Store type of app for Commodore OS?
We can make it whatever we want. It won't be populated on Commodore OS 3.0 launch.
I was thinking everything from an alternate app launcher to an app store, or something that can provide links to guidance, retro content and articles, manuals and videos.
I'll open a thread shortly about it as a place to discuss it.
It's a web based app so it can perform system functions if need be.
Image Commodore OS creator. Site Admin. Owns: C64, C128D(Sidekick64), A500, A1000(piStorm), C64x(i7)

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest