GMLscripts.com

Discuss and collaborate on GML scripts
Invert

You are not logged in.

#1 Re: GML Reference » GameMaker:HTML5 - Things that work differently » 2011-10-06 10:47:32

Whoa this is a very informative thread! Looks like you covered everything I found. I've found quite a few issues, but have come up with workarounds or ways to take advantage of that:
* Uninitialized variables are not treated as 0. They also don't crash the game, instead they return "undefined". You can take advantage of this by comparing a variable to an undefined variable like "akjshdflajfs" and check if they are equal (ie, both are undefined). If true, then you can insert some initialization code which completely removes the need to have a separate script that initializes variables etc. You can't just do "if foo = 'undefined'" it has to be compared directly with an undefined variable. I wrote an article about it here: http://afoobar.com/gmdn/gamemaker/tuts/ … -existence

* For some reason, the canvas (window) size is limited to the size of the first room. You can shrink it all you want, but if you try to go to a room with a bigger size or change the views to a larger size than the canvas you get really strange results. I discovered a workaround to this which involves creating an empty room with a size of 2000x2000 which loads at run start, then immediately jump into the first "working" room. This prevents the weird canvas resizing quirks. Kinda hard to explain, but I'll write up an article about it soon.

* I've found some quirky behavior with ds_grid and ds_list which happens from time to time even after compiling. Sometimes you'll run the game fine and other times you'll get weird data. I'll try to create a very basic example to see if I can recreate this, and then report it to the bug tracker.

* The os_device, os_type, etc commands are definitely buggy. In fact, some of the constants return undefined! It would be nice if someone can find the numerical values for the constants instead of being forced to use something like "if os_browser = browser_firefox" for example and just do "if os_browser = 2", which to me at least, makes more sense.

* Just a random rant: What's up with the camel case and prepending some commands with YoYo_ - that's a little too much lol. And I hope they are kidding about taking out the "import/export" script functionality because A) not everyone will collaborate on a project, and B ) that would make it extremely difficult to import old scripts from previous version of GM that I still use. Especially groups of scripts which contain dozens of scripts!

Anyways, I'll post whatever I find here. This is an awesome list!

Board footer

Powered by FluxBB