|
One code to rule them all
#395397
02/23/12 09:13
02/23/12 09:13
|
Joined: Feb 2012
Posts: 9
Enix
OP
Newbie
|
OP
Newbie
Joined: Feb 2012
Posts: 9
|
Hi, I have a question.
I would like to give a choice of different resolutions in my game but I faced one problem. If I write a code for some resolution eg. 1024x768, and a player choose some other resolution, my code won`t work any more cos many aspects like positions and distances will be distorted. Is there any solution in GS or I must write a whole script to handle this? Is there a way to make a code which will work regardless from chosen resolutions and what could be the simplest way?
I apologize if this has already been asked, I have not found it.
Last edited by Enix; 02/23/12 09:14.
|
|
|
Re: One code to rule them all
[Re: Enix]
#395405
02/23/12 10:56
02/23/12 10:56
|
Joined: Aug 2009
Posts: 1,438 Spain
painkiller
Serious User
|
Serious User
Joined: Aug 2009
Posts: 1,438
Spain
|
of course, you can align your elements to different corners of the screen. For example, this will put your panel always at 50 pixels from the screen bottom and 30 pixels from the right side.
PANEL *my_panel=
{
...
}
...
while(1)
{
my_panel.pos_x=screen_size.x-my_panel.size_x-30;
my_panel.pos_y=screen_size.y-my_panel.size_y-50;
wait(1);
}
3D Gamestudio A8 Pro AMD FX 8350 4.00 Ghz 16GB RAM Gigabyte GeForce GTX 960 4GB
|
|
|
Re: One code to rule them all
[Re: Enix]
#395406
02/23/12 11:00
02/23/12 11:00
|
Joined: Nov 2011
Posts: 274 de
lemming
Member
|
Member
Joined: Nov 2011
Posts: 274
de
|
You talk of panels, don't you? You can try scaling them to fit the resolution or use a script to move them around relative to the resolution. Or both of it.
edit:// painkiller was faster, I meant a script like his.
Last edited by lemming; 02/23/12 11:01.
|
|
|
Re: One code to rule them all
[Re: darkinferno]
#395753
02/27/12 12:34
02/27/12 12:34
|
Joined: Feb 2012
Posts: 3
kuro
Guest
|
Guest
Joined: Feb 2012
Posts: 3
|
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|