(RELEASED) Testing requested: Jewels for Android

Like teletubo, I’ve been working on my first Android game, and now it’s mostly done. I’ve been developing on HTC Hero, so I’d very much appreciated if those of you with other Android devices could test the game for me. :slight_smile:

The game is an Android-port of the original PC-version, which I did earlier as an XNA exercise. It’s a Bewejeled-clone, nothing too original :persecutioncomplex: – still fun to play for a while. I’ve built the game using the 2.0 SDK, but it should work on all Android devices since 1.1 (also those with small QVGA screens, although it might be difficult to touch where you wanted to)…

Here’s a screenshot and the download link:

http://www.mhgames.org/files/temp/jshot.jpg

Download the .apk (UPDATED version 1.01)

Unless there is some problems, I expect to release this sucker on the Android Market in a few days, for free of course. 8) Thank you for testing, hopefully it works!

UPDATE: Released on the Market!

Works fine here on my Hero (as expected I guess). I didn’t get any sound (not sure if there was meant to be any?). There were a few stutters in plan but nothing more than I’ve seen in other games.

Good job :slight_smile:

Kev

Thanks Kev! There should be sound though, is it enabled when you go to the Settings? Also, try clicking the (physical) volume up button a couple of times, it should increase the media volume. And yeah, the stuttering is annoying, perhaps I should have went with OpenGL ES instead of Canvas… Could do still more optimizations, also.

Hey
the game looks very good, very well polished .
I played without any problems. And sounds worked fine here .

However,I then pressed Home , and opened the game again and got a force close, just after the logo:


 Uncaught handler: thread RenderingThread exiting due to uncaught exception
 java.lang.NullPointerException
     at android.graphics.Canvas.throwIfRecycled(Canvas.java:941)
     at android.graphics.Canvas.drawBitmap(Canvas.java:962)
     at org.mhgames.jewels.rendering.Sprite.render(Sprite.java:55)
     at org.mhgames.jewels.rendering.JewelsRenderer.drawFrame(JewelsRenderer.java:32)
     at org.mhgames.jewels.rendering.RenderingThread.run(RenderingThread.java:114)

the funny thign is that after I pressed Force close, the logo appeared again and the game started normally… well ?

Thanks! I cannot seem to be able to reproduce that one. It tries to render a sprite whose Bitmap has been recycled. I can add a check to not to do that, but doesn’t really nail the original cause of the problem. Well, I guess it’s better not to render than to crash. :slight_smile: Will take a look at the code later, if I can spot anything.

Sorry being a paranoid newbie to Android I got slightly put off by the allow application to “modify/delete SD cards contents” message during installation. Is there any reason for this (I assume you can persist any data directly to the phone?).

The game doesn’t use SD card in any way, only the phone storage. I don’t even declare any permissions in the manifest file. I suspect the message you’re getting is related to installing an app from untrusted sources, i.e. not from the Market?

I should hope it doesn’t display that when installing from the Market… :slight_smile:

Okey dokey! As I know/trust you from JGO I went ahead with the installation. I would definitely check if this happens after installing in Android Market as this would certainly be enough to put me off installing.
I also get a Force Close same place as teletubo (have HTC Magic btw) with the same effect (i.e after accepting the force close -> back to logo and works)… This has happened about 50% of times so far. Not at home so can’t offer you a stack trace (presume its the same as Teletubo’s tho)
Other than that very impressive. The game looks very polished, graphics/presentation all first class. and didn’t really see any other issues.

I don’t think it happens in Market… at least hopefully not! When installing stuff from the Market, I’ve only seen warnings about certain phone features the app has access to (like vibration, full internet access) – these are the permissions you need to declare in the manifest file AFAIK. I don’t have any of those as I don’t need them currently.

One thing occured to me as I’m typing this, if you go to Settings -> Applications, do you have the “Allow install of non-Market applications” option checked?
EDIT: No, that’s not it. I tried and it just wouldn’t let me install…

[quote]I also get a Force Close same place as teletubo (have HTC Magic btw) with the same effect (i.e after accepting the force close -> back to logo and works)… This has happened about 50% of times so far. Not at home so can’t offer you a stack trace (presume its the same as Teletubo’s tho)
Other than that very impressive. The game looks very polished, graphics/presentation all first class. and didn’t really see any other issues.
[/quote]
Thank you for testing and the kind words! :slight_smile: Interesting that force close thing. So it happens exactly in what point, after the logo has faded out? Or while it’s still visible? Very strange that it works after the FC! :o


[b]UPDATE:[/b] I have released an updated .apk, it's at the same location as the previous one. You might need to uninstall the previous version first (`"adb uninstall org.mhgames.jewels"`). It shouldn't crash in the same situation the first version used to. Hopefully. :D I've also reworked the background images a bit, previously I was using just cropped versions from the full game. Teletubo and steveyO, could you please test again? :)

