Blitz3D V1.117 now available!


Blitz3D V1.117 is now available for download!

Blitz3D has had a new command added after 20+ years: 'Dialect'!

This new feature was inspired by the fact that I've had to spend quite a bit of time in Blitz3D lately, and have found a number of things I'd quite like to change as far as language syntax goes - one cosmetic, but the other more serious.

First up is the funky AmiBlitz syntax. If you're not used to Blitz3D (or even if you are!) some of my choices for syntax may seem a little weird. In particular, the choice of '.' for declaring variable type (ie: block.Block means 'block' is of type 'Block') and '\' for field access are a bit unusual. Both actually come from the AmiBlitz days and do actually have some logic to them: '.' is from the 'size/type' specifier used with 68K assembly, eg: 'move.b', 'add.w' etc. and '\' is of course a reference to directory separators, chosen long before I'd even seen MS DOS!

But I am much more used to ':' for 'type' and '.' for 'field' these days, and have been kind of itching to add support for this syntax via a special mode of some kind, but haven't been truly inspired into action because they *are* just cosmetic.

However, I ran into a way more serious issue with Blitz3D over the last week that has caused me considerable grief on several occasions: if you attempt to use a variable name Blitz3D has never seen before in an expression, Blitz3D will happily just create one out of thin air for you. I guess this is what all BASICs used to do, but boy is it a dumb idea. It effectively means you're better of sticking with memorizeing hard coded constants than attempting to use anything like 'enums', as the cost of mispelling a name can be high.

So after spending several hours tracking down a 'bug' which was simply me not remembering to update a recently changed 'enum' name and Blitz3D happily just using '0' for the enum value instead, I decided it was time to take action - and while I was at it, I could add support for ':' and '.' syntax too.

'Dialect name$' has to appear at the top of every file you want to use it in (ie: it isn't 'inherited' by includes) and name$ must be one of:

"classic" : Plain ol' Blitz3D, the default if you don't use Dialect.

"secure" : Classic Blitz3D, but attempting to use an undeclared variable name in expression will cause a compile time error.

"modern" : Secure Blitz3D, but with modern syntax.

SHA256 hash of Blitz3D-V1.117.zip:
67fb78780800799fc9757843498737d27299d84754960a7453b9de94c5821031

Bye!
Mark

Files

Blitz3D-V1.117.zip 25 MB
81 days ago

Get Blitz3D

Download NowName your own price

Comments

Log in with itch.io to leave a comment.

Awesome, thank you Mark!

I get a virus warning on Windows 11 for Blitz3D.exe:
Trojan:Script/Wacatac.F!ml(
https://www.microsoft.com/en-us/wdsi/threats/malware-encyclopedia-description?na...)

These are false positives (the Wacatac one esp. comes up a lot) and there is nothing I can do about them.

I have started posting hashcodes for all zip downloads though - bottom of the post. If you run certutil on the downloaded zip, eg:

cvertutil -hashfile blah.zip SHA256

...and it comes up with the same SHA256 number, then the file you have received is at least the file I sent, meaning at least it hasn't been interferred with en-route.

Past that, it's purely up to you whether you trust that I sent a 'clean' file in the first place or not.

You can also send the file to 'Virus Total' online but that does sometimes come back with a few false positives too - esp. through the 'AI' virus checkers.

Bye,
Mark

(+1)

Power Full.

Mark, any chance Blitz3d could ever come to Mac? Using metal or something, or not being in the know, there's probably directX on there too by now.

> Mark, any chance Blitz3d could ever come to Mac?

Probably not.

DirectX never made it to Macos - ionstead they came up with their own 3d API 'Metal' which is similar to 'Direct3D'.

LibSGD *is* coming to Mac though. LibSGD is a simple gamedev library for use with a bunch of languages and it already works with Blitz3D (which is largely why I'm back working on Blitz3D in the first place) but there are no plans to convert Blitz3D to macos.

But I would like to do another language one day, but only if I ever feel like I have something new to contribute again, so while Blitz3D will never make it to MacOS, who knows what might one day.

(2 edits)

BlitzBasic is a beautiful computer language, it also belongs to the masses. New features make it better.  Thanks.

(+1)

That’s neat!

As of now, the modern : syntax for types clashes a bit with the : syntax for having multiple commands on a line if a command or assignment ends in a variable.

Print "hello" : Print "world" ; Output: "hello world"
                              ; works as "hello" is no variable
Local x$ = "hello"
Print x : Print "world"       ; Parser error: “Expecting end-of-file”.
Local x$ = "hello", y$ = "world"
Print x : Print y             ; Compiler error: “Type "print" not found“.

It can be solved by supplying types or parenthesis:

Local x$ = "hello", y$ = "world"
Print x$ : Print y           ; works!
Print(x) : Print y           ; works!

This problem would not be necessary in the syntax: The feature to declare typing information for variables appearing in arguments only makes sense in a context where the variable has not been properly introduced through a definition or assignment. But this situation is precisely the one prohibited by the new secure/modern dialects.

(+1)

Man this is awesome. After trying out Blitz3D again after 20 years,  those two things came also into my mind. \ and . operators are pretty weird and no warning on usage of an undeclared variable is just too error prone.

Really happy to see these changes after 20 years.

(+1)

Very good Mark!

Thanks!

(+1)

:)

Does it works full with opengl these days? 

(+2)

Nope, although there's a version in the works that will support d3d12, d3d11 and vulkan.

Wow!

link? ;)

You mean good ol' Blitz3D with Vulkan backend, or do you mean usage of LibSGD with Blitz3D?

(1 edit)

Blitz3D + LibSGD.

"although there's a version in the works that will support d3d12, d3d11 and vulkan."

My brain just melted.

This is the LibSGD library, more info here:

https://blitzresearch.itch.io/blitz3d/devlog/688259/libsgd-announcement

It's basically a replacement 'runtime.dll' that provides a different, more advanced set of 3d functions to Blitz3D.

It's taking longer than I would have liked, but it's getting there. I am definitely aiming for V1.0 before the end of the year.

(+1)

Not bad) What about C#/Java like syntax?)

(+1)

I went down that road with Monkey!

I just download it to give it a try !