Jump to content


cutch23

Member Since 11 Dec 2011
Offline Last Active Dec 18 2012 02:47 AM

Posts I've Made

In Topic: How to make game for different resolutions?

09 July 2012 - 12:42 AM

A technique that I've been using is to make the room size some arbitrarily large value like 1960x1080 then using window_center() to place the canvas in the centre of the browser, making it essentially fullscreen. Then you can use room_width, room_height, browser_width and browser_height to find the coordinates of the top left corner of the screen and place objects relative to that, for example:

STEP EVENT:
window_center();
x0 = max(0, (room_width - browser_width) / 2);
y0 = max(0, (room_height - browser_height) / 2);


I'm a total noob here, I don't quite understand what x0 and y0 are.

In Topic: Instances not showing when running the game

05 July 2012 - 03:46 AM

I was working on a small platformer based on the example that came with GM HTML5 and I decided to continue working on it using GM Studio. There were a couple of sprites/objects names I had to change to make it work. But I have instances of a jewel that are not visible when plying the game.
The jewels are behind an object that changes into another object with different depth (to be behind the jewel). The object is there because I can grab it and it shows the particle/sound effects I assigned to it. I just can't view it. Is this a known bug? Does depth work different in GM Studio?


I too, recently ported from HTML5 to studio and found that some of my instances only show up if I set the image_xscale and image_yscale to something other than 1 (I settled on 1.01). I still can't get them to show up with I export out of studio into html5 though... something happens with the depths (If I make my background invisible I can see them again)

In Topic: object disappears when I set image_xscale =1

05 July 2012 - 02:51 AM

Also, if I run in HTML5, all of my objects disappear (not matter where i set the xscale)

In Topic: Is it still possible to store files externally?

04 July 2012 - 03:52 AM

I'm having trouble as well.

This worked in HTML5, but doesn't seem to work now:


f=file_text_open_read('four.txt')
while( !file_text_eof(f) ){
s = file_text_read_string(f)
file_text_readln(f);
ds_map_add(global.dictionary,s,0);
}
file_text_close(f);

In Topic: full screen / aspect ratio problems

27 December 2011 - 05:41 AM

It's just not in yet... I'm also unsure if we should allow "full screen" on startup, because that "could" be used by hackers etc. to emulate pages, and I don't like that....


I guess I'm thinking "fill the browser window", not full screen. The Chrome app "solitare online" automatically resizes and centers itself depending on the size of the browser window. Is there any way I can emulate that?