Duplex WCF Services Over HTTP

I have recently been spending a lot of time working with WCF for my final year project which requires frequent and efficient communication between different types of devices including smartphones.  My initial approach was to occasionally and asynchronously poll the services to see if there was any new data available.  The problem with this is immediately obvious – constantly polling the server will impact the overall performance and will also drain the battery of any smartphone utilising the services so I began looking into duplex WCF services over HTTP.  I found it to be pretty easy to dig up some useful information on the subject and I must give credit to Frank Quednau for his “no frills, bare-bones example to Duplex WCF” article which served as the foundation to my own work.

Working with Isolated Storage in Silverlight

When using Silverlight, developers have no direct access to the file system on a user’s computer.  However Silverlight does use isolated storage as a virtual file system to store data on machines providing the application has the correct file permissions to do so.  Additionally, Windows Phone 7 uses isolated storage for saving data to the phone which prevents applications interfering with each others data.

3D Particle System for XNA

I’m currently working on a 3D XNA 3.1 (need to use 3.1 for the third party library we are using at the minute) game for a piece of coursework at university and decided I would implement a 3D particle system in order to create some cool explosion effects.  This system is very similar to the particle system I described in my previous article since I basically lifted a load of code from there.  Since this is simply for a piece of coursework, I didn’t implement the full feature set that can be found in my 2D particle system because:

2D Particle System for XNA

Basically since I got into XNA (about 3 years ago) I have been tinkering with particle systems for games.  Using a particle system has allows game developers to create really nice, complicated looking effects without too much effort.  Personally I find them pretty mesmerising and often found that with each new effect I create, I could sit back and watch it run for about 10 minutes.

XNA camera for 2D games

This is just a quick article to share a nice way to create a camera for 2D games.  There are a couple of ways to do this; I originally did it by making a class that held a position for the camera and then subtracting the object and camera positions when drawing to offset the sprites.  This turned out to be a problem prone approach and caused me a few issues in my Imagine Cup game.

Toggle Visual States with a Custom Action in Silverlight

I was recently working on a project in Silverlight and required the ability to toggle between two states in a UserControl.  When I started working with Silverlight, I would have handled click or mouse events to change the visual state but I soon moved on to work with behaviours and actions so I could remove such code from my code-behind files.  Since an to toggle between two visual states did not exist, this seemed like an ideal opportunity to make my first custom action.

XNA 3D Terrain

Having created my own first person camera, I moved on to creating some 3D terrain for my game.  I have to admit, I cheated on this a bit and just used the custom content pipeline from the XNA Creators Club’s generated geometry sample found here.  For this reason, I currently do not fully understand the process of creating terrain from a height map despite despite understanding the basic theory behind it.  For this reason I can’t really provide a guide as to how to code it yourself at the minute but I will hopefully be able to do this in the future.

XNA First Person Camera

As I previously mentioned, I plan on updating this blog with my experience of learning 3D XNA and hopefully be able to help out others doing the same as well as receive a bit of feedback and advice on how to improve the work I have done.  The first section I began working on was the camera for the game.  Since my game is being planned for the Xbox Live Indie Games, the tutorial below is intended to work with the Xbox 360 game pad although with a little modification it should be possible to use it on the PC.