Tuesday, July 31, 2007

Thursday, July 19, 2007

Tribute to Ant Attack

To learn Silverligt and have some fun I reused idea of Ant Attack. I was completely new to both SL and XAML and managed to learn basics during few nights. I implemented 3d view using transparent .png of cube. I know this is not rocket science, but it works. I have lot of ideas where to improve it, but most funny task would be add ants and implement their AI in Python, so you will be able to change AI script as an user. Anyone interested ?

Lesons learned:

  1. SL 1.1alpha supports transparency only in 24bit color + 8 bit alpha format. It could be converted in Blend
  2. ZIndex is slooow, use Remove() and Insert() methods on Children[] collection instead
  3. DoubleAnimation will stop animation on some non-integer number, so my pixelized cubes will be blured by antialiasing. Not nice.

Enjoy the Antesher City