Friday, April 30, 2010

This Weekend's Updates

Currently on the slate is:

A minor update to Aquarium adding a new fish and background, and a fix for a very rare texture loading crash.

A new live wallpaper celebrating the mighty ladybug

I have a tentative plan to get home-screen scrolling into Aquarium, but am a bit hesitant as it'll mean doubling the size of the background images, which means more memory usage.  Probably not the end of the world, but it doesn't excite me...

Monday, April 26, 2010

Galactic Core v1.4

- New Feature: Camera moves when switching home screens
- New Feature: Camera Speed pref

Touch sensitivity is still in place, and will interact with the home-screen motion more or less reasonably.  If you have both features enabled, you'll get up/down motion based on screen touches and left/right motion based on your current home screen.  The speed at which the camera moves between the points is controlled by a pref now as well, so you can make it pretty quick if you prefer.

I've gotten one e-mail from someone saying the home-screen sensitivity isn't working for him, but on examination haven't worked out why yet.  The same person says it worked in Silhouette, so I probably can't blame the phone here, but comments on the app's marketplace listing indicate it's working for other people.  The biggest differences from Silhouette are that Galactic Core has more preferences governing camera behavior, but as he's using the free version those should all be at default, which worked fine when I tested them.  I'll take another stab at that tonight.

Saturday, April 24, 2010

Aquarium v1.12

- Bug Fix: Fish getting "stuck"

I'm not sure how often this actually happens, but I have gotten a couple reports of fish "swimming off" then never coming back.  Going through the fish AI (heh) with a fine tooth comb, I did find a couple possibilities and managed to reproduce one of them.  Basically, when fish turn around, they didn't have any deceleration on their turn speed.  It was possible that depending on your framerate, they could overshoot their goal angle, try again, overshoot it again, etc.  I know this could happen for a long time if your framerate was low, though I've only ever seen it when running debug, personally (with a <10 framerate).  I fixed this by having their turn speed decelerate when they got close to their goal angle.

I also found a situation where if their movement delta had a length of 0, a division I was doing could end up NaN (not a number), which would work its way into their origin, which would mean future updates would forever be invalid.  This always resulted in the fish being teleported to the center of the screen though, so shouldn't be the same problem as them swimming off and vanishing.

Either way, I closed up a couple of holes here, we'll see if I get any more "my fish swam off and never came back" reports.

Synergy Free now supports all game modes & scoreboards

There hasn't been the demand I originally hoped for with this product, so I'm taking down all the limiters on the free version.  The only difference between free and paid now is ads displayed on the title and game setup screens.

Thursday, April 22, 2010

Silhouette v1.2

- Update: Faster portrait/landscape switching 
- New Feature: Camera moves with home screen changes

This version inherits the quicker reloading from Galactic Core and Aquarium.  The camera motion has a pref available in the paid version, allowing you to set the speed it transitions at (or off completely, if you prefer).  This feature really didn't take too long in and of itself, but for the longest time I couldn't figure out how to find out which home screen the user was on -- then the other day I discovered onOffsetsChanged() staring me in the face, proving once and for all I'm terrible at reading documentation.  It's a callback function within Engine that gives you all the data you need.

Either way, beyond that there was some general fixing as the scene didn't have things at the proper depth to make parallax make sense, but after a couple hours of adjusting models and scene layout it looks more or less the same, but now provides proper 3D parallax when the camera moves.  Huzzah!

Wednesday, April 21, 2010

Galactic Core v1.36

- Update: Faster portrait/landscape switching
- Update: Landscape mode is zoomed further in
- New Feature: "Spin Speed" goes up to "very high" now

 In testing a user's bug report, I discovered I was reloading textures when I didn't necessarily need to.  This is slightly scary but I have it safety checked, and it worked fine through over a hundred portrait/landscape switches on a Motorola Droid -- and it's much, much faster when layout switching.  This same change is working its way into my other wallpapers as well.

Aquarium v1.11

- New Feature: Purple fish!
- New Feature: Bubbler
- New Feature: Bubbler on/off pref
- New Feature: Landscape background images
- Bug Fix: Possible crash in mesh.renderFrameInterpolated()
- Update: Faster portrait/landscape switching

Most of these are pretty self explanatory, I think.  The Donation version has an additional pref that lets you turn the bubbler on/off.  The number of possible fish has been upped a touch as well, though I reduced the number of possible plants to compensate (Sorry!).

In addition, the overhead light was reduced from two passes to one (with the intensity of the texture roughly doubled).  This looks pretty much the same (it loses some randomness) but is less expensive to render.

Sunday, April 18, 2010

Silhouette v1.15

- Bug Fix:  Occasional crash in renderFrameInterpolated()
- Bug Fix:  Texture memory leak when switching orientations

I saw a bunch of comments about memory usage in the Silhouette listings, and after spending an afternoon with DDMS was about to call them crazy... then realized that after enough portrait/landscape switching it does indeed revert to the default desktop image.  Looking at logCat, this was always accompanied with an "out of memory" message.  Weird considering the allocation history didn't show anything unusual or wrong.

Well, as it turns out I had a code path that didn't call glDeleteTextures on all my texture IDs, and allocations by OpenGL don't show up as much of anything.  I had thought that since the OpenGL context was invalidated when switching portrait/landscape (if you don't reload your textures they're all white) this all got thrown out anyway, but apparently (at least on the Droid) this isn't the case.  This is made a bit annoying in that the standard onPause, onDestroy functions don't get handed a GL10 object to work with, so I actually ended up unloading textures in onSurfaceChanged, just before I proceed to precache them again.  Slightly weird but it works -- I sat there switching landscape/portrait mode for a half hour and it stayed stable the whole time.

