Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / Help with camera viewport! Please Read

Author
Message
3dZmaster
20
Years of Service
User Offline
Joined: 30th Jun 2003
Location: Finland
Posted: 3rd Jul 2003 17:18
Ok. I am meking a split screen game and I hava this problem. When I split the screen in two parts the parts are like... what's the word... could it be streched. So they don't look normal. When I split the screen in four part tehre isn't any problem. And in two player mode there is no reason for plitting the screen in two parts. I know you know the answer so please...
Current project: Dodge Viper Car Game (Not named yet) Other car models are going to be included soon
Moggie100
21
Years of Service
User Offline
Joined: 15th Oct 2002
Location: Behind You...
Posted: 3rd Jul 2003 23:39
when you reshape the camera viewport, its like streatching or squashing an image in a program like photoshop of the such - to retain the proper sizing you have to change the dimentions by equal amounts.
The following values will always retain the correct screen dimentions:

160x120
320x240
640x480
400x300
800x600
512x384
1024x768

More are available - and these can be found by dividing a known 'true' dimention (one that displays correctly) by 1/2 or 1/3 or whatever on both sides eg:
1/2 of 800 = 400
1/2 of 600 = 300
Do this to get the correct size for each viewport

So the simple solution is not to use the whole screen in 2 player mode, try using the same size windows as you would in 4 player - but only create and use 2 of them.

Hope that helps!

Ask if u want any questions answering.

Mog.

3dZmaster
20
Years of Service
User Offline
Joined: 30th Jun 2003
Location: Finland
Posted: 4th Jul 2003 14:55
I think that helps. When I get out of this bloody summer cottage I will test it.
Maybe then I will need to ask questions, who knows.

Current project: Dodge Viper Car Game (Not named yet) Other car models are going to be included soon
David T
Retired Moderator
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 4th Jul 2003 19:33
And use the correct forum next time! Didn't you see the post the top of the page?

"This borad is for snippets, not questions"

It seems people asking questions in the code snippets forum is a DB institution!

You are the th person to view this signature.
GRAVITY: I fought the law but the law won
3dZmaster
20
Years of Service
User Offline
Joined: 30th Jun 2003
Location: Finland
Posted: 5th Jul 2003 13:08
I expected to get some code with the answer. That's all.

Current project: Dodge Viper Car Game (Not named yet) Other car models are going to be included soon

Login to post a reply

Server time is: 2024-04-18 22:09:53
Your offset time is: 2024-04-18 22:09:53