Build 2013 Summary

Saturday, June 29, 2013

The Microsoft Build 2013 conference is now over, so it’s time for some summaries and impressions. All the following is my personal thoughts from my viewpoint, and may not reflect the way things actually are. Last caveat – some of the information is based on the sessions I attended. Naturally, I couldn’t attend most sessions, and I may not even remember all info given in the session I attended. Still…The conference was 3 days in length. With about 14 sessions going on at the same time slot, this is too short a conference; 4 days would have been better....

Towers of Hanoi–WPF Style (Part 2)

Monday, February 13, 2012

In the first part, we saw how to recursively solve the Towers of Hanoi problem in C#. In this post I want to show a graphic view of the solution. This is a starting position with 7 discs: This is how it looks when the problem is solved: In between, the discs move with animation from pole to pole, as the solution dictates. Options include speeding up the process (with the slider, very useful), pausing the animation and resetting to the initial state. Here’s something in the middle: The Poles The poles are built as thick...
2 comments

A New Android Game in Town (by my brother)

Sunday, February 5, 2012

Anyone who has ever written a game knows it’s hard to get it done from start to finish. Sure, I can put on a demo of some game I’ve created in several hours. But creating all the graphics, sound, animation, levels, transitions, scoring, etc, from start to finish is quite a challenge, especially for a single developer. That’s why I’m very proud of my young brother, Yaniv, that has worked hard for the past 10 months (while maintaining a proper day job!) on an awesome  fun game called Micro Wars, targeted for the Android platform. This game plays especially...
5 comments

WPF Tip: Displaying Images in different Pixel formats

Monday, January 30, 2012

If we want to show an image in WPF, we typically use an Image element and connect its Source property to some image resource within our project: <Image Source="Penguins.jpg" /> The Source property is not a string, it’s an ImageSource – an abstract type with several concrete implementations that provide a “real” image source. The above markup works thanks to the help of a type converter, that makes the source a BitmapImage – one of the simplest sources, that presents the image as is. What if we wanted to show the...
5 comments

Using the Async CTP With Windows Phone

Saturday, January 7, 2012

The Async CTP that exposes C# 5.0 features to be used with asynchronous programming is not just for the full .NET Framework. There are versions for Silverlight (4 and 5) and even Windows Phone (which can be viewed as Silverlight 4, but has a separate supporting assembly). To demonstrate, I’ve adapted my sample of the Mandelbrot set to Windows Phone, while taking advantage of the async features to keep the UI responsive. After creating the initial Silverlight for Windows Phone project, I’ve added a reference to the async CTP library, which can be found under {MyDocuments}\Microsoft Visual Studio Async...
no comments

The Future of Silverlight

Monday, November 14, 2011

There’s been a lot of talk lately about Silverlight. Will Silverlight 5 (to be released this month) be the last major version of Silverlight? I don’t know, but here are my thoughts on the subject. Silverlight will stay in the context of Windows Phone, that’s seems pretty sure, but what about the web at large? Is Silverlight (and its rival, Adobe Flash) doomed? In recent years, there has been gravitation towards standards – that is, world wide standards, not Microsoft’s or anyone else’s for that matter. This is not a bad thing onto itself. But are the...
no comments

Windows Phone: Combining Silverlight & XNA in a Single Page

Wednesday, October 26, 2011

There are two very distinct ways to program on Windows Phone 7.x: Silverlight & XNA. Silverlight is about UI, retained graphics and is event driven. XNA is about immediate mode graphics, based on a timer and polling; Very different models indeed. Each has its strengths and weaknesses. One of the new features in WP7.1 (“mango”) is the ability to combine the two to get the best of both worlds. Here’s a typical scenario where this need may come up: suppose you’re developing an XNA game (2D or 3D). In a typical game you need to allow some configuration,...
5 comments

Porting an XNA game from Windows to Windows Phone (Part 2)

Sunday, August 14, 2011

In the first part we got our introduction screen up and running, with the starfield scrolling by. However, we couldn’t actually start playing because the game was waiting for a key press… which is nowhere to be found on a Windows Phone device. We simply need a little touch. Adding Touch Support Touch is something the XNA version of Windows and XBOX 360 have no notion of. This is specific for Windows Phone. Touch input information is available as “raw” data (touch points, with positions, etc.) and with a higher level abstraction called gestures. We’ll start with...
one comment

WPF For WinForms (and MFC) Developers, Part 1

Tuesday, January 11, 2011

WPF has been around for more than 4 years now (since the release of Windows Vista), but only in the last couple of years there is increased move from Windows Forms to WPF. However, the transition is anything but easy. This is not just because WPF is relatively new, or because people are people, and as such don’t like change for the sake of change. I mean, WinForms is ok, isn’t it? MFC may be old, but it works, doesn’t it? The term User Interface (UI) has served us for years. In recent years, this just isn’t enough....
3 comments

Visual Studio 2010 SP1 Beta: What’s new in MFC?

Saturday, December 25, 2010

The recently released Visual Studio 2010 SP1 Beta brings many enhancements and bug fixes found since the product’s launch, most of them in the managed world. However, there are new enhancements to the good(?) old MFC, namely wrapping of some of the Direct2D interfaces. Direct2D is a new layer in the DirectX world, sitting on top of Direct3D, providing high performance and flexible 2D graphics. It was introduced with Windows 7 and Windows 2008 R2, but it’s also possible to install it on Windows Vista. What’s wrong with Direct3D? Nothing, but doing 2D graphics is difficult using the...