Simple Diet Diary

Simple Diet Diary main screen

After more than a year of spare-time development, I’ve released my new Simple Diet Diary app! It’s a complete rewrite of my old Simple Calorie Count app with lots of new features, including…

  • Multiple nutrients: standard ones, or invent your own
  • Graphs
  • Reordering of entries
  • Time logging
  • Prediction of your next entry based on your habits
  • Cloud backup
  • Share your data
  • …more!

There’s also a companion app which provides a database of nutrition data for easy lookup of foods that you’ve not logged before, and stays out of the way when you’re re-entering your habitual meals.

Posted in Android | Comments Off

Using the Android uiautomator to Record a Promo Video

I don’t usually do something manually when I can write a program to automate it, so I made the promo video for Simple Tasks & Notes using the Android uiautomator tool and ADB screenrecord. Below I’ll share some snippets of code and an Ant script that helped to make it painless.


It was reliable text entry that initially led me down this path, but that wasn’t the only benefit:

  • Subsections of the “script” can be honed in isolation.
  • The video can be re-recorded with minimal effort, so…
  • Small improvements are still worth making and re-recording.
  • Text entry via the on-screen keyboard is fast and flawless.
  • The resulting video needs only very simple editing.

Continue reading

Posted in Android, Code | Comments Off

A New Direction

Simple Tasks & Notes screenshotThe game development has been shelved for now, and I’ve been scratching a different itch. After failing to find a to-do list app that I liked, I decided to write one. It’s taken a year of tinkering in the evenings, but now Simple Tasks & Notes is available on Google Play.

Posted in Android | Comments Off

Sprite Picker

It’s been a slow week, with little progress on the game, so here’s my sprite generator/picker.

The sprites are created by a simple algorithm that generates a sequence of “random” angles and radii. Each sprite is displayed along with the seed value given to the random number generator, so I can pick the ones I like and generate them in-game by using their seed numbers.

It makes a fair number of duds, but this is one of those cases where making it better than “good enough” achieves nothing.

Posted in Visuals | Comments Off

New Enemy – Bursters

These new enemies explode into a shower of bullets when destroyed. The player could just ignore them, but then they’ll lose their accumulated multiplier. Better to time their destruction so that there’s plenty of space to deal with the fallout.

I’ll probably scatter these fairly sparsely, rather than have wave after wave like in the video.

(The new sprite shadows are visible here from time to time as well.)

Posted in Visuals | Comments Off

Shadows for Fun

… fun for me, that is.

These shadows have no impact on gameplay at all, and are barely even noticeable while playing. But during one of those motivational blockages that occur from time to time, I got myself moving again with this bit of eye candy (when I should have been designing more enemies).

When the background beams are pointing out of the screen, the extremities of the sprites are extended into translucent black quads, to give the effect of rays being obstructed. Here’s a video that shows them in motion.

Posted in Visuals | Comments Off

Premultiplied Alpha (in OpenGL)

In a recent post I referred to premultiplied alpha and linked to a moderately wordy article on the subject. I really wanted to link to a short summary, in terms of OpenGL. This is an attempt to write such a summary.

Continue reading

Posted in Code, OpenGL | Comments Off

New Flight Paths and More

New in this video:

  • Some new enemy flight paths: rotational symmetry and “unzip”.
  • More sophisticated scoring: A multiplier accumulates if no enemies escape, and is reset to one if they do. (This is further multiplied by the “number selected at once” multiplier.)
  • Explosion fragments acquire momentum from the destroyed sprite.
  • Player laser shots are prioritised by threat instead of selection order.
  • Reduced overdraw on the background beams: I was hitting the fill rate limit on my phone.
  • Shorter laser beam duration.
Posted in Visuals | Comments Off

Some Visual Tweaks

New in this image: Textured background “beams” and a new enemy sprite.

Enemy sprites are currently picked from a pallette of randomly generated shapes, so they’re fairly throwaway — I’m likely to change these ones.

Unlike last week’s video which was captured from the PC build, this screenshot was taken from my phone and has only 16-bit colour. The effect is quite noticeable on the gradients but less so when playing.

Posted in Visuals | Comments Off

Accessing Android Resources from C++

If you’re writing an Android game in C++ you quickly hit the problem of how to load resources (unless you are targeting Android 2.3). There are already a number of ways to do it.

I came up with a different method that I haven’t found elsewhere, so I thought I should document it. Here’s the gist of it:

Continue reading

Posted in Android, Code, JNI | Comments Off