Jump to content


Photo

HTML5 game runs in debug mode only


  • Please log in to reply
12 replies to this topic

#1 jagged21

jagged21

    GMC Member

  • New Member
  • 6 posts
  • Version:Unknown

Posted 30 April 2012 - 06:17 PM

I am porting a game from GameMaker 8.1 to GameMaker Studio. When I try to run it in HTML5, there is nothing but a blank screen. However, running it in debug mode in HTML5 works and the game runs with only a few things not working right. Any ideas or suggestions as to why this might be happening?
  • 0

#2 jagged21

jagged21

    GMC Member

  • New Member
  • 6 posts
  • Version:Unknown

Posted 01 May 2012 - 05:56 PM

Now after the update, the game won't run at all, even in debug mode. There isn't even a loading bar, just a blank screen. What could be causing this?
  • 0

#3 Mike.Dailly

Mike.Dailly

    Evil YoYo Games Employee

  • Administrators
  • 1484 posts
  • Version:GM:Studio

Posted 01 May 2012 - 06:14 PM

Post the code and someone will help..... Or post a bug, mark it private and upload the code there.
  • 0

#4 jagged21

jagged21

    GMC Member

  • New Member
  • 6 posts
  • Version:Unknown

Posted 01 May 2012 - 08:45 PM

I can't post the source code since I don't own it. I was just hoping for some info on what could cause this. What code in the game is actually executed before the loading screen shows up? I put a blank room as the first thing and that won't even show up. I am fairly new to GameMaker, but it seems like code for the different objects isn't executed until they are actually created. Anyone know where I could start looking to fix this?
  • 0

#5 Zombie_Plan

Zombie_Plan

    GMC Member

  • New Member
  • 22 posts

Posted 02 May 2012 - 01:25 AM

I can't post the source code since I don't own it. I was just hoping for some info on what could cause this. What code in the game is actually executed before the loading screen shows up? I put a blank room as the first thing and that won't even show up. I am fairly new to GameMaker, but it seems like code for the different objects isn't executed until they are actually created. Anyone know where I could start looking to fix this?


I had this too. Turns out I had simply defined the wrong object in a link on an object's step event.
  • 0

#6 jagged21

jagged21

    GMC Member

  • New Member
  • 6 posts
  • Version:Unknown

Posted 02 May 2012 - 06:02 PM

Well, I found the problem. It was this line of code:

a += .00007

Changing it to
a += .0007
fixed the problem.
  • 0

#7 benetonmovie

benetonmovie

    GMC Member

  • GMC Member
  • 1368 posts
  • Version:GM:Studio

Posted 02 May 2012 - 07:47 PM

Well, I found the problem. It was this line of code:

a += .00007

Changing it to
a += .0007
fixed the problem.

That's a nasty bug! Report it PUH-LEASE.
  • 0

#8 jagged21

jagged21

    GMC Member

  • New Member
  • 6 posts
  • Version:Unknown

Posted 02 May 2012 - 11:25 PM

That's a nasty bug! Report it PUH-LEASE.


Done. I hope they fix it so it doesn't happen to anyone else.
  • 0

#9 Maverick22

Maverick22

    GMC Member

  • GMC Member
  • 119 posts
  • Version:GM:Studio

Posted 03 May 2012 - 01:14 AM


That's a nasty bug! Report it PUH-LEASE.


Done. I hope they fix it so it doesn't happen to anyone else.


I understand how this could be a bug in your game, but how is it a bug in GM:S? Was 'a' not incrementing correctly? Was there a floating point error? I feel like I'm missing something here.

Thanks
  • 0

#10 jagged21

jagged21

    GMC Member

  • New Member
  • 6 posts
  • Version:Unknown

Posted 03 May 2012 - 05:23 PM

I understand how this could be a bug in your game, but how is it a bug in GM:S? Was 'a' not incrementing correctly? Was there a floating point error? I feel like I'm missing something here.

Thanks


It's not an issue with my game. It's the fact that inserting a += .00007 (where a is any variable) causes the whole thing to not work without any error messages or anything.
  • 0

#11 Maverick22

Maverick22

    GMC Member

  • GMC Member
  • 119 posts
  • Version:GM:Studio

Posted 04 May 2012 - 02:06 AM

OK jagged21, maybe it is a GM:S error, but I think you should look into this error a little closer, especially if you are writing a cross-platform game. What does the value .00007 control? Sounds to me that the game ran fast enough on GM8.1 so the value was not too small, but maybe it runs slower on HTML5 so you needed a bigger value like .0007 to get past some creation code or something. I am just throwing out guesses, but experience tells me that short of a floating point precision error in the runner, a simple increment operation is not a bug in GM:S, especially when multiplying the increment value by 10 fixes the problem. Take my suggestion for what it cost, but nipping these things in the butt now can save you hours/days/weeks of debugging later.

Best of luck.

EDIT: Per Russell's explanation, I stand corrected!

Edited by Maverick22, 04 May 2012 - 04:24 PM.

  • 0

#12 rwkay

rwkay

    YoYo Games CTO

  • YoYo Games Staff
  • 1407 posts
  • Version:Unknown

Posted 04 May 2012 - 03:20 PM

The problem is fixed in our internal builds... it was an issue with our obfuscator not handling scientific notation numbers correctly...

Russell
  • 0

#13 blayzekohime

blayzekohime

    GMC Member

  • GMC Member
  • 16 posts

Posted 26 September 2012 - 07:55 PM

The problem is fixed in our internal builds... it was an issue with our obfuscator not handling scientific notation numbers correctly...

Russell


I have this same issue. The strange thing is that the game works perfectly without any bugs whatsoever if I run it in debug mode. But if I run it in regular mode or export it to an index.html file, none of the blocks disappear when you line them up (it's a puzzle game). It seems silly because if it works perfectly in debug mode it should work exactly the same way in normal mode, just without the debug feed.

There isn't a way to build the debug version instead of the normal version is there?

Edited by blayzekohime, 26 September 2012 - 07:56 PM.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users