Jump to content


Photo

Running GM HTML5 Programs on Mobiles and GM Studio


  • Please log in to reply
5 replies to this topic

#1 AJArmstron

AJArmstron

    GMC Member

  • GMC Member
  • 161 posts
  • Version:GM:HTML5

Posted 24 February 2012 - 10:19 AM

I spent a long time making a program which works superbly in GM Windows and GM HTML5 WHEN VIEWED on a PC. However, I have a very different experience with the program when it is run via my mobile phone (Sony Ericsson Xperia) and an iPad2.

When I run the program on my mobile phone - the program works, although it runs slower in places and always crashes (browser closes) at a certain point. Meanwhile, when using the iPad the program runs slower in places (although clearly not as slow), it does NOT crash at the same point that my mobile phone does, however, there is a very serious lag.

I identified that the cause of lagging is due to the fact that the program has objects in it that are collecting data about what the program user is doing (such as time and accuracy) at different stages. The point the program crashes on my mobile the program is making a new persistent object that collects all of the variables it needs before the program goes to a new room. This method of making a persistent object (before going to a new room) must be very widespread and common amongst GameMaker users. As a result I suspect that this is a common issue amongst GameMaker HTML5 software developers?

I am asking whether the same issue will remain if the program is created using GM Studio? This is important to me because if the same issues (of lagging) will remain then I need to try and redesign my program to reduce/prevent lagging. (For example, I will need to try and reduce the number of objects and control when the persistent object is created so the lagging effect is less visible.)

Thank you for any suggestions.

PS - I also note that when using my mobile phone the position of my finger and the cursor on the screen are in very different places (especially when in landscape mode). Will this problem remain with GM Studio?

Edited by AJArmstron, 24 February 2012 - 10:20 AM.

  • 0

#2 rucodemente

rucodemente

    GMC Member

  • GMC Member
  • 56 posts

Posted 24 February 2012 - 04:28 PM

The problem with HTML5 is that it needs to be interpreted by a browser, and this is where lags occur, since browsers are not "optimized" to run games. Bear in mind too that mobile devices have less procesing power than a computer, so even if a HTML5 game works fine in your computer's browser, it will certainly run slower when running with a mobile browser.

With GM Studio the games are going to be interpreted by a runner made and optimized for that device (iOS, android, etc.), this should make the games run as smoothly as on your desktop computer. Of course, that doesn't mean we shouldn't try to optimize our games and do the things we need in the most efficient way we can.

I've been playing some of YoYo's released games for iOS in my iPod, and they run very smooth, no problems so far. Yet, I guess there's some optimization one has to do to port a game for mobile devices...

If you start working to release for desktop, given all the "power" the computers have it's pretty easy to get lazy and make things redundant , inneficient, or adding way too much stuff (like too many particles, hundreds of objects and so on, lots of things going on at the same time).

A recent trend in web development is to work "Mobile First", ie: start the design working with the constraints mobile devices have, and then build on top of that, adding more stuff and eyecandy for visitors using a desktop computer. It's actually easier to work this way.
  • 0

#3 AJArmstron

AJArmstron

    GMC Member

  • GMC Member
  • 161 posts
  • Version:GM:HTML5

Posted 24 February 2012 - 06:00 PM

Thank you for replying.

Concerning Mobile First - I appreciate that one can plan program design for screen size, layout and finger pressing for a mobile. However, are there any key coding considerations for using programs on mobile phones?

You state games made using GM Studio should run as smoothly as on the desktop computer? If this is true then that is fantastic.

I note the YoYo page on Studio states:

Produce ready-to-run HTML5 web code which can be run in any compatible browser* without plugins
* The W3C HTML5 Standard is not yet finalised. Browser performance will vary as a result.


I assume this is referring to making programs specifically for the internet using HTML5 and that the exporting packages for Android and iOS applications are not contained in some kind of HTML5 format?

Edited by AJArmstron, 24 February 2012 - 06:09 PM.

  • 0

#4 YellowAfterlife

YellowAfterlife

    GMC Member

  • Global Moderators
  • 3927 posts
  • Version:GM:Studio

Posted 24 February 2012 - 06:11 PM

Thank you for replying.

Concerning Mobile First - I appreciate that one can plan program design for screen size, layout and finger pressing for a mobile. However, are there any key coding considerations for using programs on mobile phones?

You state games made using GM Studio should run as smoothly as on the desktop computer? If this is true then that is fantastic.

Mobile games released by YoYoGames so far work well on devices.
Can assume that these run comparably to desktop computer, but bear in mind that mobile devices have lower power (CPU, RAM, GPU) that desktops, so limitations apply.

HTML5 applies only to HTML5 games, surprisingly. Normal mobile games are delivered in separate 'native' formats, which are handled by device.

Edited by YellowAfterlife, 24 February 2012 - 06:12 PM.

  • 0

#5 depression

depression

    GMC Member

  • GMC Member
  • 6 posts

Posted 27 February 2012 - 10:59 AM

How does one test a game they made in gamemaker studio on an iphone?
  • 0

#6 YellowAfterlife

YellowAfterlife

    GMC Member

  • Global Moderators
  • 3927 posts
  • Version:GM:Studio

Posted 27 February 2012 - 11:14 AM

How does one test a game they made in gamemaker studio on an iphone?

Via WiFi, following steps listed in according FAQ.
Discussions and questions regarding that must be pointed to specific forum.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users