C-Sciipt Settable d3d_antialias?

Posted By: Ichiro

C-Sciipt Settable d3d_antialias? - 03/03/09 20:55

Howdy. Any chance we can get a settable d3d_antialias in C-Script? I realize that C-Script is quickly going the way of the dinosaurs, but it'd be nice if our legacy code could take advantage of this new feature.

Thanks.
Posted By: jcl

Re: C-Sciipt Settable d3d_antialias? - 03/04/09 08:47

Redefining the variable should work for d3d_antialias. Have you tried

var d3d_antialias = 4;

outside a function?
Posted By: Ichiro

Re: C-Sciipt Settable d3d_antialias? - 03/04/09 17:53

Yeah, that's what we do now. However, I'm not sure there's a way to allow our players to set the level of antialiasing this way (e.g., in a settings menu)?
Posted By: Emre

Re: C-Sciipt Settable d3d_antialias? - 03/04/09 18:40

Hello Ichiro. My english is really bad. But if i understand your problem, i can help you.
if you use external menu(external exe files)and file_open_read for antialias variable, players can set the level of antialiasing.

you need ifdef for main.wdl;

Html:
ifndef aa_9;	
ifelse; //aa_9 ise
	var d3d_antialias=9;
	function main()
	{
		
		
	}
endif;

ifndef aa_4;	
ifelse; //aa_4 ise
	var d3d_antialias=4;
	function main()
	{
		
		
	}
endif;

ifndef aa_1;	
ifelse; //aa_1 ise
	var d3d_antialias=1;
	function main()
	{
		
		
	}
endif;
ifndef aa_0;	
ifelse; //aa_1 ise
	var d3d_antialias=0;
	function main()
	{
		
		
	}
endif;


end external settings file codes;
Html:
function start_func()
{

	if(antialias_var==0)
	{
		exec("..\\game.exe"," -d aa_0");
	}
	if(antialias_var==1)
	{
		exec("..\\game.exe","-d aa_1");
	}
	if(antialias_var==4)
	{
		exec("..\\game.exe"," -d aa_4");
	}
	if(antialias_var==9)
	{
		exec("..\\game.exe"," -d aa_9");
	}
	exit;
}


Like this;

Posted By: Ichiro

Re: C-Sciipt Settable d3d_antialias? - 03/04/09 18:50

Hi Emre,

Thanks very much for taking the time to share the workaround! I still would love for players to be able to set the antialiasing level within the game (publishers such as Valve/Steam, Reflexive, etc. have wrappers that don't play nicely with multiple .exes or command line arguments) -- however, this looks like it'll work in a pinch. smile

Thank you.
Posted By: Cowabanga

Re: C-Sciipt Settable d3d_antialias? - 03/04/09 19:55

Originally Posted By: Ichiro
(publishers such as Valve/Steam, Reflexive, etc)


Advice: Do not put your game on Reflexive.
Because it's easy to hack games on Reflexive.

When you're publishing your game in Reflexive. They'll ask you to send the FULL GAME. And they'll put a trial function.

And everyone can hack it. That's the problem.
Posted By: Ichiro

Re: C-Sciipt Settable d3d_antialias? - 03/04/09 21:25

Yeah; it comes down to a numbers game for us -- the revenue stream we gain from a particular portal might outweigh the loss in potential sales from piracy. Given that Wonderful's already available as a torrent, I'm not sure what we'd lose.

Either way, with Reflexive, I'm hoping it's worth it -- our contact point there has been their Director of Marketing, Russell Carroll, who seems like a great guy. Our work with them has been really smooth so far.

Fingers crossed. smile
Posted By: jcl

Re: C-Sciipt Settable d3d_antialias? - 03/05/09 09:37

DirectX requires 3d_antialiasing to be set before the video device is opened. Thus, under C-Script the solution by Emre is indeed the best.
Posted By: Ichiro

Re: C-Sciipt Settable d3d_antialias? - 03/05/09 17:23

I gotcha. Is there another workaround you might suggest that wouldn't involve calling the engine with any arguments? The exe-calling-exe trick tends to break down with publishers' wrappers. For example, we tried this with our WildTangent build of Wonderful, but they told us that their wrapper went haywire. (Same with Reflexive. Eventually, we upgraded Wonderful to A7, bypassed the need for an exe, and things worked perfectly -- http://www.reflexive.com/TheWonderfulEndoftheWorld.html?related=12.)

Thanks for any suggestions -- I think the ability to turn antialiasing on would make our upcoming game more attractive to players.
Posted By: ChrisB

Re: C-Sciipt Settable d3d_antialias? - 03/05/09 22:27

If you can wait a few days, i'm working on a plugin which lets you enable or disable antialiasing without restarting the engine. It works pretty good already, just more testing is needed. I will release it this weekend hopefully.
If you want i can send you an early version of the dll (as i don't have a7 i need someone for testing ;)), just pm me.

greets
ChrisB
Posted By: Ichiro

Re: C-Sciipt Settable d3d_antialias? - 03/10/09 21:20

Sounds great! Looking forward to the release.
© 2024 lite-C Forums