August 31st, 2010 By jmitch18 Categories: C#, Programming, XNA

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.

Read more…

  • Digg
  • StumbleUpon
  • Delicious
  • Twitter
  • Share/Bookmark
May 19th, 2010 By jmitch18 Categories: C#, Programming, 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.

Read more…

  • Digg
  • StumbleUpon
  • Delicious
  • Twitter
  • Share/Bookmark
May 16th, 2010 By jmitch18 Categories: C#, Programming, Silverlight, WP7

For a little while now I’ve had a bit of interest in the Model View ViewModel (MVVM) pattern for Silverlight and WPF so I thought I would finally give it a go and see if I could get an understanding of how to use this pattern.

Read more…

  • Digg
  • StumbleUpon
  • Delicious
  • Twitter
  • Share/Bookmark
February 7th, 2010 By jmitch18 Categories: Uncategorized

For quite some time, I’ve been meaning to get round to making myself a website dedicated to posting my projects on.  I’ve finally done it after a lot of screwing around with the idea of a dedicated Silverlight website and then finally settling for a good old ASP.NET website; I love how quickly it can be to get a site up and running with ASP.NET.

My projects site can be found at http://projects.jason-mitchell.com or by clicking the Projects link at the top of the page.  Right now it just has some filler content but I will be getting this sorted ASAP.  My previous approach for my really really old projects site was to stick absolutely everything on there but this time I’m going for quality, not quantity.  As such, despite the amount of programming I actually do in my spare time, I can only think of three projects that I plan to post initially.

On a side note, I also signed up to LinkedIn.  Find me here.

  • Digg
  • StumbleUpon
  • Delicious
  • Twitter
  • Share/Bookmark
October 24th, 2009 By jmitch18 Categories: WP7, XNA, Zune HD

As far as I am aware, the accelerometer code here is the same as would be used for the new Windows Phone 7 devices.

My Zune HD arrived last week and after getting over the initial disappointment of a disgracefully empty marketplace for it, I was really itching to try out some XNA and play around with the accelerometer.  First things first, I needed to download the XNA extensions that would provide the necessary framework to use the accelerometer in the Zune HD; these can be found right here.  As far as I’m aware, XNA for the older Zune won’t let you use the 3D API (I could be wrong??) and I don’t think this has been rectified by the XNA 3.1 Zune Extensions however hopefully an XNA 3.2 or 4.0 will come along in the near future and open that up.

UPDATE:

I verified that the 3D API isn’t available.  The likes of the Effect class aren’t available on the Zune.

Read more…

  • Digg
  • StumbleUpon
  • Delicious
  • Twitter
  • Share/Bookmark
September 27th, 2009 By jmitch18 Categories: Uncategorized

I have various WordPress plug-ins installed for my blog but my favourite has got to be the WordPress Stats plug-in.  I like to be able to keep an eye on the amount of traffic my blog gets and in particular what the most popular articles are.  At the minute, it seems to be my article on a first person camera in XNA and my article about iPhone development.  However, for the past month or so the plug-in hasn’t been counting visits at all.  Which was a little annoying, I figured that I was either hugely unpopular or there was something up with the plug-in.  Not wanting to resign to the possible truth that no one cares what I have to say, I did a little bit of searching for people having similar problems.  it wasn’t difficult to turn up some results, but the answer came from the plug-in’s FAQ page on WordPress Extend as I had hoped for.  Basically this plug-in depends on the wp_footer PHP function being called in your theme.  Turns out, my current theme didn’t call this.  All that I needed to do was add <?php wp_footer(); ?> just before the </body> tag and the plug-in began counting stats straight away.  Easy fix!

  • Digg
  • StumbleUpon
  • Delicious
  • Twitter
  • Share/Bookmark
August 30th, 2009 By jmitch18 Categories: Programming, XNA

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.

Read more…

  • Digg
  • StumbleUpon
  • Delicious
  • Twitter
  • Share/Bookmark
August 30th, 2009 By jmitch18 Categories: Programming, Silverlight

Yesterday I wrote an article about creating a rotating video player using Silverlight 3 (see here) and I admit that there was an awful lot of text in it, so here is a list of numbered steps for you to follow with less of the rambling in between steps.

Read more…

  • Digg
  • StumbleUpon
  • Delicious
  • Twitter
  • Share/Bookmark
August 29th, 2009 By jmitch18 Categories: Programming, Silverlight

Yesterday at work, there was a talk about Silverlight 3 about its capabilities and the improvements over Silverlight 2.  The talk featured demonstrations of existing applications and some step by step “how to” tutorials in which I saw how to rotate controls in 3D space and a cool Twitter reader which was made surprisingly quickly; albeit with some ready prepared code.  It had been a while since I had played with Silverlight and this talk inspired me to go home and have a play about.  In this article I am going to outline the steps taken to create this video player but check out this article for step-by-step instructions to create this video player.

Read more…

  • Digg
  • StumbleUpon
  • Delicious
  • Twitter
  • Share/Bookmark
August 27th, 2009 By jmitch18 Categories: Programming, XNA

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.

Read more…

  • Digg
  • StumbleUpon
  • Delicious
  • Twitter
  • Share/Bookmark