bcc (An ACS Compiler)

Maps, modifications, add-ons, projects, and other releases for Zandronum. Also includes announcers.
Positron
New User
Posts: 7
Joined: Thu Jun 12, 2014 9:42 am

RE: bcc (An ACS Compiler)

#21

Post by Positron » Thu Jul 10, 2014 1:44 am

Thanks for helping out here, Monsterovich.
Nash wrote: Hi Positron, stumbled upon this project on the ZDoom forums and I must say I am very excited about BCC. Finally, there are some direly-needed features I desperately need (namely structs and enums) in an ACC compiler and the best thing of all (well, my current impression at least) is that BCC looks like it's pretty much ACC with extra features "tacked on" (as awesome as the other variants of ACC compilers available out there, I just cannot migrate because my ACS codebase would require heavy porting work to adhere to these compilers' vastly different syntax). So it seems perfect for my purposes.

(BTW, I don't mean "tacked on" as a bad term :) - maybe it's not the best word to use in this situation but I am actually happy that BCC appears to remain mostly compatible with normal ACC)

The projects I am working on contain a lot of code and I am pretty deep in the production timeline, so I just cannot afford to be set back to "port" my code to a compiler that is so syntactically different... BCC however, looks like I won't have to deal with that stuff!

I don't think I'm using any ZDoom-specific functions (ie something that won't build for Zandronum ACC)... I guess if there's something that won't build, I could run a diff between BCC and ACC and if the changes are small, possibly re-introduce said ZDoom-specific function and make my personal fork of BCC...

I haven't actually tested BCC yet, but I'm going to have to create a branch for my project to make sure my ACS codebase builds perfectly with BCC and possibly fix any tiny errors that might pop up... and then on to rigorous testing of my game to make sure every feature remains working. ;) Once that's done, I'm going to do some heavy re-write to my inventory system (second video) to make use of structs (you don't want to know how I hacked ACC to make this... using multiple global arrays and synchronizing them together to support the data struture I need for my items - UGLY!).

This went on longer than it should have - sorry you had to read all that. ;D Just wanted to say thanks for putting this out... can't wait to test BCC!

EDIT: Upon looking at BCC's source... this isn't really based off ZDoom's current version of ACC, is it? Hmm. That might be problematic for me then... I'm using ZDoom's ACC and heavily rely on it (for example, I use named scripts exclusively). I'm not sure what are the differences between Zandro's ACC and ZDoom's ACC but I imagine the gap to be big? Oh well - I'll get to test and see if I run into any problems.
phpBB [video]
The [video] tag is deprecated, please use the [media] tag
phpBB [video]
The [video] tag is deprecated, please use the [media] tag
Hello, Nash. Good stuff in those videos, man.

With bcc, I tried to keep it mostly compatible with existing ACS code. There are differences, like block-level scoping and short-circuit evaluation for the logical operators. I feel like these things were important to implement than having the older behavior. So keep these in mind if you plan to use this compiler.
Nash wrote: EDIT: Upon looking at BCC's source... this isn't really based off ZDoom's current version of ACC, is it? Hmm. That might be problematic for me then... I'm using ZDoom's ACC and heavily rely on it (for example, I use named scripts exclusively). I'm not sure what are the differences between Zandro's ACC and ZDoom's ACC but I imagine the gap to be big? Oh well - I'll get to test and see if I run into any problems.
The compiler was started from scratch. It's a new code base. There are still things to clean up and fix, which I'm currently doing.

I keep the compiler updated to work with the features of Zandronum. It's the port I play on and am more familiar with. Zandronum is behind on ZDoom features. It doesn't have named scripts yet, so I haven't implemented them into bcc yet.
ZzZombo wrote: For instance, named scripts DO work. I'm not sure if you wanted to know anything else.
You can use a string instead of an integer as the script number, but it's not the same. The script number will be whatever the index of the string is. If you generate the string dynamically using StrParam() and use this string to execute your script, it won't work because the index will be different, even though the string content might be the same. If you get a string from another library and use that, it might not work because the other library might have the string indexes allocated differently. These also apply when using strings as cases inside a switch statement.

MidnightWolf
New User
Posts: 7
Joined: Fri Jul 20, 2012 7:13 pm

RE: bcc (An ACS Compiler)

#22

Post by MidnightWolf » Wed Jul 16, 2014 8:59 am

Thanks for this great stuff. While I understand your goal is to be compatible with Zandronum, I would be really happy if you added Zdaemon's two team score functions described here: http://downloads.zdaemon.org/zdaemon.acs

These are Zdaemon's only exclusive ACS functions and they are very unlikely to change in the future.
Zdaemon is behind Zandronum in functionality, and scripters there could benefit from BCC as well. I imagine it is not too big effort to add these functions yet it would make a big difference for modder folks over Zdaemon.

Thanks in advance :smile:

User avatar
Slim
Zandrone
Posts: 1112
Joined: Sat Mar 16, 2013 7:11 am
Location: Zero Space
Clan: Can't fit it in here
Clan Tag: -=FSR=-
Contact:

RE: bcc (An ACS Compiler)

#23

Post by Slim » Wed Jul 16, 2014 9:11 am

MidnightWolf wrote: Thanks for this great stuff. While I understand your goal is to be compatible with Zandronum, I would be really happy if you added Zdaemon's two team score functions described here: http://downloads.zdaemon.org/zdaemon.acs

These are Zdaemon's only exclusive ACS functions and they are very unlikely to change in the future.
Zdaemon is behind Zandronum in functionality, and scripters there could benefit from BCC as well. I imagine it is not too big effort to add these functions yet it would make a big difference for modder folks over Zdaemon.

Thanks in advance :smile:
Kinda curious as to why someone'd be asking someone who made something for Zand make it also work with ZDaemon, helping a port unrelated to this one is like asking a nieghbor to leave their door open to robbers so they can break in.
Image

"Your childish antics grow tiring. If you dare to fight me, then I accept your challenge: Anytime, anywhere." - Zero, Megaman X5
Spoiler: Quotes (Open)
5:54 PM - Slim: you're complaining about something so small that
5:54 PM - Lance: so? we do that all the time
5:55 PM - Lance: we're a bunch of losers complaining at a bar minus the bar
Spoiler: Galactus tried evading (Open)
Image

MidnightWolf
New User
Posts: 7
Joined: Fri Jul 20, 2012 7:13 pm

RE: bcc (An ACS Compiler)

#24

Post by MidnightWolf » Wed Jul 16, 2014 9:37 am

Robber parallelism is kinda wrong to be used here (idk how that conclusion even remotely related). I never understood the hate between Zandronum and Zdaemon, we are doom players after all, just our tastes differ a bit.

This is an ACS compiler, so any port using ACS is related at least to some extent (with that said, ZDaemon). The author wants to keep up with Zandro features, which does not exclude Zdaemon because it is behind Zandronum.
These two functions are just minor differences.

Back on topic, all I asked was the addition of two functions which does not harm Zandronum or BCC in any way, but would make the life easier for folks over ZDaemon too. Let the BCC author decide the fate of this request IMO.
Last edited by MidnightWolf on Wed Jul 16, 2014 9:41 am, edited 1 time in total.

Wirtualnosc
Forum Regular
Posts: 143
Joined: Mon Jun 04, 2012 2:01 pm

RE: bcc (An ACS Compiler)

#25

Post by Wirtualnosc » Wed Jul 16, 2014 9:49 am

Can't these be added through std.acs already?
[20:19] <+IdeIdoom> join #VGL
[20:19] <+IdeIdoom> oh fuck
[20:19] <+IdeIdoom> I FORGOT the /
[20:19] <+IdeIdoom> biggest fail

MidnightWolf
New User
Posts: 7
Joined: Fri Jul 20, 2012 7:13 pm

RE: bcc (An ACS Compiler)

#26

Post by MidnightWolf » Wed Jul 16, 2014 9:53 am

I tried that already, Zdaemon's team score functions belong to the internal functions section in theory (their codes are negative numbers), yet the game gives unknown p-code error when I try to execute a script containing the functions. I believe BCC support for functions is hardcoded, but correct me if I am wrong.

EDIT: Nevermind, I was dumb, std should look like this:

//Extension functions
int GetTeamScore( int ) -= 19620;
void SetTeamScore( int, int ) -= 19621;
Last edited by MidnightWolf on Wed Jul 16, 2014 9:59 am, edited 1 time in total.

RaveYard
 
Posts: 52
Joined: Wed Jun 27, 2012 1:44 pm

RE: bcc (An ACS Compiler)

#27

Post by RaveYard » Sun Jul 20, 2014 11:26 am

THIS IS GREAT! :razz:
The best thing about this is, that it is pretty much like ACS
but I still kinda wish there was more to this. :redface:

Like: classes, pointers, function pointers..
but the most important one is ability to use struct as return value and parameter
My Projects:
[Horror] Ghosted 2 - version 2 - v2.1.0 : Here!

User avatar
Ivan
Addicted to Zandronum
Posts: 2226
Joined: Mon Jun 04, 2012 5:38 pm
Location: Omnipresent

RE: bcc (An ACS Compiler)

#28

Post by Ivan » Fri Aug 15, 2014 4:03 pm

I think there is a problem with HudMessages with BCC. I noticed that if you have a hudmessage with the flag hudmsg_log, it will cause weird things to happen. For example, I have a hudmsg_fadeinout that works properly without the hudmsg_log flag, but with it added it stays on screen permanently. Doesn't happen with other compilers.
=== RAGNAROK DM ON ... uh... dead forever? ===
=== ALWAYS BET ON ... uh... dead forever? ===
=== Who wanta sum wang? ===
=== Death and Decay - A new Monster/Weapon replacer ===

ZzZombo
Forum Regular
Posts: 323
Joined: Mon Jun 11, 2012 12:11 pm
Location: Ravenholm

RE: bcc (An ACS Compiler)

#29

Post by ZzZombo » Sat Aug 16, 2014 8:04 am

Can't confirm, was using for a few hours a HudMessage() w/ both these flags and no problems.
QZRcon - Qt-based tool for Zandronum/Skulltag servers!
#grandvoid funny stats

Positron
New User
Posts: 7
Joined: Thu Jun 12, 2014 9:42 am

RE: bcc (An ACS Compiler)

#30

Post by Positron » Mon Aug 18, 2014 5:09 am

I uploaded new binaries of the compiler. Changes include:

  • Fixed: fixed-point number literals not being properly converted from their textual representation in some instances
  • Updated names of database functions
  • Added ZDaemon functions provided by MidnightWolf
Links:
32-bit (Click `Raw` to download)
64-bit

I couldn't quite figure out the issue you might have, Ivan. Doing some experimenting, I noticed that sometimes a fixed-point number literal will not be converted properly to a numeric value. I fixed this bug. Maybe this had something to do with your problem. Please give the new binary a try to see if it fixes that.

User avatar
Ivan
Addicted to Zandronum
Posts: 2226
Joined: Mon Jun 04, 2012 5:38 pm
Location: Omnipresent

RE: bcc (An ACS Compiler)

#31

Post by Ivan » Mon Aug 18, 2014 10:54 am

Now, it doesn't stay forever however somehow the hudmessages do not fadeinout properly.

Code: Select all

// Save the stuff to the console
Script 988 (int num, int type) CLIENTSIDE
{
	if(ConsolePlayerNumber() != PlayerNumber())
	  Terminate;
	SetFont("BIGFONT");
	if(!type)
	{
		HudMessage(s:UpgradeNames[num]; HUDMSG_FADEINOUT | HUDMSG_LOG, UPGRADETEXTID, -1, 0.5, 0.15, 2.0, 0.5, 0.5);
//		Log(s:UpgradeNames[num]);
	}
	else
		Log(s:RewardTextBot[num]);
}
=== RAGNAROK DM ON ... uh... dead forever? ===
=== ALWAYS BET ON ... uh... dead forever? ===
=== Who wanta sum wang? ===
=== Death and Decay - A new Monster/Weapon replacer ===

Positron
New User
Posts: 7
Joined: Thu Jun 12, 2014 9:42 am

RE: bcc (An ACS Compiler)

#32

Post by Positron » Mon Aug 18, 2014 5:42 pm

Ivan wrote: Now, it doesn't stay forever however somehow the hudmessages do not fadeinout properly.

Code: Select all

// Save the stuff to the console
Script 988 (int num, int type) CLIENTSIDE
{
	if(ConsolePlayerNumber() != PlayerNumber())
	  Terminate;
	SetFont("BIGFONT");
	if(!type)
	{
		HudMessage(s:UpgradeNames[num]; HUDMSG_FADEINOUT | HUDMSG_LOG, UPGRADETEXTID, -1, 0.5, 0.15, 2.0, 0.5, 0.5);
//		Log(s:UpgradeNames[num]);
	}
	else
		Log(s:RewardTextBot[num]);
}
What do you mean exactly by they don't fadeinout properly? I compiled your code, filling in the missing code where necessary, with both acc and bcc. Both compilers generate similar output. The small differences are in optimizations. For example, bcc evaluates HUDMSG_FADEINOUT | HUDMSG_LOG at compile-time instead of at run-time like instructed by acc. I don't think these optimizations have something to do with your problem.

User avatar
Ivan
Addicted to Zandronum
Posts: 2226
Joined: Mon Jun 04, 2012 5:38 pm
Location: Omnipresent

RE: bcc (An ACS Compiler)

#33

Post by Ivan » Mon Aug 18, 2014 6:30 pm

Like, it doesn't fadein and fadeout, it instantly shows.
=== RAGNAROK DM ON ... uh... dead forever? ===
=== ALWAYS BET ON ... uh... dead forever? ===
=== Who wanta sum wang? ===
=== Death and Decay - A new Monster/Weapon replacer ===

Positron
New User
Posts: 7
Joined: Thu Jun 12, 2014 9:42 am

RE: bcc (An ACS Compiler)

#34

Post by Positron » Tue Aug 19, 2014 2:33 am

Fixed a bug involving hexadecimal literals. Hopefully this fixes your problem, Ivan.

Download links:
Windows 32-bit (Click Raw to download)
Windows 64-bit

User avatar
Ivan
Addicted to Zandronum
Posts: 2226
Joined: Mon Jun 04, 2012 5:38 pm
Location: Omnipresent

RE: bcc (An ACS Compiler)

#35

Post by Ivan » Tue Aug 19, 2014 12:48 pm

Sadly it did not. Weird thing is it seems to work as intended on my end with the normal compiler for some reason.
=== RAGNAROK DM ON ... uh... dead forever? ===
=== ALWAYS BET ON ... uh... dead forever? ===
=== Who wanta sum wang? ===
=== Death and Decay - A new Monster/Weapon replacer ===

Positron
New User
Posts: 7
Joined: Thu Jun 12, 2014 9:42 am

RE: bcc (An ACS Compiler)

#36

Post by Positron » Tue Aug 19, 2014 4:06 pm

That sucks, man. May you please paste the code, enough so it compiles without errors, and also upload the object file? I want to examine the object file for any anomalies.

ZzZombo
Forum Regular
Posts: 323
Joined: Mon Jun 11, 2012 12:11 pm
Location: Ravenholm

RE: bcc (An ACS Compiler)

#37

Post by ZzZombo » Tue Sep 01, 2015 2:26 pm

Can somebody make a binary from the latest commit to date, please? I really hope on Monsterovich here, BTW ;).
QZRcon - Qt-based tool for Zandronum/Skulltag servers!
#grandvoid funny stats

