Jump to content


Photo

Windows -> Android


  • Please log in to reply
4 replies to this topic

#1 BlaXun

BlaXun

    Slime Online Creator

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

Posted 14 August 2012 - 07:52 PM

Hiya everybody,

I am currently thinkin bout getting the android module.
I got GM:HTML5 when it was in beta...and now I got studio with HTML5.
Unfortunately, even up until today I am runnin into annoying behavior problems when I run stuff in HTML5.

While simple collision checking with x/y coordinates with boundig boxes work fine in windows version the fail miserably in HTML5 and behave different.
Does stuff like this happen in android too= I mean, I didnt do anything special, just somethin like this:

if (self.bbox_left >= other.bbox_right) || (self.bbox_right <= other.bbox_left)
    self.hspeed = -self.hspeed

if (self.bbox_top >= other.bbox_bottom) || (self.bbox_bottom <= other.bbox_top)
    self.vspeed = -self.vspeed

...fine in windows, fail in HTML5...
hope its not the same when compiled to android :(
  • 0

#2 Jobo

Jobo

    No neurons left today

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

Posted 14 August 2012 - 08:20 PM

"self" is not a trustworthy constant, so to say, and should never really be used.
I suggest using "id" instead. This may solve your problem.
  • 0

#3 Manuel777

Manuel777

    InvaderGames

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

Posted 14 August 2012 - 08:20 PM

Have you tried addng brackets and semicolons to the code? it may do nothing but, who knows.. HTML5 is quite *****y;
if (bbox_left >= other.bbox_right || bbox_right <= other.bbox_left) {
    hspeed = -hspeed;
}
if (bbox_top >= other.bbox_bottom || bbox_bottom <= other.bbox_top) {
    vspeed = -vspeed;
}
Note: self is not necesary here.


To answer your question, I never had issues when testing on Android, I actually do most of the developement process on Windows and then, when I need to test a critical aspect of the game (like touch controls or screen size addaptation) I test on a device ;)
  • 0

#4 filulilus

filulilus

    GMC Member

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

Posted 15 August 2012 - 07:16 AM

Haven't had any problems with Android, except for this problem which will be fixed, I've made simple 2d games with collision checking and even 3d games.
I've only submitted one game so far tho, I'm not developing atm becouse of the bug I linked.
  • 0

#5 BlaXun

BlaXun

    Slime Online Creator

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

Posted 15 August 2012 - 07:41 AM

Okay, this sounds pretty nice. I ran into a lot of problem when runnin games in HTML5 ...which would run great in Windows.... even basic stuff, such as bounding box stuff n such is givin problems in html5...

As long as windows -> android is less buggy I think I will be fine.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users