Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (monk12, Quad), 830 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Aspect ration and ISOMETRIC view #466977
07/11/17 10:52
07/11/17 10:52
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Hey

I'm trying to keep proper view boarders (left, right, top, bottom) for my ISOMETRIC view, when I change screen resolution (other ways view get's a bit stretched), but with no luck. Maybe you guys have ideas how do I get this done? Where do I dig?

Code:
var cam_x_boarder = 800;
var cam_y_boarder = 600;
var cam_dist_factor = 0.4;

camera->left = -cam_x_boarder * cam_dist_factor;
camera->right = cam_x_boarder * cam_dist_factor;
camera->bottom = -cam_y_boarder * cam_dist_factor;
camera->top = cam_y_boarder * cam_dist_factor;


Thank you in advance.
Greets.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Aspect ration and ISOMETRIC view [Re: 3run] #466987
07/11/17 13:44
07/11/17 13:44
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Only pick one size/ use one variable instead of separating x and y, then multiply the other view border dimension by screen_size.x/screen_size.y or y/x.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: Aspect ration and ISOMETRIC view [Re: Superku] #466988
07/11/17 14:34
07/11/17 14:34
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
What I did is this (if I got this part correct - "then multiply the other view border dimension"):
Code:
camera->left = -cam_boarder * (screen_size.x / screen_size.y);
camera->right = cam_boarder * (screen_size.x / screen_size.y);
camera->bottom = -cam_boarder * (screen_size.x / screen_size.y);
camera->top = cam_boarder * (screen_size.x / screen_size.y);



But it doesn't fix my problem, here are the results:
Quote:
1024x768

1280x800:


Greets!


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Aspect ration and ISOMETRIC view [Re: 3run] #466989
07/11/17 14:41
07/11/17 14:41
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Only multiply the values of either the (left,right) or (bottom,top) dimension.
When you take the factor (screen_size.x / screen_size.y) for example it should be like this if I'm not mistaken:

camera->left = -cam_boarder * (screen_size.x / screen_size.y);
camera->right = cam_boarder * (screen_size.x / screen_size.y);
camera->bottom = -cam_boarder;
camera->top = cam_boarder;


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: Aspect ration and ISOMETRIC view [Re: Superku] #466992
07/11/17 16:15
07/11/17 16:15
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
It works like a charm! Thank you very much, man! laugh


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

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