Tags

The stars at night

2:49pm on Jan 11, 2012

I've been working on an Android program which uses 2D graphics over the past few days, and since it's always nice to have sample code to start from, I dug up my old Android starfield simulation.

I wrote this thing back in 2008, not that long after Android first came out, as an introduction to doing 2D graphics. I've written starfields before, first in C (and modeX) back in 1996, then in Flash's ActionScript around 2002.

I just compiled the Android version, and discovered that nothing has changed in the API since 2008 - a very good thing. I did speed up the animation a little and add more stars, since modern phones are a lot faster, and there were odd gaps in the animation.

You can find all of these versions, with source code, right over here.

Naturally, all source is copyright (c) me, and released under the Creative Commons by-nc-sa license.

[RSS] [atom]
Tags