Author: admin (page 2 of 3)

Theseus’ new graphics

So a week back I released a major upgrade of Theseus with new graphics. The hypothesis was that the old “characters” didn’t have enough character, so players couldn’t relate to them in any meaningful way, and that the new more lovable Theseus and the now meaner looking Minotaur would engage the player more.

I never really figured I needed characters, since I classified this game in the same genre as chess or some such. Chess usually doesn’t have real characters (which laugh or cry). Then again Theseus is a bit less known than chess (just a hint). Having good characters shouldn’t at least take away from the game.

After a week I haven’t seen any difference in downloads, but maybe a slight decrease in bounce rate. The people I asked liked the direction of the new graphics and no one has complained thus far.



To see more just check the screenshots on android market

Using Java 6 processors in Eclipse


UPDATE: 2014-02-26
This tutorial was written with an older version of Eclipse.
Andrei Bârsan informed me that at least in Eclispe Kepler with Java 1.8 the messages printed using the messager no longer show up in the editor or problem log, but in something called the “Error log”.


I couldn’t find any complete tutorial on this and wasted a couple of hours figuring this stuff out.

So here you are, hopefully it’ll save you some time.

JDK5 introduced the APT (Annotation Processing Tool).
It was part of the sdk but the classes were part of the unofficial com.sun.* namespace, and you had to use the “apt” tool to process the source code.

JDK6 cleaned up the api and integrated this stuff it into javac itself so you didn’t need to use the separate apt tool anymore.

Apparently built for processing source code with annotations before they are compiled into classes, it can also be used for all kinds of fun like code generation and code analyzers which are IDE independent; and you don’t even need to use annotations necessarily. I think the JPA2 meta-model used in its criteria api is implemented with this.

I made one very contrived example of java6 processor usage with Eclipse. All of this is possible to integrate into a maven build but I’m leaving that out and focusing on how I got this processing to work within Eclipse.

So we’re creating a processor which will generate a new class for each class in projects compiled using this processor. Additionally we’ll create a Warning for each class which starts with a T. Yes it’s silly.

Step 1: Create the processor project

@SupportedAnnotationTypes(value= {"*"})
public class SillyProcessor extends AbstractProcessor { 

	private Filer filer;
	private Messager messager;

