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...
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...
28. February 2011 10:34
In my ongoing series about XNA development on the Windows Phone 7 on Silverlight Show the next part has been released: Part 5 is all about user input on the mobile device, with particular focus on how to obtain and process data from the touch screen. As always the article explains the differences to Silverlight development to make the transition easier for those who already have experience with it and want to learn and gain some knowledge about XNA. The article also provides the source code of all examples for download. If you have any feedback or suggestions, leave me a comment or contact me directly.
22. February 2011 07:54
In game programming, a sprite sheet is a texture that contains not only a single image, but multiple images that either belong to different sprites, or that show different parts or animation frames of a single sprite. When you start creating your own games, or even when you look into creating modifications for existing games and look at their assets, you will run across this technique very soon. Everybody will tell you that using sprite sheets will result in smaller loading times, less wasted memory, and most of all, better performance. I've been telling people this too. But can we put a number on this? How much do you really gain if you use sprite sheets instead of single texture files? I cannot remember seeing any statistics or analyzes about this, so I decided to take a look at it myself, with particular focus on the Windows Phone 7 platform and 2D games. More...
17. February 2011 11:34
Part 4 of my article series "XNA for Silverlight developers" has just been published over at Silverlight Show. This is the second and last part about the animation topic. I decided to split the topic by two kinds of animations: transforms, which includes the simpler and built-in possibilities for translate, scale and rotate, and frame-based animation which is based on using a series of sequential images to create the illusion of a fluid motion. You can find the two articles here:
Part 3 – Animation (transforms)
Part 4 – Animation (frame-based)
Both parts offer various code samples including assets for download. Feel free to post any comments here or on Silverlight Show, or to contact me directly for any feedback you want to provide.
4. February 2011 23:55
If you are like me, you like using the keyboard for navigating around in and between applications, and to use shortcuts for common (and not so common) tasks. For example, I've memorized a lot of the shortcuts in Visual Studio, because often it's so much faster to use them than to move your hands away from the keyboard and navigate through multiple menu levels using the mouse. I also make heavy use of standard navigation features in data entry forms, especially the tab key. Unfortunately, when you build a Silverlight application, and in particular when you're using items controls like the list box for data entry scenarios, the default behavior is a bit annoying and requires quite some work for a smooth user experience. Here's how to do it. More...
31. January 2011 14:39
Silverlight's auto-complete box is a very versatile control and also often subject of questions in the Silverlight forums. In a recent project I have taken a deeper look at it and decided to write an article about its features. First I explain the very basics and simple usage scenarios. After that I move on to more advanced topics like using custom filters and item templates, and eventually to asynchronous filtering using a web service. I also show a possible way to integrate that into an MVVM application design. As always the complete source code is available for download too. The full article can be found here.
27. January 2011 08:35
Yesterday my new article on Silverlight Show has been published. In the series about XNA for Silverlight developers on Windows Phone 7, this part is about text rendering. If you come from a Silverlight background you will realize that text output in XNA is really generally different. It is based on bitmaps instead of vectors like in Silverlight, has limitations in design and effects, and there are no built-in controls that aid you with layout or similar problems. As always I discuss the differences to Silverlight, show you the basics you need to know for text rendering in XNA and move on to more advanced topics in the course of the article. Read the full version here.
21. January 2011 18:13
Some time ago Microsoft released the four Silverlight Application Themes Jet Pack, Accent Color, Windows 7 and Cosmopolitan. You can find that download here. The Themes are provided as comfortable installers and integrate as new templates into Visual Studio. The drawback of the loose style XAML files the themes come as is that they cannot be easily used as Toolkit compatible theme packs, which makes dynamic switching of themes difficult, for example. It also requires more effort than necessary to apply the styles in an already existing project. I decided to convert the themes into theme packs, but that turned out to be harder than expected. Read on for a step-by-step guide and an online demo with full source. More...
18. January 2011 11:49
After my introductory "Part 0" this is the second part of the XNA learning series for Silverlight developers on Windows Phone 7. It is composed of three parts:
In the first part I shed some light on the biggest differences between the programming model of XNA and Silverlight. What may seem odd to Silverlight developers first has valid reasons, which I'm trying to explain here. The second part creates an empty XNA project using the default game template and then analyzes the structure of the solution in Visual Studio. I introduce the concept of content and the content pipeline and how you use it in your game project. The last part adds some content to the project to finish a "Hallo World"-like first project.
As always, you can read the full article over at Silverlight Show. It's a lengthy read this time, but I hope you'll enjoy it nevertheless. That was needed to create the foundation we can use to built upon in the next parts. I promise the next articles will be a lighter read :-).