User avatar
Monsterovich
Forum Regular
Posts: 343
Joined: Sun Jun 17, 2012 5:46 pm

RE: bcc (An ACS Compiler)

#38

Post by Monsterovich » Tue Sep 01, 2015 2:58 pm

ZzZombo wrote: Can somebody make a binary from the latest commit to date, please? I really hope on Monsterovich here, BTW ;).
https://github.com/Monsterovich/bcc/blo ... 01_x86.zip

ZzZombo
Forum Regular
Posts: 323
Joined: Mon Jun 11, 2012 12:11 pm
Location: Ravenholm

RE: bcc (An ACS Compiler)

#39

Post by ZzZombo » Wed Sep 02, 2015 4:34 am

Thanks!
QZRcon - Qt-based tool for Zandronum/Skulltag servers!
#grandvoid funny stats

User avatar
gato606
New User
Posts: 3
Joined: Sun Jun 04, 2017 2:23 am
Location: Colombia
Contact:

Re: RE: bcc (An ACS Compiler)

#40

Post by gato606 » Sun Jun 04, 2017 2:25 am

MazterQyoun-ae wrote:Doubt anyone needs these, but here you have: Macintosh Intel (i386 and x86_64) binaries:
https://www.dropbox.com/s/r8vrxmduywuxr ... .06.15.dmg

Linux and FreeBSD binaries coming soon (of course if someone won't be faster than me).

Keep in mind that these binaries are nohow official, thus Positron takes absolutely no any responsibility for them. I do though.
No Linux version yet?? Boy... that's sad :sadface:
I will have to wait then

Post Reply