issues with android performance

Discussion in 'RPG Maker MV Deployment' started by PrkchpsNaplsaws, Nov 6, 2015.

  1. PrkchpsNaplsaws

    PrkchpsNaplsaws Grandmaster Newb Veteran

    Messages:
    79
    Likes Received:
    24
    Location:
    United States
    First Language:
    English
    I am using a Samsung Note 3 with all the latest updates.  My game size is ~125mb (it's just a demo) that I converted to APK using intel's XDK - uploaded to my own private server, downloaded to my phone, installed, and tried playing...tried.

    A few things: 

    #1.)  Screen cuts out - how can I program my game to override the "power saver" feature that turns the screen off after so much inactivity?  Youtube, netflix, hulu, etc all do this so you can watch a movie, other games do it, but if i am not constantly touching my screne, it'll turn off on the game.

    #2.)  The game runs SO SLOW.  The music is slowed way down.

    #3.)  All of the BGM is present - but every singel sound effect, beyond the main menu, will not play.  They are in the folder, but they will not play.

    Any ideas???
     
    #1
  2. KisaiTenshi

    KisaiTenshi Veteran Veteran

    Messages:
    310
    Likes Received:
    121
    1) http://developer.android.com/training/scheduling/wakelock.html , you'll have to edit the manifest file, and that's beyond the scope of the forum

    2) Your device is about twice as fast as the poster in another thread with an S2 has. However you have to make sure that you're using the Cordova/Crosswalk or using Android 4.4.4 or 5.0's native webview. "Slowing music" is suggestive that either the CPU is trying to do too much, or bugs in the game itself.

    3) This looks like it's related to 2. You have to "start" and "stop" sound effects as far as I know.
     
    #2
    PrkchpsNaplsaws likes this.
  3. PrkchpsNaplsaws

    PrkchpsNaplsaws Grandmaster Newb Veteran

    Messages:
    79
    Likes Received:
    24
    Location:
    United States
    First Language:
    English
    I am definintely using the cordova/crosswalk in the intel XDK.  I followed this wonderful tutorial from one of the great members here in the forum




    I went back, started from scratch, step by step - now I get "error failed to load: audio/se/Cursor2.m4a"

    it's actually managed to give me a dayum headache, lol
     
    Last edited by a moderator: Nov 6, 2015
    #3
  4. PrkchpsNaplsaws

    PrkchpsNaplsaws Grandmaster Newb Veteran

    Messages:
    79
    Likes Received:
    24
    Location:
    United States
    First Language:
    English
    So the "game" its self is only about 20 events, 1 map, a handful of sound effects, 1 script, and 3 background music files.  It's very...very....very simple.  I cut it off where it stands just to test it on mobile before I went any further.  As far as a game goes, it's pretty bare-bones - so I don't understand why it's chugging so hard on such an advanced phone.

    I have tried it on my Samsung Note 3 and my wife's Galaxy S5 - it behaves exactly the same.

    The title screen music doesn't play until you "touch" the screen

    The BGM plays as if it were set to 1/2 speed (which it is not)

    and several sound effects do not play

    The sound effects that do play, play as if they were also set to 1/2 speed.

    The graphics themselves do not appear to be running slow, it's just the sound...and the unbelievably frustrating fact that the screen fades with the game running.
     
    Last edited by a moderator: Nov 8, 2015
    #4
  5. PrkchpsNaplsaws

    PrkchpsNaplsaws Grandmaster Newb Veteran

    Messages:
    79
    Likes Received:
    24
    Location:
    United States
    First Language:
    English
    just for the sake of troubleshooting - I started a completely new project.  I put grass on the ground and background music on the map.  No plugins installed.

    When I go thru the process of converting it all to an APK - it still plays music at about 1/2 speed on mobile.
     
    #5
    HappySlime and Jonforum like this.
  6. watermark

    watermark Veteran Veteran

    Messages:
    559
    Likes Received:
    487
    First Language:
    English
    Primarily Uses:
    RMMV
    Oh oh. This is starting to sound like the problems we ran into with ImpactJS, another HTML5/JS based mobile game engine. We made our game Destiny Emerald with ImpactJS and it wouldn't run at first. In the end we had to cut a lot of sound effects and lower the bgm quality for it to run at all. It still has performance issues today, which was why we decided to abandon the ImpactJS platform. I was hoping MV didn't have the same problems...

    For MV, we have not had the chance to export to Android or iOS yet, but if many others are experiencing what you are experiencing, then this is huge engine problem that needs to be fixed. Ideally, RPG Maker on mobile should run exactly the same as the PC version. Someone needs to seriously look into the audio code.

    This worries me. Has anyone successfully run a MV game on a mobile device? If so maybe you can share with us how you did it.
     
    #6
  7. RyokuHasu

    RyokuHasu Developer Veteran

    Messages:
    274
    Likes Received:
    37
    Location:
    Nebraska
    First Language:
    English
    An option for getting it to work on android is to host your game on a website and write a simple browser app that basically only displays a single hard-coded page full screen with no nav-bar and no actual browsing ability. There are a few tutorials out there for creating simple custom browser apps.

    Downside would be the android device would use data and need a constant internet connection to play a single player game. And the app would basically stop working if the page ever got taken down.
     
    Last edited by a moderator: Nov 9, 2015
    #7
    Jonforum likes this.
  8. KisaiTenshi

    KisaiTenshi Veteran Veteran

    Messages:
    310
    Likes Received:
    121
    I'd basically not recommend "hosting" a game unless you have deep pockets. Even if you leverage something like cloudflare and aggressively force the browser to cache, it's often not a good experience for anyone unless it's played in 10 minute installments with as little music as possible.
     
    #8
  9. JumbocactuarX27

    JumbocactuarX27 Veteran Veteran

    Messages:
    86
    Likes Received:
    39
    First Language:
    English
    I've run my own exploratory MV game on my Galaxy S6 just fine and all I did was follow the directions in the MV help file (I haven't seen the video OP linked above). When I run the game it had no issues with audio or performance except that I had to tap the menu screen once to get the BGM playing (though I suspect this is a simple problem to fix).
     
    #9
  10. RyokuHasu

    RyokuHasu Developer Veteran

    Messages:
    274
    Likes Received:
    37
    Location:
    Nebraska
    First Language:
    English
    @KisaiTenshi

    There are great places to get websites with unlimited space and data transfer for less than $8 a month, complete with tech support and a whole list of features. Really if you can't afford a site for less than maintaining a WoW subscription then you probably won't be making a game for production with easy accessibility anyway.

    Besides if you are going to have a game that you plan on selling commercially or just have a lot of people play it you might want a site for it anyway. =P

    Personally I use Hosting24 for cheap reliable hosting of my site, I even checked the TOS to make sure I could host a game there, nothing against it. (just don't let tech talk you into starting a VS, they will try to upsell you stuff when you don't need it if you ask for tech support, most tech support does that, it's what they are told to do)

    And I checked my sample game that I put on my site to see if it would work in the proposed manner on an android, it does. And data transfer for the game is repetitively low compared to say steaming youtube. so unless you have the lowest plan at your carrier it shouldn't be a problem unless you binge youtube for hours a day on your phone.

    One such game that also does internet connected single player gameplay is "If my Heart Had Wings", they do that so the data files form the game don't fill up your phone/other device. people generally don't like having bloated apps on their phone, they generally are the first thing to go if the user needs more space for something else. A simple browser app that takes less than 2 mb is more likely to stay on a phone/tablet than a 300 mb game. hell even put in a "Recommended to play on Wifi" in the description or as a info popup
     
    Last edited by a moderator: Nov 10, 2015
    #10
  11. Faytless

    Faytless recently unemployed Kung Fu Master Veteran

    Messages:
    234
    Likes Received:
    157
    First Language:
    English
    Primarily Uses:
    N/A
    just throwing my 2c out there,  but with monthly coupons you can get web hosting from godaddy for $20/year + proxy.
     
    Last edited by a moderator: Nov 10, 2015
    #11
  12. KisaiTenshi

    KisaiTenshi Veteran Veteran

    Messages:
    310
    Likes Received:
    121
    I'll stop you right there as you clearly haven't hosted anything with significant traffic. I work with a dozen servers that makes 7-figure profits per year spread over a hundred sites. It is VERY expensive to host something that is popular. Most "web" game content is not designed like RPG Maker MV is (the closest being some flash games) and 8$ hosting plans will just boot you off the minute your site is popular enough that it makes the server fall over.

    And these bulk hosting sites often have their servers setup in the worst-efficient way possible due to security issues involved with bulk hosting untrusted customers. So not only do you get a substandard service, but you ALSO have to compete with other customers on your server, which there might be thousands of, for CPU time. There is a reason why those sites are popular for spreading malware, the customers are not smart enough to know their site has been hacked... possibly by other users on the same server.

    Whenever you see the word "unlimited" in hosting marketing, run away. That means "unlimited until we can't profit from you, or there are too many complaints". These host packages are designed for "business card" pages and personal blogs. Not rich visual content.

    08:32:15 up 32 daysRX bytes:450076879835 (419.1 GiB) TX bytes:10129563633957 (9.2 TiB)This is what a server looks like that hosts visual content. The most popular site I manage actually does 50% more than this and is just ONE site.
     
    Last edited by a moderator: Nov 10, 2015
    #12
  13. RyokuHasu

    RyokuHasu Developer Veteran

    Messages:
    274
    Likes Received:
    37
    Location:
    Nebraska
    First Language:
    English
    And how long would it take for a site with a decent sized RPG that's decently to exceed profitable volume? I made a small multiplayer online game and there was no problem hosting it on small cheap server with 300 active users. Unless someone is making the hottest indie game in recent history I don't see a problem with the volume. yes you threw out some fancy numbers for a professional server but even so a web site with even a few games hosted on it are not very likely to get popular enough to warrant being thrown off the their service they might pressure you into upgrading, but if you are that popular you should probably consider upgrading anyway if you are commercially selling.

    As for security exploits I monitor the logs on my site enough to know It's never been a problem, only problem I ever had was with spam bots crawling my forums but a quick and effective security measure stopped that.

    Glad that you run server's that make oodles of money, but really any web server will do for a project till they need to graduate to a better service. Popularity won't come overnight so you can take you time to upgrade as you need to.

    If you have further things to add, please PM me so this topic can get back on track.

    Edit for clarity: the small online game I made used a very old homebrewed engine that was very inefficient with handling map data maps were sent any time you traveled to it and like a horrible 5 layer version of RPG maker XP maps with large amounts of meta data per tile if any Object or mob spawn was on it. And all map editing was done live so if someone was editing the map with people on it it uploaded the new map and resent it again to all users on the map as they were still on it. The data transfer was a bit inflated for an online game due to using such a clunky system. other data files were ok constantly being sent, but maps took a massive drain. sending 50mb severy few seconds for every map transfer was annoying, but my server didn't shut down until the project files themselves became corrupted cause VB6 didn't play well on newer computers. Nice that I don't use such an ancient homebrew anymore. 
     
    Last edited by a moderator: Nov 10, 2015
    #13
  14. KisaiTenshi

    KisaiTenshi Veteran Veteran

    Messages:
    310
    Likes Received:
    121
    Not very long. The way RPG Maker MV is setup right now, it absolutely crushes anyone who tries to host it themselves. You are looking at games that range from 100MB to 2GB, and the game reloads the tileset,music and sound effects every time the map changes, and the map may be a few MB itself if it has a lot of events. 

    You can not compare a MMO server- (which the assets are never downloaded more than once, thus it's network traffic is closer to 2KB/sec per user) with that of a client-sided game that is entirely run in the brower as a website, which may pull 100MB every time someone initially visits the site and another 10MB every time the map changes.

    Go look in this thread http://forums.rpgmakerweb.com/index.php?/topic/49950-just-a-small-request-can-you-access-my-game-from-your-browser/
     
    Last edited by a moderator: Nov 10, 2015
    #14
  15. PrkchpsNaplsaws

    PrkchpsNaplsaws Grandmaster Newb Veteran

    Messages:
    79
    Likes Received:
    24
    Location:
    United States
    First Language:
    English
    well - i wouldn't be interested in a work around like that any-who ... I don't anticipate I'll be creating the next Fallout 4 - so I don't see it being largely popular for this to even be an issue.

    I have gone through the unbelievably long, enormously un-advertised process of converting the game to be playable on android as described in the manual, as well, and I am having identical results.

    I think there needs to be an asterisk added to MV advertising.

    Export to Mobile*

    *It will be one of the most long, arduous processes you've ever had to figure out, and it won't even really be a true export, but you will at least have a chance of it working.
     
    #15
  16. metronome

    metronome Veteran Veteran

    Messages:
    348
    Likes Received:
    142
    First Language:
    English (Sure!)
    Okay, after reading all the posts above, I think we gonna need fix to this lag issue.

    I have converted my test project into apk using intel xdk and it runs really slow whereas using the same smartphone (quadcore with 4 gb ram smartphone) I can run something like Chaos Ring 1+2 smoothly with no problem at all.....
     
    #16
    Ashouse and Galenmereth like this.
  17. KisaiTenshi

    KisaiTenshi Veteran Veteran

    Messages:
    310
    Likes Received:
    121
    I'd only even remotely recommend creating a website for it as a collaborative effort with artists/alpha-testers. Actually releasing a MV game this way would be expensive otherwise. 

    Although the game can be converted to mobile, it has to be bluntly stated that HTML5 is a platform, and if you're not designing a game with that in mind, you're in for a world of pain. Small maps (eg 64x64,) few events per map.

    2D games running on a 3D card have (sometimes severe) input latency because the compositing process is completely backwards from how 3D is composited. You can't do tricks that "throw away" pixels that aren't seen because it affects the layering.

    A quadcore with 4GB of ram doesn't make it high end CPU. Which is kinda the point I'm trying to make above. Unless you specifically tune your game for mobile (eg small maps, very-low polygon meshes) based on how a mobile device operates, a one-size-fits-all approach is completely wrong.

    Like, for serious, if I wanted to make a mobile RPG with MV, I'd make sure no map is larger than 32x32, maybe 64x64 if you have few events (eg an abandoned town.) If you've seen what the JSON files for a map look like once exported, you'd also quickly realize that the events are not exported as "native code" but are rather interpretated into javascript objects each and every time the map is loaded. So there is a lot of loading overhead with map changes that probably wouldn't happen with previous RPG Maker products.

    Play any game converted from the PSP/Vita/Mobile-phone (eg the Neptunia series) on a desktop and notice how maps are super-super small and there are few moving objects. Like in the case of the Neptunia games, you can walk from one end to the other end of a 3D map in about 30 seconds, each map is probably the equivilent of a 1000 sq foot room and might have maybe 10 moving objects. Late PS1/early PS2 games did much of the same thing, where the actual 3D space was relatively tiny.  

    People get this strange idea that because a game like minecraft runs on all devices and is insanely huge that it actually is a benchmark for how games should be developed. It's not, Minecraft is a mathamatical algorithm that gives it the illusion of infinite sized maps. For all intents, the entire reason Minecraft looks the way it does is because it's procedurally generated and "nothing" runs that isn't within earshot of the player.
     
    #17
  18. metronome

    metronome Veteran Veteran

    Messages:
    348
    Likes Received:
    142
    First Language:
    English (Sure!)
    Quadcore + 4 gb ram android is common in smartphone world. At least that's what happened in my country....It is not high end for sure, but if you cant run 200 MB+ rpg game on those android smartphones , then the chance for commercial purpose (for 200+ MB RMMV made rpg games) on those smartphones are gone.

    The game I am tested is no more than 25x25 in each of the map made in the game. There are no more than 5 events in one map (excluding transfer events of course....). And there is no particle, fog, etc on it, not even parallax.. All graphics are RTP for testing purpose.

    I do use a lot of plugins though (20 plugins). Will using a lot of plugins affect the performance in android phones?

    And I remember you mention somewhere here(I forgot the exact location) that iOs will be able to run RMMV games smoothly. Does iOs runs on apk?

    EDIT:

    I don't play minecraft, so I don't really know. But after a closer inspection of chaos ring, I think you were right. Even though its graphic looks pretty cool I see that each of the map is not really big, and there are surely not so packed with events....hmmmm.
     
    Last edited by a moderator: Nov 16, 2015
    #18
    Ashouse likes this.
  19. KisaiTenshi

    KisaiTenshi Veteran Veteran

    Messages:
    310
    Likes Received:
    121
    The plugins replace code already loaded in memory, it does depend what the plugin does since they are loaded before the game even starts.

    The Android systems run crosswalk (which is basically Chromium.) The iOS builds use the built in WebView which is Mobile Safari. Some iOS devices can run a game smoothly, but it's pretty clear there is something naive in the code that is causing the game to try and run at the maximum refresh rate of the screen (60fps) , because if you run the desktop version on a system with a 120 or 144hz refresh rate, everything runs too fast.

    www.goodboydigital.com/pixijs/bunnymark/

    This is a "benchmark" of Pixi.js , my iPad3 gets to 9000 before it drops below 60fps. My desktop completely laps the iPad by a factor of 6, and I can max out the benchmark at 200,000 bunnies and still get 15fps on the desktop. 

    So that tells you that something is wrong in how MV is approaching this, becuase on the iPad 3, the square root of 9000 is about 94. So a map larger than 94x94 should certainly run less than 60fps. 

    A rough calculation of how big a map could be and still get 60fps on a device would be running the bunnymark and drawing the line at when it drops below 60fps, and taking the square root of that number. Even though a map might not be all animated, stuff like the water tiles generally are. And since there are several layers, this might even be reduced further depending on the map complexity.

    Now, keep in mind this is me saying " 9000 moving objects", not "9000 static objects", so it's a question of how many objects are visible.
     
    Last edited by a moderator: Nov 16, 2015
    #19
  20. metronome

    metronome Veteran Veteran

    Messages:
    348
    Likes Received:
    142
    First Language:
    English (Sure!)
    So to summarize:

    RPMMV made game must either run (at 60+ FPS) or lag behind (below 60 FPS). right?

    That certainly is something wrong with the RPMMV then....

    I tried that bunny link and sadly my smartphone doesn't even run at 60 FPS right from the start (2 bunnies) LOL

    I started at 46 FPS~~ drops to 24-25 FPS during 9000 bunnies....

    that means my android device won't be able to run RMMV games smoothly until there is further fixes to this? uhmmmm>.<
     
    Last edited by a moderator: Nov 16, 2015
    #20

Share This Page