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
0 registered members (), 635 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Panel resize #82988
07/24/06 02:59
07/24/06 02:59
Joined: Apr 2005
Posts: 795
U.S.A. Michigan
exile Offline OP
User
exile  Offline OP
User

Joined: Apr 2005
Posts: 795
U.S.A. Michigan
Hey guys. I have a noob question so I am posting it here. Anyways, I need to know how to make all of the bitmaps/panels have the same aspect ratio depending on the resolution. Thanks.

Re: Panel resize [Re: exile] #82989
07/24/06 08:50
07/24/06 08:50
Joined: Aug 2000
Posts: 7,490
O
Orange Brat Offline

Senior Expert
Orange Brat  Offline

Senior Expert
O

Joined: Aug 2000
Posts: 7,490
I have one of those in my master list. I can't recall the math to get all the ratios but it's some thread somewhere that I started. Probably in Starting or Scripting section. The only problem is that that code is for plain color panels and nothing with details. You'll need a unique set of panel art for each support resolution if you want to keep everythign the same proportion from resolution to resolution and don't want any pixelation. If you just resize in realtime it can lead to bad artifacting unless it's just a plain flat texture.


My User Contributions master list - my initial post links are down but scroll down page to find list to active links
Re: Panel resize [Re: Orange Brat] #82990
07/24/06 09:02
07/24/06 09:02
Joined: Aug 2003
Posts: 1,125
Germany / Reckenfeld
Tobias_Runde Offline
Serious User
Tobias_Runde  Offline
Serious User

Joined: Aug 2003
Posts: 1,125
Germany / Reckenfeld
panel.scale_x = screen_size.x / max_screensize.x;
panel.scale_y = screen_size.y / max_screensize.y;

max_screensize is the size, the Panel is made for.
You should made the Panel for your Maximum Screen_Size (e.g. 1600x1200). When you mad a 640x480 Panel and you scale it up to 1600 the quality is worse.


-------------------------- www.3dgs.de
Re: Panel resize [Re: Tobias_Runde] #82991
07/24/06 10:42
07/24/06 10:42
Joined: Apr 2005
Posts: 2,332
Germany, BaWü
aztec Offline

Expert
aztec  Offline

Expert

Joined: Apr 2005
Posts: 2,332
Germany, BaWü
I think another possibility could be
you make 3 panel diffrent szie 800x600, 1024x758, 645x350 (i dont know it exactly)
but then you write something like

if (video_mode == 8) // 1024x758 resolution
{
the_panel.visible = on;
}
else
{
visible off
}
if(video_mode == 7) // 800x600 resolution
{
the_panle2.visible = off;
}
else......

I hope you know what I mean


Visit:
schwenkschuster-design.de
Re: Panel resize [Re: aztec] #82992
07/24/06 10:59
07/24/06 10:59
Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
ulillillia Offline
Senior Expert
ulillillia  Offline
Senior Expert

Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
When scaling a panel, the result becomes very pixelated. Try turning on the nofilter flag for a model and look at it. You can easily see pixelation effects. The same happens with panels. Stretch a panel to 4x on each side, you simulate the exact effect when zooming in on an image in a graphics edittor (like MSPaint or the GIMP). Scaling to 2x should be the very highest you should go and 2x is only decent for when using a very high resolution where the pixels on the monitor are very small.


"You level up the fastest and easiest if you do things at your own level and no higher or lower" - useful tip My 2D game - release on Jun 13th; My tutorials
Re: Panel resize [Re: ulillillia] #82993
07/24/06 11:12
07/24/06 11:12
Joined: Aug 2003
Posts: 1,125
Germany / Reckenfeld
Tobias_Runde Offline
Serious User
Tobias_Runde  Offline
Serious User

Joined: Aug 2003
Posts: 1,125
Germany / Reckenfeld
This is the reason why you should create the Panel with the max Resolution you use. When you shrink the Panel, the pixelate effect is low.
You can't compare it with NoFilter Flag. When you stretch the Panel the result is bad, but you shrink it.
Try it, it works!


-------------------------- www.3dgs.de
Re: Panel resize [Re: Tobias_Runde] #82994
08/08/06 16:01
08/08/06 16:01
Joined: Jul 2006
Posts: 28
Amman, Jordan
Dareen Offline
Newbie
Dareen  Offline
Newbie

Joined: Jul 2006
Posts: 28
Amman, Jordan
I tried the screen_size but it gives me a weird error:

Number Syntax Error

how do fix it


Upon my end shall I begin? Forsaking all I've fallen for.. I rise to meet the END!!
Re: Panel resize [Re: Dareen] #82995
08/08/06 16:11
08/08/06 16:11
Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
ulillillia Offline
Senior Expert
ulillillia  Offline
Senior Expert

Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
It's screen_size.x and screen_size.y.


"You level up the fastest and easiest if you do things at your own level and no higher or lower" - useful tip My 2D game - release on Jun 13th; My tutorials
Re: Panel resize [Re: ulillillia] #82996
08/09/06 08:52
08/09/06 08:52
Joined: Jul 2006
Posts: 28
Amman, Jordan
Dareen Offline
Newbie
Dareen  Offline
Newbie

Joined: Jul 2006
Posts: 28
Amman, Jordan
Thats exactly what i used:

Code:
 
pos_x = (screen_size.x - bmap_width(myBmap))/2;
pos_y = (screen_size.y - bmap_height(myBmap))/2;



as written in the manual, but i still get the error!!
does it have anything to do with versions or updates?


Upon my end shall I begin? Forsaking all I've fallen for.. I rise to meet the END!!
Re: Panel resize [Re: Dareen] #82997
08/09/06 09:41
08/09/06 09:41
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Xarthor Offline
Expert
Xarthor  Offline
Expert

Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
@Dareen:
Which version do you have?

(WED -> Help -> About WED..)

Page 1 of 2 1 2

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