It happens between the logo screen and the main menu screen (probably in the loading of the latter) .

To be honest I got this when I wrote hellevators, I realized everytime it called onSaveInstanceState , that is , saved a Bundle, it crashed on onCreate . It tried to re-load the resources, I got this same crash (a force close which didnt really close).

I solved this doing the following :


        if (savedInstanceState == null) {         
        	 new SoundsLib (mHellView.getContext());       
        }  

That is, it will only load the sounds if it’s a brand new instance .

However, that does not seem to be the best option . Yesterday I released an update with the remote stack trace kevglass recommended (which by the way I highly recommend too) , and I already received an e mail with a force close report … and guess where it was ? a sound was not loaded .

I’m still thinking what to do (well not much since I’m at work) , but I’ll probably have to change this soon .

EDIT : so how did u solve it ? :slight_smile:

I was able to reproduce this using the emulator. The menu background sprite was not reloaded properly (I have some perhaps hacky code to prevent it reloading the same background, that probably was the culprit). Then I noticed that it might have been opening several instances of the game, so I added android:launchMode="singleTask" to the activity manifest. And indeed, I haven’t then been able to reproduce it. I guess you should set the launchMode as well, unless you already have.

[quote]EDIT : so how did u solve it ? :slight_smile:
[/quote]
Before I could reproduce the problem on the emulator, I didn’t… I just made it check and not render sprites that have been recycled. :persecutioncomplex: But now it just might work properly, perhaps I could even take the checks out. Hmm.

The .apk has been updated once again, to prevent it launching several instances. Redownload, please! :slight_smile:

Downloaded new version… Tried stop/starting 7-8 times, this time no force closes after logo :slight_smile: Hopefully fixed now!!

Thanks! I went ahead and published the game on the Android Market. :slight_smile: Search for “Jewels”; it doesn’t seem to appear in the “By date”-listing as of yet… It should be able to install over the testing version, if you had it installed.

Now waiting for the first “this doesn’t work!”-comments… :wink:

Very well polished, plays great on my Droid. This is the kind of game my wife loves, so I’m sure she’ll be I grabbed it. :slight_smile:

Hello MH,
sorry to ask this in your game thread, but I just found your game to be very stable and well designed, so I thought just asking you directly .
Do u have many force closes reported ?
How did you manage to load/play sounds and avoid problems with reloading resources ?

I’ll probably release my next android game in the coming month, so I tought I just ask you, who has a LOT of players and probably have solved all of the resources loading/reloading issues .

Thanks in advance

(and congratulations for the success of your game, more than 1 million downloads, wow)

[quote](and congratulations for the success of your game, more than 1 million downloads, wow)
[/quote]
This is truly amazing! :o Congratulations!

Thanks guys! :slight_smile:

Actually I do get a lot of force closes. In fact I had to turn off the email reporting ages ago, since I started getting just too much, cluttering my inbox… :-\

This is actually the thing that bugs me most with Android: there are just sooo many different devices, and although they should in theory support the same things, they don’t. Even with HTC Hero, which I have, I haven’t experienced a single issue or crash, apart from bugs while developing. Yet dozens of Hero users experience freezes and what not. Many people even have to reinstall the game continuously, as they claim it has locked up and cannot be played until reinstall… :-X

I cannot even trust the standard Android alert dialogs! Many people report that the game freezes on the start where I use an alert dialog to ask which playmode to use. Sheesh! >:(

ahem Sorry, had to vent it off a bit… :wink: I just use the standard SoundPool for sounds, I haven’t had any issues. (Except on some phones the system fails to load libsound.so or something, crashing the game… :P)

I also have problems with resources, sometimes the bitmap loading just returns null. Nothing you can do about it, AFAIK. :frowning:

I have sort of given up, the platform is so fragmented it’s practically impossible to make non-trivial games that work consistently. Of course, Jewels is my first Android-game, and it’s ported from XNA, so it possible I have screwed something up. I’ll try to do better on my next game, but I guess it will have a fair share of problems too. My advice: fix the things you can, don’t bother with things that seem completely random on random phones… :persecutioncomplex: :wink:

I guess part of that fragmentation is because people are using all kinds of rooted hacks and custom firmwares, it really removes the possibility of creating robust stuff that works consistently across all models. Which is kinda sad. I’m planning to spread over to iPhone at some point, there are only a couple of devices to support: much better!

Hmm? Is there an easy way to get an e-mail report from an application? Because for my part, I am astounded at how people will complain and complain about bugs in the game - but won’t bother to send an e-mail (which would actually - you know - allow me to try and fix the issue).

Btw - excellent game. I am one of your 1 million installs. :slight_smile:

check this thread out :
http://www.java-gaming.org/index.php/topic,21350.msg174207.html#msg174207

you’ll get a stack trace straight to your e mail when it happens . Kicks ass

Ooh neat; seems I missed that thread. Thanks.