Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (TipmyPip, AndrewAMD, NewbieZorro), 16,055 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
How to get the monitor's ratio or native resolution? #214902
07/08/08 03:46
07/08/08 03:46
Joined: Jun 2008
Posts: 91
C
Coisox Offline OP
Junior Member
Coisox  Offline OP
Junior Member
C

Joined: Jun 2008
Posts: 91
I need a way to determine the user monitor ratio (4:3, 5:4, widescreen, etc) so that I can put black area for widescreen.

Actually, what is the best solution to make screen cliping area? My idea is to put black panel. Because in my game, user with widescreen will have advantage because he can see more. If I make fixed resolution using video_mode, widescreen user will see wider character or oval-look ball.

Re: How to get the monitor's ratio or native resolution? [Re: Coisox] #214912
07/08/08 07:40
07/08/08 07:40

M
mercuryus
Unregistered
mercuryus
Unregistered
M



You can estimate the monitors set resolution with sys_metrics(0), sys_metrics(1). The ratio is width/height => sys_metrics(0)/sys_metrics(1).

All supported resolutions of the monitor you can estimate with the API-functions EnumDisplaySettings and EnumDisplaySettingsEx.

And just a hint: do not display "black panels". This will look very bad on widescrenn monitors.

Re: How to get the monitor's ratio or native resolution? [Re: ] #214925
07/08/08 09:24
07/08/08 09:24
Joined: Jun 2008
Posts: 91
C
Coisox Offline OP
Junior Member
Coisox  Offline OP
Junior Member
C

Joined: Jun 2008
Posts: 91
Thank you for the functions. I didn't found them in the help file.
Quote:
And just a hint: do not display "black panels". This will look very bad on widescrenn monitors.

If I fully utilize the widescreen, I have to crop the top+bottom to maintain the graphic's ratio. This will disadvantaging them.

If I put top+bottom black panel for the non-widescreen, this will makes my game too hard because the enemy attack from verticle. My top menu has took 1/7 of the screen height. If plus more black panel at top+bottom, auch!! Just imaging playing flight shooter on widescreen, you only have a few secs to react at the moment you see enemy approacing.

Any suggestion?

Re: How to get the monitor's ratio or native resolution? [Re: Coisox] #214946
07/08/08 10:32
07/08/08 10:32

M
mercuryus
Unregistered
mercuryus
Unregistered
M



Good question!

With this type of game (where the size of the view is controlling game difficulty)
I would eventually change the AI (health/power/fire speed/speed) of the enemies with the viewrange to eliminate the advantage of widescreen users.

Re: How to get the monitor's ratio or native resolution? [Re: ] #214973
07/08/08 14:39
07/08/08 14:39
Joined: Jun 2008
Posts: 91
C
Coisox Offline OP
Junior Member
Coisox  Offline OP
Junior Member
C

Joined: Jun 2008
Posts: 91
Oh! What a strange way but should be considered! laugh I've never thought to control bias in that way. How do you determine the multiplier factor? I means, if monitor A is 10% smaller than monitor B, does that means we must makes movement in computer A 10% slower? Fine.... but we have a lot of other variables, did you simple makes everything less 10%? Or you adjust based on user experience and your instinct?

You have a very nice idea.

Re: How to get the monitor's ratio or native resolution? [Re: Coisox] #214976
07/08/08 14:56
07/08/08 14:56

M
mercuryus
Unregistered
mercuryus
Unregistered
M



I would start to check if a linear change of (e.g. the enemies speed) solves the problem:
[edit: I would try to solve it by changing just one parameter unless I get no good results]

Starting with the default ratio (4/3) I would calculate the ratio between the widescreen-ratio and the default screen-ratio:

e.g. 4:3=1.33, 16:9=1.77 => 1.77 : 1.33 = 1.33 (ratio-factor)

Now I would multyply the enemies speed with the ratio-factor and a constant (to change the power of the ratio-factor).

I would test this by setting extreme monitor-aspects (with video_set()) and play with the constant.


If all this returns no good result I would try to use non-linear methods (edit: or change more than one parameter with this ratio-factor).

mercuryus

Last edited by mercuryus; 07/08/08 15:00.
Re: How to get the monitor's ratio or native resolution? [Re: ] #215058
07/09/08 01:05
07/09/08 01:05
Joined: Jun 2008
Posts: 91
C
Coisox Offline OP
Junior Member
Coisox  Offline OP
Junior Member
C

Joined: Jun 2008
Posts: 91
I see... so we need to experience the "feeling" itself. Nice trick.


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

Gamestudio download | 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