2010-12-22

Look Ma! I've made an earth!

Operation Survival needs a three dimensional view of the whole globe. I have managed to get a first prototype working: Try it here.

Lots of learning was involved before I got this far:
- evaluating and deciding on a flash 3D engine (Away3d)
- efficiently implementing and caching filters for large images
- perspective projections. Note for next time: you do _not_ see half the sphere after projecting it to 2D but significantly less
- The day/night line is calculated and updated in realtime (let the program run for a while to see it). Some funky math and astronomy was required to get this just right
- Quaternions. For smoothly rotating the camera around the globe without running into gimbal lock
- lots of Actionscript idiosyncracies, this is my first flash program after all

I'm quite satisfied with the results. Now I need to add stars to the background and figure out how to best draw flight paths and markers on the surface of the sphere.

2010-12-05

ActionScript pie menu

Since the flash player hijacks the second mouse button for its own context menu and there are rumored to be some obscure, barely relevant platforms like, ahem, Apple, that don't offer one to begin with I needed to come up with another solution for context menus. I came up with pie menus that open when you click and hold the left mouse button. You can choose a button by moving over it and releasing the mouse.

It features smooth tweening transitions and fades, a subtle 3D effect, a text help when hovering over an option for a second and an arbitrary number of buttons and icons. The final version will likely also have sounds.

This is all plumbing work for Operation Survival for which I want an intuitive, non-intrusive user interface.

Please try it and tell me what you think!