Thursday, February 20, 2014

Playing Android Games in Emulator - Review #01

Emulator: Genymotion v2.1.1 powered by Oracle VirtualBox v4.3.6
Virtual Device: Galaxy S2 - 4.1.1 - API 16 - 480x800

I can't imagine any persistent (read: long running) activities performed in android device other than gaming. Lame excuse? anyway... I'll separate the review in 2 sections; the first focuses on game-play while the 2nd on the more technical side.

Game Play

Guardian Cross - installed, doesn't work.
Clash of Three Kingdoms - installed, doesn't work; more on Technical Side below.Tower of Chaos - Game designers definitely think in different wavelength / channel. I don't even know how to play the game.
Castle Clash - Hang early on. Since the beginning of the game is weird, I don't have the urge to try it for the 2nd time (weird: I was forced to watch a raid for few minutes, and I was lost; I didn't even know whether I was the attacker or the defender). In the world with abundant options, if my interest is not piqued in the 1st minute, bye bye.
Hero Dream - It's a fun RPG game. The generous gifts and item drops easily rank first in any platforms. This factor should be able to retain beginners attention for 30 minutes, raising the probability of players' attachment.
Unfortunately, it hangs very frequently, beyond my level of tolerance.
Pet Alliance - A typical monster breeding game: fight, capture, train, evolve, arena, all the usual stuffs.
The smoothest game I tried thus far.
Devil Maker: Tokyo - A typical card battle game. The concept of level ups, evolution and equipment are not unique yet nicely refined here with strong emphasis on sacrifices; to enhance a card one would be forced to sacrifice lots and lots of other cards.
By the way, it hangs frequently. I can't put the entire blame to the game though. Simply getting the virtual device to run under Genymotion is quite a challenge.
Valkyrie Crusader - Another card battle game. No login required, account binding to device hardware. Once I realized another has played this game I decided not to mess with his/her save game.

Technical Side

Memory Leak

Pet Alliance - No noticeable problem - the game runs smoothly without noticeable degradation after extended play.
Devil Maker: Tokyo - Huge memory leak. The game slows down to a crawl after playing 3-15 minutes; especially after performing actions that require lots of scrolling/swiping. As the game becomes less responsive, swiping speed must be calibrated down to match the degradation. Once the slowness becomes unbearable, simply quit and re-run the game - it should run normally. Well, at least it seems to indicate that Java's garbage collector works.
The fact that swiping speed must be calibrated down led me to believe that Genymotion plays a role in slowdown symptoms. I drew a parallel to the game Myst. When my friend 1st played it from Windows 3.1, game speed would slowdown after some time. (Re-)run-quit cycle was a necessity. Once he tried it under Windows 95, however, the game ran smoothly. My conclusion: Myst developers made a mess that overwhelms Win3.1 yet manageable by Win95.

Network Requirement

Pet Alliance - light. Works even when persistent ping to google reveals gaping connection (Request timed out.) However, when network connection is lost halfway, it can't recover.
Devil Maker: Tokyo - heavy, not sure whether it's bandwidth or latency or both (though I suspect latency is the bigger issue here).
On the up-side, it handles network disruption. After certain (attempt) window is breached, it would prompt users about network issue. This exception handling is not perfect though, there were some occasions when the loading cursor kept on spinning even when network connection has been fully restored (solid responses from persistent ping, retrieving google page was instantaneous). It seems this issue is not exclusive to emulator. Someone gives affectionate nick "loading wheel of death".
Valkyrie Crusader - Every time there is network disruption, I would be kicked to the welcome screen. Better handling than Pet Alliance, but still annoying.
Granted, this issue is application specific rather than emulator's issue. Is there a way for the emulator to simulate network disruption? This would simplify developers effort to replicate the problem.

Screen Refresh Issue

This problem should be attributed to Genymotion; though I don't know how/why this 'feature' exists.
To replicate: simply start the virtual device and keep it in the background (obscured) while working on something else. After enough time (10 minutes?), come back to emulation window. The screen would be outdated. Tapping a button would yield no visible effect. Screen refresh can be forced by either moving the emulation window or by switching to another window then switch back.
A (much) faster way to replicate: lock window (Windows-L) then re-enter.

Lack of Support for Adobe AIR

Tried Clash of Three Kingdoms and was prompted with context3D not available! Possible reason: wrong renderMode or missing device support. Search results consistently points to Adobe AIR.

