Balloon Mayhem released at Silverarcade.com

image

Finally I got “Balloon Mayhem” finished. I still have ideas for improvements, but I have decided (for now at least) that I will release the game as it is now, else I will just keep changing the game all the time. Instead I will leave Balloon Mayhem for now and start up my “Little Longhorn” project again.

For the people interested in “Little Longhorn” I can tell that that project have been put on hold while I finished “Balloon Mayhem”. As I done with that now, I can get back to “Little Longhorn” now, which I’m really looking forward too.

I want to thank all the people helping out with this game, one way or the other, and please see the “Credits” part in game for more info on this.

Here are some screenshots. To play the game, click on it in the menu to the left.

image

image

image

From HEX (string) to Color in Silverlight

In my current game (Balloon Mayhem) I needed to pick a random color from an predefined list of colors. The way I solved this were to make an string[] of the colors as hex values (ex. #FF000000 for black) and then just pick a random index into this array each time a need a new color. My problem were to convert the hex values, in string format, to a real .NET Color. I Googled it a little and found some articles about generating brushes this way. I just altered the code a little and got this one:

private Color GetColorFromHexa(string hexaColor)
        {
            return Color.FromArgb(
                    Convert.ToByte(hexaColor.Substring(1, 2), 16),
                    Convert.ToByte(hexaColor.Substring(3, 2), 16),
                    Convert.ToByte(hexaColor.Substring(5, 2), 16),
                    Convert.ToByte(hexaColor.Substring(7, 2), 16));
        }

Feel free to use it :)

– Enjoy!

Silverlight graphic and animation links

I have now answered a couple of thread on http://silverlight.net about graphics in Silverlight and sprite animation this week. Therefore I thought I might also as well, post the same links here on my blog. Actually I think I have posted all of the links on my blog before, but here they are together in the same post.

Frame-based animation using clipping
For games, the typical animation style is “frame based” animations. This can been archived in Silverlight using “clipping”. Bill Reiss over at Bluerosegames.com, have created a pretty good article about how to do this:
http://www.bluerosegames.com/silverlight-games-101/post/Frame-Based-Sprite-Animation-in-Silverlight.aspx

Principles of basic animation in Silverlight
At MIX09 Jeff Paries had a pretty good session about “Principles of basic animation in Silverlight”. He shows different ways of doing animation and some basic physics (using vectors to simulate gravity)
http://videos.visitmix.com/MIX09/T12F

Deep dive into Silverlight graphics
When doing graphic intensive stuff in Silverlight, like games, it’s good to know something about how the graphics pipeline in Silverlight works. Seema Ramchandani had a good session about this at MIX09.
http://videos.visitmix.com/MIX09/T17F

Hope this help you in the right direction

– Enjoy!