Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (vicknick, 7th_zorro, 1 invisible), 887 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
A7.70 - how to use video_aspect in C-Script? #251297
02/12/09 12:29
02/12/09 12:29
Joined: Nov 2002
Posts: 913
Berlin, Germany
S
SchokoKeks Offline OP
User
SchokoKeks  Offline OP
User
S

Joined: Nov 2002
Posts: 913
Berlin, Germany
I thought that C-Script was still fully supported..

From version A7.66, there is this new feature:

Quote:

- View.aspect is now relative to the primary monitor format, instead of a theoretical 4:3 monitor. If this is undesired, set the compatibility variable to 7 or below.

- Wide screen video formats are now automatically selected when the primary monitor has a wide screen. If this is undesired, set video_aspect to 4/3 before the first frame.

http://manual.conitec.net/newfeatures70.htm

The problem is:
In C-Script, you can not execute code before the first frame. Setting video_aspect on the beginning of the main function leads so "video_aspect is read only" error. Giving it a value through redefining it (var video_aspect = 1.333;) doesn't have any effect. Setting compability to 7 doesn't to anything, neither.

So how can you have the engine start with non-widescreen resolutions on a system with a widescreen display, apart from calling video_set? For 2D Games, this behaviour is undesired.

Thanks,
SchokoKeks

Re: A7.70 - how to use video_aspect in C-Script? [Re: SchokoKeks] #252198
02/17/09 02:18
02/17/09 02:18
Joined: Aug 2002
Posts: 681
Massachusetts, USA
Ichiro Offline
User
Ichiro  Offline
User

Joined: Aug 2002
Posts: 681
Massachusetts, USA
I noticed you'd linked from the other thread (http://www.coniserver.net/ubb7/ubbthreads.php?ubb=showflat&Number=251892) -- did you find a workaround? This is causing us problems too.


Dejobaan Games - Bringing you quality video games for over 75 years.
Re: A7.70 - how to use video_aspect in C-Script? [Re: Ichiro] #252256
02/17/09 11:46
02/17/09 11:46
Joined: Nov 2002
Posts: 913
Berlin, Germany
S
SchokoKeks Offline OP
User
SchokoKeks  Offline OP
User
S

Joined: Nov 2002
Posts: 913
Berlin, Germany
no, the only workaround i can think of is starting the engine in a very small window (400 x 300 or something) and then call video_set to get it to the right resolution in fullscreen. an then set video.aspect to the right FOV. I don't know of the workaround with compatibility = 7 really works..

jcl is hopefully working on a solution, as he stated in the other thread.

Re: A7.70 - how to use video_aspect in C-Script? [Re: SchokoKeks] #252324
02/17/09 17:24
02/17/09 17:24
Joined: Aug 2002
Posts: 681
Massachusetts, USA
Ichiro Offline
User
Ichiro  Offline
User

Joined: Aug 2002
Posts: 681
Massachusetts, USA
Gotcha, thanks.


Dejobaan Games - Bringing you quality video games for over 75 years.
Re: A7.70 - how to use video_aspect in C-Script? [Re: Ichiro] #252326
02/17/09 17:28
02/17/09 17:28
Joined: Nov 2002
Posts: 913
Berlin, Germany
S
SchokoKeks Offline OP
User
SchokoKeks  Offline OP
User
S

Joined: Nov 2002
Posts: 913
Berlin, Germany
Just found this under beta-features:

Code:
V7.71b beta - in development 

video_aspect can now be re-defined for starting with the selected screen aspect under C-Script.


Re: A7.70 - how to use video_aspect in C-Script? [Re: SchokoKeks] #252670
02/19/09 14:59
02/19/09 14:59
Joined: Sep 2003
Posts: 733
Whitefish, Montana
JazzDude Offline
User
JazzDude  Offline
User

Joined: Sep 2003
Posts: 733
Whitefish, Montana
According to one of my beta testers this code from the forum works, but I don't have a wide-screen monitor so I haven't tested it personally.

Put it in the main function.

Code:
video_set(1024,768,24,1);
	desktopWidth = sys_metrics(0);  
	desktopHeight = sys_metrics(1);

	if (desktopWidth<1681) 
	{
		video_set(desktopWidth,desktopHeight,0,1);
	}
	else
	{
		 if 	(desktopWidth/4  == desktopHeight/3)	//Classic
		{
		
			video_set(1024,768,0,1);
			desktopWidth = 1024;
			desktopHeight = 768;
		}
		 if (desktopWidth/15 == desktopHeight/9)	//BrightView
		{
			video_set(1280,768,0,1);
			desktopWidth = 1280;
			desktopHeight = 768;
		}
		 if (desktopWidth/5  == desktopHeight/4)	//SXGA
		{
			video_set(1280,1024,0,1);
			desktopWidth = 1280;
			desktopHeight = 1024;
		}
		 if (desktopWidth/16 == desktopHeight/10)	//WSXGA+
		{
			video_set(1680,1050,0,1);
			desktopWidth = 1680;
			desktopHeight = 1050;	
		}
		else   //Window Mode
		{
			video_set(1024,768,32,2); 
			video_window(nullvector,nullvector,1,NULL);
			wait(1);	// must put this. not sure the reason
			desktopWidth = screen_size.x;
			desktopHeight = screen_size.y;
		}
	}



Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1