[Kde-games-devel] Experimenting with Kasteroids background

Nigel Stewart nigels at nigels.com
Sun Feb 18 08:01:03 CET 2007


http://www.nigels.com/devel/kasteroids.html
(Yes, I cheated to get to Level 9)

A greyscale cloudy galaxy image with some
hue, saturation and value adjustment for
each level.  Flip horizontally and vertically
for variety too...

--------------------------

struct SLevel
{
     int    nrocks;
     double rockSpeed;
     int    hue;
     int    saturation;
     bool   mirrorHorizontal;
     bool   mirrorVertical;
};

#define MAX_LEVELS	16

SLevel levels[MAX_LEVELS] =
{
     { 1, 0.4, 100,  32, true,  false },
     { 1, 0.6, 252,  32, false, false },
     { 2, 0.5, 310,  32, true,  true  },
     { 2, 0.7, 200,  32, false, true  },
     { 2, 0.8, 100,  64, true,  false },
     { 3, 0.6, 252,  64, false, false },
     { 3, 0.7, 310,  64, true,  true  },
     { 3, 0.8, 200, 128, false, true  },
     { 4, 0.6, 100, 128, true,  false },
     { 4, 0.7, 252, 128, false, false },
     { 4, 0.8, 310, 128, true,  true  },
     { 5, 0.7, 200, 255, false, true  },
     { 5, 0.8, 100, 255, true,  false },
     { 5, 0.9, 252, 255, false, false },
     { 5, 1.0, 310, 255, true,  true  }
};


More information about the kde-games-devel mailing list