Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
2 registered members (steyr, alibaba), 534 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Splitscreen with different resolutions #347257
11/13/10 23:09
11/13/10 23:09
Joined: May 2009
Posts: 5,367
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,367
Caucasus
I've made simple splitscreen with two views like this:
Code:
VIEW* camera1 = // top 
{
	layer = 15;		
        arc = 80;
	pos_x = 0; 		
        pos_y = 0; 
	size_x = 800;	
        size_y = 300;
	flags = SHOW;
}

VIEW* camera2 = // bottom 
{
	layer = 15;		
        arc = 80;
	pos_x = 0;		
        pos_y = 300; 
	size_x = 800;	
        size_y = 300;
	flags = SHOW;
}

But, how can I make views size change automatically depending on the screen resolution? Do I need to use 'screen_size'? Thank you.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Splitscreen with different resolutions [Re: 3run] #347259
11/13/10 23:48
11/13/10 23:48
Joined: Oct 2007
Posts: 5,209
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,209
İstanbul, Turkey
yes you need to use screen size, but you cannot use that in the definition of the view you have to do that in a function like

camera.size_y = camera2.size_y = screen_size.y/2;
camera2.pos_y = screen_size.y/2;


3333333333
Re: Splitscreen with different resolutions [Re: Quad] #347282
11/14/10 06:16
11/14/10 06:16
Joined: May 2009
Posts: 5,367
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,367
Caucasus
Thank you Quadraxas laugh Only one question, why its screen_size.y/2?


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Splitscreen with different resolutions [Re: 3run] #347293
11/14/10 09:30
11/14/10 09:30
Joined: Aug 2008
Posts: 482
B
bart_the_13th Offline
Senior Member
bart_the_13th  Offline
Senior Member
B

Joined: Aug 2008
Posts: 482
That depends on how do you want the screen splited?
If it's splitted horizontaly, it will be screen_size.x/2.
If it's splitted verticaly, then it will be screen_size.y/2

Re: Splitscreen with different resolutions [Re: bart_the_13th] #347295
11/14/10 09:41
11/14/10 09:41
Joined: May 2009
Posts: 5,367
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,367
Caucasus
Yeah, it's splited horizontally (for FPS).
So I need to do like this:
Code:
camera.size_x = camera2.size_x = screen_size.x/2;
camera2.pos_x = screen_size.x/2;

Am I right?


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Splitscreen with different resolutions [Re: 3run] #347298
11/14/10 10:18
11/14/10 10:18
Joined: Aug 2008
Posts: 482
B
bart_the_13th Offline
Senior Member
bart_the_13th  Offline
Senior Member
B

Joined: Aug 2008
Posts: 482
Originally Posted By: 3run
Yeah, it's splited horizontally (for FPS).
So I need to do like this:
Code:
camera.size_x = camera2.size_x = screen_size.x/2;
camera2.pos_x = screen_size.x/2;

Am I right?

Well, basically yes. But your example in the first post show that you're using vertical split laugh

Re: Splitscreen with different resolutions [Re: bart_the_13th] #347310
11/14/10 12:20
11/14/10 12:20
Joined: May 2009
Posts: 5,367
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,367
Caucasus
grin My mistake then, I thought that I was using horizontal one.
Does it mean, that I don't need to change views X size?
What about wide screen monitors? How can I make views adapt automatically?
Same as you said 'screen_size.x/2'?


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung

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