zt-bcc (Zeta Group BCC) is a continuation of Positron's BCC with bugfixes and some new features, along with proper SLADE support.
It's an alternative ACS code compiler for ports supporting ZDoom ACS, featuring many extensions over vanilla ACS, but still keeping almost 100% compatibility with it, to make projects easy to port over and take advantage of all the new features.
Some of the features over regular ACS include:
*Structures
*Enumerations
*Namespaces
*Preprocessor
*Strong types
*References to objects and functions
*Block scoping
*Optional function parameters
*Logical-AND (&&) and Logical-OR (||) are short-circuited
*foreach loop
*Nested functions
*Message-building blocks, for more dynamic prints and text formatting
zt-bcc now has libbcs, a standard library of it's own. This currently provides malloc/realloc/free, dynamic array functions, C-style printf functions, and a whole associative array/map template.
If you find any bugs, please post about them here or on the Github repository for the project.
Check the project wiki for documentation on zt-bcc's features and usage.
Download: https://github.com/zeta-group/zt-bcc/re ... .0-alpha.5
Source code: https://github.com/zeta-group/zt-bcc
zt-bcc: Maintained BCC fork - v0.10.0 alpha 5
Forum rules
The Projects forums are ONLY for YOUR PROJECTS! If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.
Got a cool project idea but nothing else? Put it in the project ideas thread instead!
Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.
Please read the full rules for more details.
The Projects forums are ONLY for YOUR PROJECTS! If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.
Got a cool project idea but nothing else? Put it in the project ideas thread instead!
Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.
Please read the full rules for more details.
-
- Posts: 825
- Joined: Sun Mar 11, 2018 4:15 pm
- Location: Venezuela
zt-bcc: Maintained BCC fork - v0.10.0 alpha 5
Last edited by TDRR on Sat Mar 08, 2025 7:36 pm, edited 5 times in total.
-
- Posts: 825
- Joined: Sun Mar 11, 2018 4:15 pm
- Location: Venezuela
Re: zt-bcc: Maintained BCC fork - v0.9.0
This is zt-bcc, a fork of BCC, that supersedes BCC-SLADE since it accomplishes the same purpose better, and then does some more.
Changes compared to BCC 0.8.0:
*Added #pragma raw define on/off, which allows enabling/disabling C-like preprocessor macros.
*Added #pragma raw include on/off, which allows enabling/disabling preprocessor include (can appear at almost any point in the file).
*Preprocessor directives are now case insensitive like the rest of the language.
*Fixed broken runtime assert message (was supposed to be tinted red originally, but the code for it was buggy).
*zt-bcc can now be used with SLADE to compile BCS code. Doom Builders should work too, but currently untested.
*Removed ACS/ACS95 compilation modes. If needed, BCC 0.8 or ACC can still be used for this purpose.
*zcommon.bcs should be up to date with all new Zandronum, GZDoom and K8Vavoom functions.
Source changes:
*Removed all non-standard functions (hopefully).
*Fixed all warnings, at least when compiling under MSYS2 with MinGW.
Changes compared to BCC 0.8.0:
*Added #pragma raw define on/off, which allows enabling/disabling C-like preprocessor macros.
*Added #pragma raw include on/off, which allows enabling/disabling preprocessor include (can appear at almost any point in the file).
*Preprocessor directives are now case insensitive like the rest of the language.
*Fixed broken runtime assert message (was supposed to be tinted red originally, but the code for it was buggy).
*zt-bcc can now be used with SLADE to compile BCS code. Doom Builders should work too, but currently untested.
*Removed ACS/ACS95 compilation modes. If needed, BCC 0.8 or ACC can still be used for this purpose.
*zcommon.bcs should be up to date with all new Zandronum, GZDoom and K8Vavoom functions.
Source changes:
*Removed all non-standard functions (hopefully).
*Fixed all warnings, at least when compiling under MSYS2 with MinGW.
-
- Posts: 825
- Joined: Sun Mar 11, 2018 4:15 pm
- Location: Venezuela
Re: zt-bcc: Maintained BCC fork - v0.10.0 alpha 1
An alpha release. I still intend to do more with this before a full release, but here's a preview of the changes so far.
Changelog:
-Added libbcs.bcs. Currently provides malloc/realloc/free, dynamic array and C-style printf functions.
-Added zcommon.acs, which simply imports zcommon.bcs.
-Nullable array/struct references can now be cast to/from int, allowing some rudimentary pointer arithmetic.
-"::" is now the namespace separator. [Positron, for BCC]
-Added "lengthof()" operator. [Positron, for BCC]
-Deprecated ".length()" array/string member functions. [Positron, for BCC]
-Deprecated "." as namespace separator. [Positron, for BCC]
-"lengthof()" can take in structure references now.
-Diagnostic messages are now written to stderr instead of stdout.
Changelog:
-Added libbcs.bcs. Currently provides malloc/realloc/free, dynamic array and C-style printf functions.
-Added zcommon.acs, which simply imports zcommon.bcs.
-Nullable array/struct references can now be cast to/from int, allowing some rudimentary pointer arithmetic.
-"::" is now the namespace separator. [Positron, for BCC]
-Added "lengthof()" operator. [Positron, for BCC]
-Deprecated ".length()" array/string member functions. [Positron, for BCC]
-Deprecated "." as namespace separator. [Positron, for BCC]
-"lengthof()" can take in structure references now.
-Diagnostic messages are now written to stderr instead of stdout.
-
- Posts: 825
- Joined: Sun Mar 11, 2018 4:15 pm
- Location: Venezuela
Re: zt-bcc: Maintained BCC fork - v0.10.0 alpha 2
Another alpha release. This has a very big focus on references/pointers and brings zt-bcc more up to par with GDCC in that aspect, including great benefits like using world/global arrays for dynamic memory allocation, interoperability with modules using pointers written with GDCC and more flexibility improvements like that.
-Added pointer types, same syntax as references but using `*` instead of `&`/`?`.
-Added support for references/pointers into world/global arrays. Example: (`int[] world:10* test;`)
-Added `void` array nullable reference/pointer type. This type can be implicitly converted to any other reference/pointer type.
-Added `internal` keyword to replace current `private`.
-Added `PTR_SPC` macro to libbcs. When defined before including libbcs, it's pointers and functions will use the world/global array specified. Example: (`#define PTR_SPC global:42`).
-Added `alloca` to libbcs, which will automatically free the memory after one tic.
-libbcs `malloc` will now return `0` when appropriate.
-libbcs memory allocation will now display an error when out of memory.
-libbcs local heap size is 4x bigger by default (65536 words).
-libbcs errors/warnings are now colored.
-Deprecated `private` keyword for object visibility (except when applied to namespaces).
-Added pointer types, same syntax as references but using `*` instead of `&`/`?`.
-Added support for references/pointers into world/global arrays. Example: (`int[] world:10* test;`)
-Added `void` array nullable reference/pointer type. This type can be implicitly converted to any other reference/pointer type.
-Added `internal` keyword to replace current `private`.
-Added `PTR_SPC` macro to libbcs. When defined before including libbcs, it's pointers and functions will use the world/global array specified. Example: (`#define PTR_SPC global:42`).
-Added `alloca` to libbcs, which will automatically free the memory after one tic.
-libbcs `malloc` will now return `0` when appropriate.
-libbcs memory allocation will now display an error when out of memory.
-libbcs local heap size is 4x bigger by default (65536 words).
-libbcs errors/warnings are now colored.
-Deprecated `private` keyword for object visibility (except when applied to namespaces).
-
- Posts: 2053
- Joined: Mon Aug 11, 2003 1:50 pm
- Preferred Pronouns: He/Him
- Location: East Suffolk (UK)
Re: zt-bcc: Maintained BCC fork - v0.10.0 alpha 2
I have to say this is incredibly cool
But I think the lack of replies is probably because its too advanced for most people to use; for everything but map manipulation we have ZScript and there's a lot of that which you can do with ZScript, especially as you can now create your own sector effectors, in the style of Duke 3D's, to add to those already in the engine. For everything else, ACS is probably sufficient and those like me with C and C# experience feel right at home in ZScript and ACS, and don't really need a C++ modeled language. If years ago, RH had extended ACS into actor control instead of developing ZScript, this would have been truly awesome.