Account Binding to Device Hardware

Observation on Valkyrie Crusade let me to believe this application uses device hardware (mac address?) to identify client. There was no login and I saw some mail correspondences days before I installed this game.

Fail to Start Virtual Device

I can't see any pattern that leads to this problem, but I've experienced it often enough.
I've tried to check the logs but couldn't find anything that helps. Not that I expect much; this problem is unhandled exception and Qt (that used by Genymotion) doesn't rely on exception mechanism.
I also find no reliable pattern to recover from this problem; simply that it would work eventually if I persistently tried to play it.

Abrupt Closure

Similar to above, Genymotioin may close its virtual device window unexpectedly. In both cases virtual device would still be running under Oracle VirtualBox. I would have to go to VirtualBox to force its closure.

Conclusions

For Casual Users

If you have low tolerance to abrupt hangs (and possibly quit - re-run cycles - refers to Memory Leak above), this is not for you. You may want to check bluestack, though here and here mention that Guardian Cross doesn't work (yet).

For (would be) Developers

The Ups

  • Genymotion is faster than the official emulator provided in Android SDK. Much faster when compared to the SDK that I briefly tried 2 years ago.
  • Memory leak issue above can be considered as a 'feature'; if the circumstance manages to force developers to implement proper memory management.
  • Despite its shortcomings, it's definitely cheaper than investing in actual devices.
The Downs

  • Some (most?) may argue this is the nature of pure emulation rather than a flaw: It's not the ideal environment to test an application using Device Hardware Account Binding mechanism.
  • Lack of (out of the box) support to Adobe AIR limits its usage.
  • Reliability issues (memory leak and abrupt closure)  may lead to finger pointing / denial of responsibilities. When a problem occurs, the root may lay in the application or Genymotion or Oracle VirtualBox or combination of them.

Monday, February 10, 2014

Playing Android Games Through Emulator

Hmm, suddenly got the urge to try playing android game(s) through emulator.
Currently trying 2 games: Guardian Cross and Devil Maker: Tokyo.

First try with AndroVM Although both games could be downloaded smoothly from Play Store, I couldn't play any of them.
Second try: Genymotion - the successor of AndroVM. Immediate problem: Play Store is not bundled in for Genymotion v2.0. Genymotion is currently working to address this issue, but until then...

How To

  1. Get Oracle Virtual Box v4.2 or above (at the time of writing the latest is v4.3.6). 
  2. Get Genymotion v2.0.1 - Windows has 2 versions of installer; one bundled with Virtual Box, the other without. 
    Registration is required before download is enabled.
  3. Run Genymotion, click on Add button - select your emulated/virtual device (I chose Galaxy S2 4.1.1)
    To download a virtual device, you need to login within Genymotion using your Geny account.
  4. Download necessary stuffs based on this
    In my case I got ARM Translation Installer v1.1 and Google Apps for Android 4.1
    Don't bother extracting the zip files.
  5. Click on Play button in Genymotion
  6. Drag ARM_Translation.zip and drop it into the emulator window.
  7. It should say "File transfer in progress", once it asks you to flash it click 'OK'
  8. Reboot your device (power off - directly closing emulator window is not recommended)
  9. Do the same for gapps-...-signed.zip.
  10. Try to install your game(s).
  11. Try to play your game(s).

Troubleshooting

Disclaimer: It's far for comprehensive and it won't be comprehensive - just marking the holes that I stumbled upon.

Validating Play Store Installation

  1. Try to find Netflix and Google Drive and try to install them.
Well, I managed to see Google Drive but I still got the problem as below.

"Your device isn't compatible with this version"

In my case I got above message.
I recalled seeing a brief pop-up message that obscured by "File transfer in progress" window and tried to capture it by repeating gapps-...-signed.zip flashing. On my 3rd try I managed to get 2 messages: "unfortunately google search has stopped" followed by "unfortunately google play store has stopped".
Searching on the latter message brought me here.
After performing  step #1, #2, #3 and #5 laid out by GSDer,
  1. go to Settings -> Application manager -> ALL, find 'Google Play Store' and select it - Clear cache, if that doesn't work Clear data, if that doesn't work Force stop; if that doesn't work Uninstall updates (restart the phone between each intermediate step)
  2. go to Settings -> Application manager -> ALL, find 'Google Services Framework' and select it - Clear data, if that doesn't work Force stop
  3. go to Settings -> Application manager -> press the Menu button -> select 'Reset app preferences'
  4. go to Settings -> Application manager -> ALL; scroll to the very bottom of the list and see if 'Downloads' is disabled - if it is, Enable it; also see if 'Google Account Manager' is disabled and if it is Enable it
  5. go to Settings, find the Accounts group, select Google, select your Gmail address then select the 'Remove account' button. Restart the phone then add your Google account back.