I'll have an update for Galactic Core tonight or tomorrow incorporating a few miscellaneous fixes plus better camera zoom in landscape mode and a "very high" spin speed pref.

Wednesday, April 14, 2010

Aquarium v1.01

- Bug Fix: Single frame of white fish upon wakeup
- Update: Less memory usage
- Update: Fish accelerate/decelerate to their destination
- New Feature: Slight randomness to fish size

Nothing too earth shaking here, probably the biggest change is acceleration.  Basically,when a fish is near its destination, it will slow down and begin turning.  When it's done turning, it will accelerate smoothly up to top speed.  This removes the slight pop that you could detect when a fish decided to turn around.

The memory usage reduction actually stems from reducing the fish texture size.  Doing the math on the amount of screen real-estate they use vs the phone's screen resolution, I had the texture higher than it needed to be.  In practice this works out, as there's' nothing visibly different so far as I can tell.  As a bonus, this reduces load time a touch too.

Tuesday, April 13, 2010

Aquarium v1.0

After a couple weeks of progress, Aquarium is now on the android marketplace!  Like my other wallpapers, there's both a free and donation version, with the donation version gaining a settings menu.

The settings menu in the donation version gives you access to a couple more fish than you see in the free version, and lets you select from four different backgrounds (one of which is a non-busy waterscape, if that's your thing).  It also lets you turn on or off the overhead light.

Let's actually discuss the settings screen for a bit.  Originally I had a grandiose plan to let you hand-place fish and plants as though you were actually assembling a fish tank.  This is a cool thing to do, but pretty quickly started making the UI cumbersome (drawer-style menus, drag the fish to where you want it to be, etc).

I realize that with most things of this nature, the settings screen is not a common-usage item.  In my experience, at least, you'll tend to find a setup you like and stick with it for quite a while.  With that in mind, I decided to have the menu randomize the placement of fish and plants.  Tap  it a few times until you find a mixture you like, then hit back and it'll remember those settings.  This kept the interface very simple (and easy to understand, as well) but still gives you the same breadth of options in most regards and doesn't take long to work with.  I feel like this was a good compromise between simplicity and the original goal.

Sunday, April 11, 2010

Aquarium Live Wallpaper

Been a few days since an update, but I've kept busy.  I've got a couple minor bug fixes for Silhouette to test and release, and around the same time will hopefully have my current project ready to go.  The next one's an aquarium!

This one's been interesting, as I've had to build and animate several fish -- which means a lot more time in Blender than I'd previously had.  I'm getting pretty competent at it, I think a new fish is maybe a two hour project now between the texture and the model, assuming I can find good source material.  That, in fact, has been the real problem.

While it's no big trick to find good photo source (public domain or otherwise royalty-free) for some things, apparently aquarium plants don't fall into that category.  The only pictures I ever find are from companies who, well, make and sell aquarium plants -- and I suspect they're not interested in my using their catalog images.  This is why there's only a couple of foreground plants in the initial release.  I'll add more later if I can find more decent photo source.

Currently the background has three wallpapers, three fish, and two foreground plants.  I'm intending to add at least another fish or two before release.  The settings activity has buttons that will refresh the number of fish/plants and which types -- you can play with them until you find a mixture you like, and it'll keep those settings.  You can also switch out the background image and turn on or off the overhead light!

Tuesday, April 6, 2010

Silhouette v1.1 & Galactic Core v1.3


- Bug Fix:  No longer freezes when switching between portrait & landscape
- New Feature:  Swaying trees

Galactic Core:

- Bug Fix:   No longer freezes when switching between portrait & landscape
- Update:  Camera motion is now a sensitivity pref instead of on/off

After a few nervous days, a solid workaround is now in place for the freezes that plagued the Droid.  Along with this came a couple minor features, but the reliability fix is definitely the big thing.

Monday, April 5, 2010

Galactic Core & Silhouette issues on Droid

There's a couple issues with the Droid that both wallpapers share.

1) A sometimes crash upon hitting the "set as wallpaper" button.
2) A freeze when switching from portrait to landscape

The first issue is strange but work-aroundable.  Basically, the newly created wallpaper thread gets told to load, then before loading is finished gets told to destroy itself, then after that gets told to render -- not so great when you've just unloaded everything as instructed!  I've worked around this by getting an on-demand system in place that can catch a missing-asset exception and do a load if necessary.

The second issue is proving the tricky one.  As mentioned before both these wallpapers are making use of Robert Green's GLWallpaperService library.  This is a really great foundation for OpenGL wallpapers that allows the near-transparent porting of OpenGL code from GLSurfaceView -- something I much appreciate as I'm way better versed in OpenGL than I am in the guts of Android view creation.

Unfortunately, sometimes when GLWallpaperService attempts to create a viewport (via eglCreateWindowSurface), the call never returns.  What you get instead is an endless string of "waitForCondition(ReallocateCondition) timed out" messages.

This is a function that, based on the spec, just shouldn't do this.  As you can see by this documentation page, if there's a problem, it should return one of eight possible error codes so that the error can be dealt with (and should never fail to return).  The fact that it doesn't return suggests there's a decent chance this is a bug with Motorola's OpenGL drivers, which probably means a glacial fix, necessitating a workaround.  I know Mr. Green has been investigating this and with a bit of luck hopefully this can be puzzled out, or possibly someone can explain what's being done wrong on the setup side, though on the surface things all look kosher.

Basically, sorry for any folks inconvenienced by this.  I'd rather not do an update until the problems can get fixed solidly, so it may be a bit yet.