Zandronum Chat on our Discord Server Get the latest version: 3.2
Source Code

View Revisions: Issue #1158 All Revisions ] Back to Issue ]
Summary 0001158: ACS network variables
Revision 2012-10-30 23:56 by Dusk
Description This has been a little pet project of mine for a while. The idea is to make a standardized way of updating variable information from server to client instead of relying on hacks to call clientside ACS from the server to pass variable data. I've ended up using those hacks.. that stuff really gets REALLY messy, especially when you need to send stuff to newcomer clients.

So what's going on is that you declare a variable as net with:
net int x;

and then change its value in a script, and zandronum would update the clients with the new value. The values are checked every tic against the last values to keep bandwidth use minimal.

I've had the netcode in place for a while and just now got the compiler to stuff the netvar info into the object file. Now I'm piecing this together.

One little concern of mine is that right now you can also declare world and global vars as net. I'm not sure if it's a good idea, as one module could potentially declare a world/global var as net while another would not.. I don't think it'd be adding much anyway and the code would be a lot simpler without them. Would there be need for synchronized world/global vars? I know synced global vars would make GlobalVar/GlobalArray selectors of SBARINFO's DrawNumber actually usable online, but I can't think of anything besides that.

Naturally I'm planning to have this tested throughly with neurosphere when this is completed.
Revision 2012-10-30 23:30 by Dusk
Description This has been a little pet project of mine for a while. The idea is to make a standardized way of updating variable information from server to client instead of relying on hacks to call clientside ACS from the server to pass variable data. I've ended up using those hacks.. that stuff really gets REALLY messy, especially when you need to send stuff to newcomer clients.

So what's going on is that you declare a variable as net with:
net int x;

and then change its value in a script, and zandronum would update the clients with the new value. The values are checked every tic against the last values to keep bandwidth use minimal.

I've had the netcode in place for a while (but ZDoom's dumb ACS code makes it a little messy) and got the compiler to stuff the netvar info into the object file. Now I'm piecing this together.

One little concern of mine is that right now you can also declare world and global vars as net. I'm not sure if it's a good idea, as one module could potentially declare a world/global var as net while another would not.. I don't think it'd be adding much anyway and the code would be a lot simpler without them. Would there be need for synchronized world/global vars? I know synced global vars would make GlobalVar/GlobalArray selectors of SBARINFO's DrawNumber actually usable online, but I can't think of anything besides that.

Naturally I'm planning to have this tested throughly with neurosphere when this is completed.






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2025 MantisBT Team
Powered by Mantis Bugtracker