W
Wraithious
Guest
Same exact thing here, ive read those blogs 50 times, tried the 'pixel perfect' aproach, nothing works, either the game is scaled correctly and the objects aren't scaled correctly, or the objects are scaled correctly and the game is not, and in both cases when you save an image to reload and use it the image is 50x bigger than it was when i saved it, heres a pic of what the pixel perfect example did to my gamethe difference between me and you is that my game is for android
Notice the white bars? They are virtual buttons that are supposed to line up with the arrow buttons and enter and end buttons, and the application background is tiny and not even centered, i have no idea what to do, i followed that tutorial exactly as well as trying all of the ideas on the 2 blogs
code for room0:
application_surface_draw_enable(false);
window_set_fullscreen(true);
dw=display_get_width();
dh=display_get_height();
if(dw<=512 && dh<=384)
{surface_resize(application_surface,512,384);
global.xo=(dw-512)/2;
global.yo=(dh-384)/2;
}
if(dw>512 && dh>384 && dw<=1024 && dh<=768)
{surface_resize(application_surface,1024,768);
global.xo=(dw-1024)/2;
global.yo=(dh-768)/2;
}
if(dw>1024 && dh>768 && dw<=2048 && dh<=1536)
{surface_resize(application_surface,2048,1536);
global.xo=(dw-2048)/2;
global.yo=(dh-1536)/2;
}
if(dw>2048 && dh>1536 && dw<=3072 && dh<=2304)
{surface_resize(application_surface,3072,2304);
global.xo=(dw-3072)/2;
global.yo=(dh-2304)/2;
}
if(dw>3072 && dh>2304 && dw<=4096 && dh<=3072)
{surface_resize(application_surface,4096,3072);
global.xo=(dw-4096)/2;
global.yo=(dh-3072)/2;
}
if(dw>4096 && dh>3072 && dw<=5120 && dh<=3840)
{surface_resize(application_surface,5120,3840);
global.xo=(dw-5120)/2;
global.yo=(dh-3840)/2;
}
if(dw>5120 && dh>3840 && dw<=6144 && dh<=4608)
{surface_resize(application_surface,6144,4608);
global.xo=(dw-6144)/2;
global.yo=(dh-4608)/2;
}
if(dw>5120 && dh>3840 && dw<=7168 && dh<=5376)
{surface_resize(application_surface,7168,5376);
global.xo=(dw-7168)/2;
global.yo=(dh-5376)/2;
}
window_set_fullscreen(true);
dw=display_get_width();
dh=display_get_height();
if(dw<=512 && dh<=384)
{surface_resize(application_surface,512,384);
global.xo=(dw-512)/2;
global.yo=(dh-384)/2;
}
if(dw>512 && dh>384 && dw<=1024 && dh<=768)
{surface_resize(application_surface,1024,768);
global.xo=(dw-1024)/2;
global.yo=(dh-768)/2;
}
if(dw>1024 && dh>768 && dw<=2048 && dh<=1536)
{surface_resize(application_surface,2048,1536);
global.xo=(dw-2048)/2;
global.yo=(dh-1536)/2;
}
if(dw>2048 && dh>1536 && dw<=3072 && dh<=2304)
{surface_resize(application_surface,3072,2304);
global.xo=(dw-3072)/2;
global.yo=(dh-2304)/2;
}
if(dw>3072 && dh>2304 && dw<=4096 && dh<=3072)
{surface_resize(application_surface,4096,3072);
global.xo=(dw-4096)/2;
global.yo=(dh-3072)/2;
}
if(dw>4096 && dh>3072 && dw<=5120 && dh<=3840)
{surface_resize(application_surface,5120,3840);
global.xo=(dw-5120)/2;
global.yo=(dh-3840)/2;
}
if(dw>5120 && dh>3840 && dw<=6144 && dh<=4608)
{surface_resize(application_surface,6144,4608);
global.xo=(dw-6144)/2;
global.yo=(dh-4608)/2;
}
if(dw>5120 && dh>3840 && dw<=7168 && dh<=5376)
{surface_resize(application_surface,7168,5376);
global.xo=(dw-7168)/2;
global.yo=(dh-5376)/2;
}
Code:
draw_surface_ext(application_surface,global.xo,global.yo,1,1,0,-1,1);
Code:
global.vikey1=virtual_key_add(x,y,32,32,vk_up);
global.vikey2=virtual_key_add(x+32,y,32,32,vk_down);
global.vikey3=virtual_key_add(x+160,y,32,32,vk_enter);
global.vikey4=virtual_key_add(x+192,y,32,32,vk_end);
virtual_key_show(global.vikey1);
virtual_key_show(global.vikey2);
virtual_key_show(global.vikey3);
virtual_key_show(global.vikey4);
Last edited by a moderator: