Can performance for MV games on Android be improved?

Discussion in 'Learning Javascript' started by jkweath, Jul 12, 2019.

  1. jkweath

    jkweath Goes Fast Veteran

    Messages:
    189
    Likes Received:
    152
    First Language:
    English
    Primarily Uses:
    N/A
    I'm not really sure if this is the best board to post this on, so if a mod wants to move this, please do.

    I am wondering if it is possible to improve the performance of MV games on Android via code/a plugin. I'm aware of and already use Kodera's optimization plugin as well as many minor optimizations, such as removing all animation flash effects and the cursor animation, that I've implemented myself via my own plugin.

    That being said, I think it's well-established by now that MV games simply can't run on lower-end mobile devices no matter how many optimizations are made, and while it's a viable alternative to target users that use modern mid-to-high end devices, it'd be much better sales-wise and much easier to reach a wider audience on the Play Store if even low-mid-end devices were viable.

    Also, just to make this clear, I'm referring to improving the general performance of MV games on Android. I'm already aware of what plugins do/do not affect performance / how events and map size can affect performance, etc., so I'm not really looking for advice in regards to that.

    If a coding expert is here and believes that MV's performance can be further optimized, then I'll probably look to hire someone to make a plugin like this for me, but I wanted to ask here first in case the answer is that it's just not possible, or impractical, given the engine MV games run off of.
     
    #1
  2. MushroomCake28

    MushroomCake28 KAMO Studio Veteran

    Messages:
    1,622
    Likes Received:
    2,916
    Location:
    Montreal, Canada
    First Language:
    English
    Primarily Uses:
    RMMV
    Well performance can almost always be improved, but at a certain point the work you put in might only help you get a little performance. So there's the issue of work time vs result.

    The thing with javascript is that it is not a multi-threaded language (while it is technically possible to achieve multi-threading with web workers I thing, but it's not really doable in RPG Maker MV), and mobile processors rely on a multi-core configuration at low frequency. So the result is the the single threaded performance is a lot inferior to PC, and single threaded performance is what affects the most your game performance.

    There are ways to reduce the processing burden in RPG Maker MV though. Start off with creating smaller maps, limiting the number of events, try to avoid parallel processes, etc.
     
    #2
    Engr. Adiktuzmiko likes this.
  3. jkweath

    jkweath Goes Fast Veteran

    Messages:
    189
    Likes Received:
    152
    First Language:
    English
    Primarily Uses:
    N/A
    Ah, I see. I didn't know that - this explains why MV games run so poorly on low-end phones and likely limits any performance upgrades that could be achieved from code alone.

    Like I said, I'm aware of all the things I can do from my end--like the things you listed like creating smaller maps, etc., but from all the testing I've done on many different devices, there's nothing that can be done to make the performance at least bearable on low-end phones; you can see the low FPS even in a small blank map. That's why I wanted to ask if there's anything that can be done to optimize the code for at least low-mid-end, like Galaxy S4 level specs.
     
    #3
  4. Andar

    Andar Veteran Veteran

    Messages:
    28,152
    Likes Received:
    6,375
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    the problem is that even top-of-theline mobiles have a lot less processing power than full computers (just compare RAM in addition to processor speed and so on), and while some optimizations are possible there is a limit of what you can do to hardware limits.

    Additionally most plugin writers do not optimize for mobile - they don't need that to run the plugin on PC, and often do not have the knowledge to handle their own memory management and so on. And because javascript is an interpreted language to top that, you simply need more memory and processing as if a game was compiled to run on mobile.
     
    #4
    Engr. Adiktuzmiko and caethyril like this.
  5. peq42_

    peq42_ Yeet Veteran

    Messages:
    452
    Likes Received:
    269
    Location:
    Brazil
    First Language:
    Portuguese(BR)
    Primarily Uses:
    RMMV
    Well, besides recommending you to always use the community basic plugin to config the rendering mode to be webgl(so part of the work is offloaded to the GPU), there isn't much I can recommend you doing. MV's core scripts are well designed and bring a good balance of performance and compatibility, so I wouldn't recommend making huge changes in them, as it could break things in your game.

    Also
    Maybe this was true back in 2015 when MV came out, but it isn't anymore( Unless your game uses an absurd amount of plugins, large parallax maps, a huge amount of events,etc ). The engine has had many performance updates with focus on mobile platforms, and I can assure you that, at least when using its default features, you will get a decent performance even on low-end mobile devices.

    Edit:

    About that "uh but javascript is single core": and so are most applications in both mobile and PC. Dealing with true multi-core is extremely hard, and most applications/games won't do it. For games, for example, usually people will just offload most of the work to the GPU(which you can do in MV by setting "webgl" as your default rendering mode).

    And you can do "multi-core" in javascript. Its called web workers and asynchronous functions(which, although they "aren't true multi-core", they will bring basically the same performance improvement, while being much easier to work with)
     
    Last edited: Jul 16, 2019
    #5
  6. jkweath

    jkweath Goes Fast Veteran

    Messages:
    189
    Likes Received:
    152
    First Language:
    English
    Primarily Uses:
    N/A
    @peq42_ thanks for the info! I've never tried switching the rendering mode to webgl as I always assumed it'd do that automatically.

    See, my thing is that I've actually heard this quite a few times, but in all of the testing I've done it's just not the case. I've tested multiple different projects of mine on multiple different phones--all low-end or older devices ranging from $30-$70 dollars with processors that range from 1.1GHz to 1.6GHz--and found that none of them ran my games, which I spent a lot of time optimizing for mobile deployment, at an acceptable framerate.

    Going up to mid-range phones (which I consider anything around the processing power of a Galaxy S6), my experience is that MV games run fine provided that a few precautions are taken, like avoiding over-time screen tints and lighting plugins.

    Then again, my issue could be that I've just tested with a very bad selection of lower-end phones, which would lead me to think MV games can't run on low-end devices at all.

    All this being said, I'll definitely try locking in webgl mode and see how that impacts performance.
     
    #6
  7. peq42_

    peq42_ Yeet Veteran

    Messages:
    452
    Likes Received:
    269
    Location:
    Brazil
    First Language:
    Portuguese(BR)
    Primarily Uses:
    RMMV
    MV will only use webgl when a plugin or something requires it as far as I know. So if you test a fresh new project or one that that doesn't necessarily requires it, the game will probably run on canvas alone, increasing CPU usage.

    also, may you list those 30~70$ devices you used?Because thats honestly a REALLY low price, I can't even imagine what phones are they. That price range IMO is beyond even low end.

    Edit:
    Also, why focus this price range? From what I could find, the most popular phones of 2018 have a price of around 500$
    if you lower that bar to 100~200$, which IMO would be the real low-end, you will probably find phones that will run MV games quite well.
     
    Last edited: Jul 16, 2019
    #7
    Eliaquim likes this.
  8. jkweath

    jkweath Goes Fast Veteran

    Messages:
    189
    Likes Received:
    152
    First Language:
    English
    Primarily Uses:
    N/A
    @peq42_ perhaps the problem is we just have different definitions of "low-end", lol.

    I have a drawer full of old phones and tablets, so I can't list them all, but I've tested with at least three recently:

    -A standard Samsung Galaxy S4
    -A ZTE Fanfare 3 (1.1 GHz quad)
    -An Alcatel Pixi Theatre (also 1.1 GHz quad)

    None of these phones could run MV games at all, though the Galaxy S4 came relatively close.

    The current phone I'm using is a moto x4 which costs $120 and runs MV games just fine. Now that we're having this discussion I'm actually wondering if there's a statistic showing how many people in general use "extreme-low-end" phones like what I've been testing with compared to devices like the Moto x4 and high-end devices like the S8+.
     
    #8
  9. Engr. Adiktuzmiko

    Engr. Adiktuzmiko Chemical Engineer, Game Developer, Using BlinkBoy' Veteran

    Messages:
    14,461
    Likes Received:
    2,851
    Location:
    Philippines
    First Language:
    Tagalog
    What you need isnt data of how many people use $70 phones but rather how many people who uses those phones even play RPGs or whatever games in their phones..

    But really, that is indeed super low end, most phones lower than that are keypad phones.. I myself keep to at least $100 phones..

    Also, aside from them being low end, it could actually be more of because they are already old. Like maybe MVs droid release isnt compatible with the OS that those old phones use or something...
     
    #9
    peq42_ likes this.
  10. jkweath

    jkweath Goes Fast Veteran

    Messages:
    189
    Likes Received:
    152
    First Language:
    English
    Primarily Uses:
    N/A
    @Engr. Adiktuzmiko I doubt that sort of data exists, but it would certainly be useful!


    I've tested with a good mix of older and modern low-end devices besides the ones I listed, so I'm certain OS compatibility isn't an issue here, though I can't say for sure whether the OS impacts performance or not. That being said the discussion has helped me re-define what low-end is and that perhaps it's not as big an issue as I assumed it was.
     
    #10

Share This Page