	public void init(ProcessingEnvironment env) {
		filer = env.getFiler();
		messager = env.getMessager();

	public boolean process(Set<? extends TypeElement> elements, RoundEnvironment env) {

		for (Element element : env.getRootElements()) {

			if (element.getSimpleName().toString().startsWith("Silly")) {
				// We don't want generate new silly classes 
				// for auto-generated silly classes

			if (element.getSimpleName().toString().startsWith("T")) {
					"This class name starts with a T!", 

			String sillyClassName = "Silly" + element.getSimpleName();
			String sillyClassContent = 
					"package silly;\n" 
				+	"public class " + sillyClassName + " {\n"
				+	"	public String foobar;\n"
				+	"}";

			JavaFileObject file = null;

			try {
				file = filer.createSourceFile(
						"silly/" + sillyClassName, 
			} catch (IOException e) {


		return true;

Without creating this META-INF entry I couldn’t get the processor to register in Eclipse.



Its only contents is the name of the Processor implementation. I guess you might be able to list several processors here, although I’m not sure.

That’s it. Now export it as a jar and use that jar in other projects where you wish to use the processor.

STEP 2: Create a project which uses your processor.

In the properties for your new project go to Java Compiler -> Annotation Processing
Check the “Enable Project Specific Settings” and make sure “Enable annotation processing” is checked. I also changed the generated source directory to a name which didn’t start with a dot so it wouldn’t be hidden in the package explorer (files or directories which start with a dot are by default filtered away in eclipse).

Next off go to Java Compiler -> Annotation Processing -> Factory Path
Here you should add the jar of your processor project. You cannot use project references.
Press the “Advanced” button and you’ll be presented with a dialog which contains the processor you defined in your META-INF/services/javax.annotation.processing.Processor file. Select it and press ok.

Step 3: Build!

We’re practically done. Here’s what it looks like for me in my project:

So we get a warning for the Thing class because its class name start with a “T” and for each class in the project we get corresponding “Silly” classes generated. These are compiled and usable just like any other normal class.

For more info check out the eclipse jdt/apt docs, this bit about creating a code analyzer or the offical docs

Theseus Video Tutorial

Behold! An amazing video tutorial for Theseus on the Android:

It occurred to me that it might not be a bad idea to create a link to this directly from the app.
Since I think nearly all Android phones have a Youtube app, just dispatching a “youtube intent” with the url should open this video in the native youtube player.

Maybe in the next update.

Stats -> Analysis -> Reaction -> Result!

So I’ve had Google Analytics enabled on Theseus for a month now and I’ve got some stats now I can react to, and I have.

This graph show the amount visits per day since I installed analytics:
Theseus Visitors 2010-12-05 to 2011-01-08

The spikes there occur when I update the game. I usually update in a weeks interval so I can get the game into the “Just In” list. Update more often than that and your app will simply just not show up there.

So now that I have some data I started to mine. I can see stuff like which is the most replayed (i.e. most difficult) level for old players (recurring visitors) and new players (new visitors). Good stuff; but I know that some levels are going to be harder than other.

I started digging into the stats and turned up with this:

The segment is new visitors and it measures how long they spend inside the game. While the average time spent in the game was something like 20minutes, over 44% left it under 10 seconds. Yikes!

Now some people may just start up a game and quit to try it out later, but hardly 44%. I’m doing something wrong here.
My reaction was to create a big “Start Playing!” button on the title screen which takes you directly to the first unsolved level. Tutorial 1 for new players.

I released it a couple of days ago and here are the same stats for the last couple of days:

Down to 37%. I’m not a statistics guy but I guess that’s outside the margin of error.
I guess that it’ll get even lower for regular days when the game hasn’t been in the “Just In” list.

This way of improving your product is a whole lot more effective than speculating what to do next. Feedback loops are important.

Google Analytics for Android

My last update for the lite version included analytics support and now I have some interesting statistics about usage.

For each loaded level and activity startup I made it track a page view.
For each menu button press it tracks a event.

Here’s a screenshot of my Theseus Lite Google Analytics dashboard:
Theus Lite Analytics

To setup it in your app check out the documentation.

A Message from Android Market


Over the next several days, we’ll be updating Android Market on devices running Android 1.6 or higher. We’re writing to alert you to several changes being introduced with the update that may affect your applications:

* The details page for every app will now utilize and display the app’s “Promotional Graphic” assets at the top. If you haven’t done so already, we recommend uploading “Promotional Graphic” assets for your apps as soon as possible.

* Users will be able to filter applications by content rating. If you haven’t added a content rating for your published apps, you should do so immediately at the Publisher site by December 15 — applications or games without a rating will be treated as “Mature”.

* We will be reducing the purchase refund window to 15 minutes.

* We will be increasing the maximum size for .apk files to 50MB, from the current 25MB.

* Market will support filtering based on screen sizes and densities, as well as on GL texture compression formats. Filtering is based on and elements in an app’s manifest.

* If your app includes wallpapers or widgets, Market will automatically add them to new “dynamic” categories, based on their manifest files.

Thanks, and we look forward to continuing to work with you on Android Market.

The Android Market Team

©2010 Google Inc
1600 Amphitheatre Parkway
Mountain View, CA 94043


I read a blog post which had a video from the Angry Birds creators on the Google blog the other day and it had some effect on me.

The thing that struck me most was the word Retention. They said they keep updating the game to keep players coming back. I’ve kept updating Theseus too, but not for the same reason. I updated to keep the game on the “just in” lists. I’ve been scrambling to figure out new features to develop and other ways to improve the game to get reasons to update. These Angry Birds guys just add a few levels now and then.

Why am I not doing this instead?

That keeps old players updating and coming back, and old customers are your best way to new customers. As long as they keep playing and keep active they’re more likely to spread the word.

Retention baby, retention!

512 x 512 Icons required in Android Market

That icon is mandatory. Android market won’t let you update your app without it.
Also they’ve enabled the inclusion of a high-res feature graphic (1024 x 500) and a link to a youtube video of your choice.

I don’t think a 512×512 icon will be of any use on a mobile phone, but Google TV springs into mind.
Still, 512 x 512 is like a proper resolution cd cover image, so I’m guessing some sort of coverflow-like interface, or maybe just a grid where selected square zooms into full res.

Older posts Newer posts

Copyright © 2015 KEREBUS

Theme by Anders NorenUp ↑