by Mister Goodcat
25. March 2011 14:59
What would a game be without sound effects and music? Naturally Windows Phone 7 offers enough possibilities to add a rich acoustic experience to your apps and games. However, due to the nature of the device, there are some things to keep in mind. Even with the lack of real multi-tasking, you don't have the whole platform at your disposal exclusively. The user may already listen to music from the media library when they start your game, for example. In addition, a mobile device may also be used in an environment where noise is not welcome. These are things you have to consider when you add audio to your game. Some of these aspects are even regulated in the certification requirements for Windows Phone 7 applications and are a potential source for certification failure if implemented incorrectly. In my new article, I'll take a look at how audio can be integrated in your games and what the implications are for playing sounds and music in Silverlight and XNA. As always, source code for the discussed samples is available for download.
Read the full article on Silverlight Show.
by Mister Goodcat
19. March 2011 13:18
A few days ago, Google has released a first beta version of an AdMob SDK for Windows Phone 7. People seem to be interested in that especially outside the U.S., because at the moment, Microsoft's own Advertising program is only available to developers based in the United States. Here is a short walk-through of how to use the AdMob SDK in your app and what you can expect from it at the moment.
Please keep in mind that this post is based on a beta version, and that the final experience and feature set may be different from what I observe and describe here. More...
by Mister Goodcat
17. March 2011 01:38
In my extensive post about how you can upload images to an SQL database from your Silverlight client (read it here), I mentioned some potential problems with the amount of data that is being uploaded. The issue arises because when you load an (compressed) image from disk, it is converted to an uncompressed bitmap in memory. Storing that image in your database can result in data that in extreme cases can be up to 100x or even more bigger than the original image. In this post, I'll show you how you can improve the code to achieve a much better result with regards to that. More...
by Mister Goodcat
16. March 2011 17:54
Detection of and reaction to collisions is a very fundamental element in games. As soon as it has moving components of some sort, it is likely that collisions are of concern. For example, the player character may collide with the scenery of the game. The player may also collide with other characters (enemies, monsters etc.), and of course many games work with projectiles that can hit various other parts on the game screen. But what exactly are collisions in a game, and what are good ways to detect and handle them? This article tries to give answers with several samples and explanations. The full source code is included for download.
Read the full article at Silverlight Show.
by Mister Goodcat
9. March 2011 16:18
Some days ago someone in the Silverlight forums asked about how an auto-complete box that highlights the matched parts of potential hits could be made. Something like:

There is no built-in feature for this in the AutoCompleteBox and I didn't have a simple answer to that question. However I found it an interesting topic and a useful feature, so I decided to put some research in it as soon as I have some time. As it happens, I just had that time, and the result is this blog post :-). As always you can download the full source code at the end of the post. More...
by Mister Goodcat
9. March 2011 16:15
In the last article we learned about touch input and gestures, which probably is the first choice for user input in most games on the phone. However, the hardware of Windows Phone 7 devices offer more possibilities in the form of additional sensors that can be used for input, in particular the accelerometer. For example, Microsoft's game "Kombo" that was available on the phone very early proved that using the accelerometer as primary input for a game is very well possible (give it a try, it's free). In this part of the series we will learn how you can use this type of data for input and take a peek at advanced topics and further resources. As always, the source code of all samples is available for download.
Read the full article at Silverlight Show.
by Mister Goodcat
7. March 2011 00:39
In the Silverlight forums people frequently ask for help with storing images in their databases using RIA Services. Even though this looks like a pretty common thing to do, it is far from being straight forward, and searching the web does not seem to produce any good results (or I'm just doing it wrong). So I decided to write this quick walk-through of how to do that. This post describes all steps and possible pitfalls to create a complete application for this from scratch, from the database to the UI. More...
by Mister Goodcat
3. March 2011 15:42
When I was thinking about the Eco Contest 2011 on Silverlight Show, I had the idea to enrich my application with the visual gimmick of dynamically growing trees. I wanted to create both the branches and leaves on the fly randomly and animate them to create that impression. If you have already visited my entry you know how the final result looks like in action, and if not, you can find it here (feel free to leave a vote :-)). Let me show you an example image of a dynamically rendered tree once it has finished animating:

Those trees typically consist of ~20,000 single elements, with ~5,000 for the branches and ~15,000 leaves.
When I showed the app to some friends as work in progress, I was asked how I was able to perform that rendering so well without completely hogging all computer resources; I figured that the steps of optimization that went into this would be an interesting topic for others too, so I decided to write this blog post. More...