But I think the lack of replies is probably because its too advanced for most people to use; for everything but map manipulation we have ZScript and there's a lot of that which you can do with ZScript, especially as you can now create your own sector effectors, in the style of Duke 3D's, to add to those already in the engine. For everything else, ACS is probably sufficient and those like me with C and C# experience feel right at home in ZScript and ACS, and don't really need a C++ modeled language. If years ago, RH had extended ACS into actor control instead of developing ZScript, this would have been truly awesome.
-
- Posts: 825
- Joined: Sun Mar 11, 2018 4:15 pm
- Location: Venezuela
Re: zt-bcc: Maintained BCC fork - v0.10.0 alpha 2
I appreciate your observation, but I think it's kinda missing the point. This isn't really meant for GZDoom, even though I do make sure to keep compatibility with it whenever possible in this fork. Yes, GZDoom does have ZScript. However, Zandronum, Eternity, K8Vavoom*, and likely other ports, do not, but they have perfectly good ZDACS interpreters that can use compilers like this one and DavidPH's excellent GDCC. I don't even use GZDoom myself, but I'm posting the project here because it may still be useful, and there's people that develop mods for other ports here (and even post them here as well).MartinHowe wrote: ↑Mon Dec 02, 2024 5:40 pm I have to say this is incredibly cool![]()
![]()
But I think the lack of replies is probably because its too advanced for most people to use; for everything but map manipulation we have ZScript and there's a lot of that which you can do with ZScript, especially as you can now create your own sector effectors, in the style of Duke 3D's, to add to those already in the engine. For everything else, ACS is probably sufficient and those like me with C and C# experience feel right at home in ZScript and ACS, and don't really need a C++ modeled language.
As an aside, yes, plain old ACS is probably enough for map scripting. I still do find myself missing type safety, enumerations, foreach loops and the automatic optimizations alternative compilers can give, even in those simple cases. It just makes writing code easier and faster, and BCC intends to be 100% compatible with plain old ACS, so there's a quick and painless upgrade path for anyone that'd like to start using it.
*yes, K8Vavoom has a ZScript-like language, and that's from long before ZScript even came to be, but the developer wants people to use DECORATE+ACS since they're more well documented and standardized.
-
- Posts: 2053
- Joined: Mon Aug 11, 2003 1:50 pm
- Preferred Pronouns: He/Him
- Location: East Suffolk (UK)
Re: zt-bcc: Maintained BCC fork - v0.10.0 alpha 2
Good point. I'd completely forgotten about MP as I only play single, so yeah, Zandronum; for other ports that can run ZDoom ACS code, I guess this gives much of the power of ZScript. It's hard to forget that despite having virtually taken over the post limit-removing world, there are other options than GZDoom.
-
- Posts: 825
- Joined: Sun Mar 11, 2018 4:15 pm
- Location: Venezuela
Re: zt-bcc: Maintained BCC fork - v0.10.0 alpha 2
It's alright. That's something that over the years I've come to realize is, unfortunately, quite common.
-
- Posts: 825
- Joined: Sun Mar 11, 2018 4:15 pm
- Location: Venezuela
Re: zt-bcc: Maintained BCC fork - v0.10.0 alpha 3
A quick fix release. Better late than never.
Fixed broken module-scope struct/array reference type checking (Basically, & references were completely unusable unless they pointed to world/global space, as the equality check would always fail).
Fixed broken module-scope struct/array reference type checking (Basically, & references were completely unusable unless they pointed to world/global space, as the equality check would always fail).
-
- Posts: 825
- Joined: Sun Mar 11, 2018 4:15 pm
- Location: Venezuela
Re: zt-bcc: Maintained BCC fork - v0.10.0 alpha 5
Two updates I forgot to post here.
Another release dedicated primarily to fixes, but there's also a new feature. Sorry for the rather unstable code I churned out earlier.
-Added #pragma pointer_space. Allows defining a default address space for pointers/references (ex: #pragma pointer_space global 10).
-Removed PTR_SPC define from libbcs.
-Fix question mark property not being initialized in some cases (resulted in random errors involving nullable reference type checks).
-Fix broken array type reference check (would cause perfectly matching reference types to error out, and the inverse).
-Fix void array references not being implicitly converted to structure references.
Internal changes:
-Remove unused member in ref_struct.
I also didn't forget to update the internal version string this time, so "zt-bcc -version" will properly output "0.10.0-alpha-4". Yay.
The wiki received some clean up and updates as well, and so did README.md. They should be up to date with current zt-bcc, so I recommend checking them out if you're interested.
https://github.com/zeta-group/zt-bcc/wiki
If you want to stay as up to date as possible, please follow the Github repository, or check the thread over at the Zandronum forums: https://zandronum.com/forum/viewtopic.php?f=58&t=10336More than just fixes, we finally have some more new features, and even better... zcommon.bcs is up to date with current Zandronum 3.2! I hope you all enjoy and get some good use out of it.
* Updated zcommon.bcs to the latest Zandronum 3.2 functions and definitions.
* Added `module` as one of the address spaces you can specify for pointers, which is normally the default without `#pragma pointer_space`.
* Added `memcmp` to libbcs, works much like C `memcmp.` Useful for raw structure/array comparisons.
* Inlined and optimized all code for the printf-like functions in libbcs, should be faster now.
* libbcs map template definition now takes a compare function for keys. Current options are `LIBBCS_SIMPLE_CMP` and `LIBBCS_STRING_CMP`.
* Numerous fixes to the map template in libbcs, should work reliably now.
* Inline ASM lines must now end in semicolons rather than line breaks.
* Non-private reference initialization warning should only occur for module references now.
* Fixed code for accessing world/global references instead generating instructions for accessing module storage in some cases.
* Fixed reference type checking. Again.