Jump to content


jcop

Member Since 27 Sep 2011
Offline Last Active May 14 2013 03:04 PM

Topics I've Started

Icade

19 February 2013 - 04:58 PM

I saw the release notes mention test support for iCade for iOS. It says to access it as device 0. Anyone have any idea on how to test this out? I tried monitoring keypresses and didn't seem to get anywhere. Anyone else try and succeed yet?

achievement_show_leaderboards

25 January 2013 - 09:19 PM

I want to confirm that 'achievement_show_leaderboards' is not yet implemented for iOS correct? I was able to get multiple leaderboards working for my game but am unable to open the view leaderboards from within my game.

Interpolate Colors Between Pixels

19 December 2012 - 07:53 PM

The "Interpolate Colors Between Pixels" setting in Global Game Settings seems to have no affect on the display in the HTML5 module. Anyone else figured out how to do a scaled up pixelated looking game in HTML5 without the interpolation?

Kudos - Build & Launch Time

19 December 2012 - 06:45 PM

Wanted to let the YoYo team know that the improvements made in the latest build (v1.1.734) are appreciated. My games launch in test mode on Android in under a few seconds instead of the 30-40 seconds it took in previous versions.

Views & Ports

19 December 2012 - 06:29 PM

I am using GM:S v1.1.734.

I am making a game where I want my graphics pixelated and therefore have turned off interpolation for each target platform in Global Game Settings. The latest update to make Texture Groups "Texture group NOT scaled" apply to all sprites, etc. on non-Retina iPhone/iPod is greatly appreciated.

I have been working on a screen initialization script to setup my view by calculating the display DPI and calculating the view size by making my tiles 0.2 inches square. From that I am also trying to set a port width and height. Now on iOS devices with a tile size of 16x16 pixels everything happens to work out great because it works out that the port width and height are multiples of the view width and height which also exactly matches the device display width and height.

I run into a problem when used on Windows or Android with the Nexus 7. The Nexus 7 for example has a vertical resolution of 1205 pixels in portrait mode. My code calculates out a port height of 1204. However, GMS is still scaling everything to 1205. On Windows, if I allow window resizing (which I want to), things only look good when the window is a multiple of the calculated scale (which happens to be 4 on Windows).

My question is that I was expecting setting the view_wport[0] (view zero being the active view) to cause my view to be display in the top left corner of the display and the remained of the screen left undrawn or filled with room background color. However, instead my view always stretches to the full display width regardless of my port width and height settings.

Is there something I can do to get the port to scale to a multiple of my calculated scale?

Here is my code for a script called "scr_init_display": (global.square_size = 16 from another game initialization script)

if (os_type == os_windows || os_type == os_macosx) {
    global.square_scale = 4;
    global.window_width = window_get_width();
    global.window_height = window_get_height();
    global.view_dpi = 96;
} else {
    global.view_dpi = display_get_dpi_x();
    if (display_get_dpi_y() > global.view_dpi) global.view_dpi = display_get_dpi_y();  
    global.square_scale = round(round(round(global.view_dpi * 0.2) / global.square_size) / 2) * 2;
    global.window_width = display_get_width();
    global.window_height = display_get_height();
}

global.view_width = floor(global.window_width / global.square_scale);
global.view_height = floor(global.window_height / global.square_scale);
global.port_width = global.view_width * global.square_scale;
global.port_height = global.view_height * global.square_scale;

view_xview[0] = 0;
view_yview[0] = 0;
view_wview[0] = global.view_width;
view_hview[0] = global.view_height;
view_xport[0] = 0;
view_yport[0] = 0;
view_wport[0] = global.port_width;
view_hport[0] = global.port_height;

On another note, has anyone been able to get the Resize event to fire on Windows in the current release? Looking at the help file it sounds like it may only work for HTML5 targets. I added the following code to the Step event of one of my objects to detect window resize:

if (os_type == os_windows || os_type == os_macosx) {
    scr_init_display();
}

Is there a better way to detect window resizing by the user on Windows/OSX?