I managed to install both Guardian Cross and Devil Maker: Tokyo.

System Not Responding

The title doesn't represent the actual message prompted to users. Even after "successful installation" the emulator hangs quite frequently.
Note that even though the Genymotion emulator window is closed, it may still run behind the screen. To verify, go to Virtual Box and check the status of said virtual device.
If it still running, just send the kill message: Right click --> Close --> Power Off.
Afterwards you can try to play the virtual device from Genymotion again.


Other Problems

Search &/ ask in stackoverflow or elsewhere.


Trial Run

Guardian Cross - Failed to Run

If I have the time I may try a virtual device with tablet - landscape form-factor. It seems like rotate screen feature in Genymotion is not perfectly emulated. When I set the screen to landscape and turn off auto-rotate, it would immediately switch back to portrait.
Emphasis on may: Guardian Cross' hunt requires simultaneous control of both hands. Replacing the functionality with single mouse would be challenging.
Only issue is, with a Computer Emulator is you got to right click to unlock ur mouse, then click fire, then left click to relock your mouse, right click to unlock it and click on fire... Unless Blue stacks has some way around this when they add in GC. Can't remember which one I tried using like 6 weeks ago, but it was garbage. - source.

Devil Maker: Tokyo 

Went through the tutorial - up to killing the first boss devil. The game-play is quite nice so far; but the loading time is definitely a big turn-off.

Thursday, February 6, 2014

Minmei Publishing Company Excerpt #01

The Hare of Inaba

As the name suggests, it had its origins with the old legend of a crafty hare who tricked the sharks into helping him cross the ocean by offering to count them, but at the last minute his true colors came out and the sharks tore his skin off.
It received this name from the danger of hopping between cars. It has a low survival rate, and every time it is done, many are reported dead or injured.
* Please do not try this at home, wise reader.
From "The Otokojuku White Book 2000" by The Minmei Publishing Company.

The Great Chime

In the Warring States period, during Takeda Shingen's battle with Uesugi Kenshin, Shingen wanted to encourage his soldiers fighting far away though he could not send reinforcements. He had a thousand soldiers lined up in his camp, and had them all shout at once. The shout could be heard from 25, or 100 kilo meters, away... On a similar note, during the National University Baseball tournament of Showa Year 15, W University's cheering squad was said to be heard all the way from Kamiya Stadium to Ikebukuro.
From "An Inquiry of The Warlords of The Warring States Period" by Minmei Publishing Company.

Household Items as Weapons

Long ago in our land, the leader at the time strictly forbade the people to carry weapons.
It was only natural that the people would develop fighting styles using household items around them as weapons. Common items included clogs, khsiers, and umbrellas. As a digression the phrase "I won't even need to take my clogs off" said during battles is an indication of the usefulness of clogs as weapons.
From "The Encyclopedia of Ancient Japanese Martial Arts" by Minmei Publishing Company.

Ki

Ki refers to the energy of life that all humans are born with. According to theory, its power holds limitless possibilities, and has potential applications in medicine, sports, and countless other fields. Example of its power is seen in the martial artists' story of the saint of the sword, Tsukahara Bokuden, who was said to be able to cut a stalk of bamboo with a slice of paper injected with his ki.
From "Biographies of the Japanese Swordsmasters and Sexmasters" by Minmei Publishing Company.

Master of Crocodile 

In South Asia, there are regions heavily populated by various killer crocodiles. In the 18th century, a technique for controlling these crocodiles was developed by a secret tribe of beastmasters. Using this technique, the tribes defended their territory from outsiders. For this reason, crocodiles are considered sacred and their religion worships a crocodile god. Even now, in certain South Asian countries, the killing of a crocodile is a capital offense. Last year, a Japanese tourist caught unwittingly carrying a crocodile-skin handbag was hanged. - Crocodile Dandy.