Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 642 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 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