itch.io is community of indie game creators and players

Devlogs

Blitz3D V1.117 now available!

Blitz3D
A downloadable tool for Windows

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
    Aug 19, 2024
Download Blitz3D
Read comments (23)