More servicesWindows Live
HomeHotmailSpacesOneCare
 
MSN
Sign in
 
 
Spaces home  Matthew Leach - The Geek...ProfileFriendsBlogMore Tools Explore the Spaces community

Matthew Leach - The Geekdom

Game Development... amongst other things...
June 20

Updates on Life, the Universe and Everything

A lot has been happening the past few days in my little XNA world. Firstly, the XNA Creators Club website has been updated with a whole host of fixes and aesthetic changes to make things prettier for everyone. Secondly, the Roleplaying Game Starter Kit got another tutorial added enitled 'Re-using the Tile Engine'. No doubt you can figure out what that's all about - it shows you how to use the Tile Engine from the starter kit in your own game. Nifty. Things are moving along nicely on the XNA front. At least someone is doing something constructive - I haven't been very active, though.

Another big update I have is around my previous posts regarding XNA in SA. Andy Dunn (the Z-Man himself) left a comment on one of my posts offering to help. I felt like throwing myself to the floor and chanting "We're not worthy!" like Wayne and Garth when they met Alice Cooper. I replied, starting a discussion around XNA in SA. Andy roped in Pieter Germishuys to help out too. It was a rather quick discussion and I came to much the same conclusion that I did in my last post on the subject - its up to us to spread the word. This isn't really a bad thing, and though its been rather frustrating for me in the past, I can see more and more people looking at XNA.

Its a slow process, but I think that I have finally come to terms with that. Now, I may be ready to try Home Affairs...

June 18

My Current Project

I've taken a time-out from my forays into 3D to go back to basics and work on a small 2D platformer. Inspired by Lost Garden's rapid prototyping tilesets, its working title is Princess Quest but will probably change. I wanted to make a simple puzzle game that my daughter could play and would enjoy playing - hence the theme. The gameplay is simplistic with minimal controls - collect the gems on each stage, and get to the exit to progress to the next level. I plan to integrate a cute storyline to give the player a reason for mindlessly collecting gems, but I've only thought about the overall storyline so far.

In-game Screenshot:

PQ Screenshot

You can check out the video here:
http://www.myvideo.co.za/video/wip-my-current-project

Comments would be great!

May 22

Contacting Microsoft - Post Mortem

I recently received this message from Christian: [sic]

Hi,

Christian here from cdktech.com, I would like you to proceed with you descussion wrt xna and live in South africa, We are sponsoring the current XBOX live petition (sayyoursay.com).

We are also busy creating a xna "minni" game using a gift voucher from Microsoft for creators club.

DO you perhaps know where we purchase a yearly subscription? Or get a YEarly voucher due to the lack of support locally.

Thanks you for you contenued community support.

C.

Here is my reply:

Hi Christian,

The 'final' response I got from MS was that I should contact the Program Manager, which doesn't help very much. I doubt very much that the XNA Program Manager has much say over which countries get support and what sort of marketing and drive exists in any particular country - besides, I don't want to distract the XNA Team from their highly important work on the Framework itself. Driving the communities and support seems to be handled for the most part by the MVPs - which in South Africa is Pieter Germishuys, although he has ignored any attempt I've made to contact him.

The fact of the matter is that the South African branch of Microsoft is merely a sales branch - or so it seems. They have very few technical experts available locally - I know that they've had to call in experts from Europe to solve some issues my company had with the .NET framework a while ago. Luckily, our client is a large corporate and has the weight behind it to even get a response like that.

To be honest, I don't see MS putting too much effort into getting a local pricing model for XBox Live - I think that at best they will just 'unlock' SA allowing it to connect but its anyone's guess as to when or if that will happen.

With the new Beta Creators Club site, I cant find a (working) way to subscribe - but as far as I know you have to purchase an XNA Creators Club Membership from the XBox Live Marketplace. The only reason you'd need a membership in the first place would be to develop XBox games, so I guess its assumed that you already have a working XBox connected to XBox Live.You are very welcome for my continued support to the community. I do it because it doesn't seem like there is anyone else who is - locally that is.

Regards,
Matthew Leach

While it is frustrating a lot of the time living on the far side of the planet you have to understand that, from a business perspective, South Africa is such a small percentage of market share that a lot of the time it doesn't make sense to include it in massive roll-outs. This is something you need to get used to when living here. What the large international companies need to realise though is that Africa is an untapped gold mine. Why not start a gold rush?

May 21

Woohoo! I'm Famous!

The brand new XNA Creators Club web site has gone live, albeit in beta, but it looks amazing. Its now much easier to search for content in specific areas, like 2D Graphics; 3D Graphics; Shaders; Physics; etc. Also, you can check out XBox Live Community Games - Create, Submit, Peer Review, Play! Unfortunately, this seems to be limited to the US currently, but hopefully that will be sorted out when everything isn't marked as Beta anymore.

There's even a brand new Starter Kit available - The Role Playing Starter Kit which looks like a great example of how to put a full game together from start to finish. I'd love to play with this - a lot - but I'm not going to even think about it - I have a game to finish! (Shhh... its all very hush hush at the moment...)

So, why am I famous, you may ask? Well, my blog made it onto the Community Resources page, filed under 'Tutorials and Education'. Well, I'm honoured but in all honesty I think someone just grabbed most of the links from the XNA Wiki which means that I just managed to sneak in there - like a ninja.

I think the entire XNA Team has done an excellent job thus far. Keep up the great work, guys! It is really appreciated.

May 20

New XNA Creators Club Online web site

XNA Creators Club The time has come! The XNA Creators Club web site is currently in 'maintenance mode' with the new features being added as I type this. This includes the new Community Games on Xbox LIVE Beta which will allow community developers to release their games via the community channel for peer review - then on to XBox Live for anyone to download from their XBox. Exciting times ahead!

May 16

Talking about Game State Management

  While I've been hard at work completely rewriting the XNA Game State Management sample to include Windows and standard controls, Stephen Styrchak - a tools programmer for the XNA team - has been busy writing a Visual Studio designer to easily create menu screens. This would make building your menu screens a whole lot easier - and faster!

This is something that I've been thinking about writing myself, although I must admit that I probably wouldn't have implemented a designer - purely because I've never done it before and it would be quicker for me to go another route. However, seeing the integration with Visual Studio in Stephens project has made me want to learn. It would be great to not have to swap between applications and be able to do everything in Visual Studio. GarageGames should take note for their Torque X Builder! Still, this is one of those nice-to-have's for my GSM and will get put on the list of 'stuff to do if I get time someday'...

Quote

Game State Management for N00bs Like Me
May 05

Physics Test

Lately I've been testing a couple of physics engines for use with XNA. My requirements are quite strict in that the engines must be written in entirely managed code, ie. they cant just be a wrapper to a native code library, in order for it to work on an XBox 360. While there are quite a few well known and esteemed engines out there that have managed code ports, I've found many of them to be confusing or difficult to implement, keeping in mind that I want to implement almost everything as a GameComponent or Service within my games. Mostly, physics engines aren't designed for this kind of modularity. Even a lot of the physics engines written (or ported) specifically for XNA don't take this into account, and their demo applications are written completely in the base Game class - something that irks my built-in object oriented senses.

However, there is one physics engine that I've found to be extremely simple to use, and easy to implement in my various GameComponents - BEPUPhysics. BEPUPhysics is written specifically for XNA, and is extremely simple to use. While the demo application is one huge mish-mash of code in the Game class, I've still managed to abstract the ideas of the demo application into GameComponents that have their own physical properties.
You can see my test results here: DrDeth's Channel

What you'll see is a bunch of blocks falling under gravity, and being 'shot' away with the click of a button.
BEPUPhysics is still in its infancy - v0.5.0 - but it already has many great features, like constraints, joints and vehicle simulation. It is free for non-commercial use and closed source, but I'll cross those chasms when I get there...

April 23

GDC 2008 Presentations Available

Microsoft has released their GDC 2008 presentations on MSDN covering many various topics such as XAudio2, the XDK, Multicore programming, Direct3D 10, Performance Tools, Debugging Managed Code, and much more.

Head on over to the XNA Team Blog for the annoucement or the  XNA Presentations page to get the presentations.
April 18

TileSet Tool

TileSetToolScreenshotI've been working on a tool to help with the creation of TileSets for a tile-based game in XNA. The TileSets are loosely based on the SpriteSheet created in the XNA Creators Club 'Tiled Sprites Sample' and allows you to load in a base texture, then define the various rectangles that represent your tiles. It goes a little further to allow you to name your tiles as well - no more having to remember tile indexes or sizes.

A handy re-sizable grid with 'snap-to-grid' functionality make it easy to drag out new tiles, and a nifty property grid allows for easy fine-tuning of existing tiles. You can even zoom your image to get a better look at things.

If you think you may find this useful, you can download it here: TileSet Tool

I will be creating a custom content processor to automatically import TileSets into your XNA project for easy use.

Disclaimer: This tool is provided as-is without any warranty. It is an initial release and may contain bugs. If you find any, please let me know so I can fix them.

January 03

No DrawableGameComponent Item?

Something thats been bothering me for a while is the lack of a 'Drawable Game Component' item in the XNA project items list. There's a 'Game Component' item and while its not too much work to make it inherit from DrawableGameComponent instead of GameComponent, it does get rather tedious to do when you're writing a lot of game components. I'm not sure why it wasn't included in the first place, but I've created my own 'Drawable Game Component' item that I can use. Its rather easy to do.

  1. First, create add a new item to your XNA project - selecting 'Game Component' from the item list.
  2. Change the class inheritance from GameComponent to DrawableGameComponent.
    public class DrawableGameComponentTemplate : Microsoft.Xna.Framework.DrawableGameComponent
  3. Override the LoadContent and Draw methods.
            /// <summary>
            /// Loads any component specific content
            /// </summary>
            protected override void LoadContent()
            {
                // TODO: Load any content
    
                base.LoadContent();
            }
    
            /// <summary>
            /// Allows the game component to draw itself.
            /// </summary>
            /// <param name="gameTime">Provides a snapshot of timing values.</param>
            public override void Draw(GameTime gameTime)
            {
                // TODO: Add your drawing code here
    
                base.Draw(gameTime);
            }
  4. Select File > Export Template...
  5. Select 'Item Template' as the template type.
  6. Select your newly created source file on the 'Select Item to Export' page.
  7. Select the Microsoft.Xna.* libraries on the 'Select Item References' page.
  8. On the 'Select Template Options' page, give your template a meaningful name (like Drawable Game Component) and description.

Once you've created your template, it should show up in the 'Add New Item' dialog items list. Even though the template options has an option to load the template into Visual C#, I had to close and restart Visual C# before the template was available. The item template appears in the 'My Templates' section below all of the regular item templates.

Creating templates can be a huge time saver when you repeatedly create similar classes. Check the MSDN documentation on project and item templates too - you can modify your templates after you've created them and use special keywords/tokens to automatically replace text.

Getting Started with Development

A lot of people are really excited about making games. There is something alluring about creating something that other people will enjoy, but more importantly something that you yourself enjoy. Its your creation and has all of your ideas in it - all of the best things that you enjoy in a game. So why not? But its not the motivation that people struggle with. A lot of people have come to me asking, "Where do I start?" At this stage I start pointing them in the direction of the XNA Creators Club and related downloads, and start getting worried looks. Its these looks that have caused me to falter in the past. You see, the worried looks are not because people are worried about learning the XNA framework - its because they have never touched a programming language in their lives.

Its a little scary that people want to make games without knowing how to program anything - even though there are some great beginner tools out there. Still, I'm here to help people learn, and if I can get people involved and teach from the very beginning, that's great too!

Here are some resources to get you started with C#:

December 13

XNA Game Studio 2.0 Released!

Ok, so maybe this post is a bit premature, but I cant actually contain myself. XNA Game Studio 2.0 will be released later today! The XNA Creators club website has been updated with all of the XNAGS 2.0 information, however none of the download links are active yet. Instead there is a small notice stating, "XNA Game Studio 2.0 will be available early morning, Thursday Dec 13th, 2007 PST.". PST = GMT-8. CAT = GMT+2. So there's 10 hours difference between us making it an evening release over here? - I'm assuming that we're waiting for a dev monkey to amble into the office, get a cup of coffee and flip a switch. Also assuming that they start work at 8am, that makes it a 6pm release for us. Whatever. I'll be refreshing the page every minute until then, so keep an eye out for the release later today.

In related news, the Dream-Build-Play competition is back for next year, but right now there is a Warm-up challenge with some awesome prizes - including the opportunity to interview for an internship with Microsoft Research, Rare Ltd or Lionhead Studios. Entries will be accepted from the 20th December till the 27th January. Check it out!

November 26

RuleForge - My Open Source Project

While not exactly related to XNA or game development, I thought I'd give my little open source project a bit of the limelight here because it is related to me and what I've been doing.

RuleForge started about six months ago when I first received my license for Fantasy Grounds and wanted to get my own rule system in so that I could have a few roleplaying sessions with some friends overseas. With the initial version of Fantasy Grounds, creating custom rulesets was very much a matter of editing a simple XML database - which spawned the RuleForge Database Editor - but with the release of Fantasy Grounds version 2.0, rulesets and the amount of customisation available became a whole lot more complicated - which spawned RuleForge!

RuleForge allows you to easily create and modify rulesets for Fantasy Grounds v2. So, if you're into RolePlaying, check out Fantasy Grounds and if you have your own (or lesser known) system - or you just feel like coding something - then check out RuleForge!

November 20

Manic Monday Releases at Microsoft!

This week has started off really well with two of the most anticipated releases from Microsoft. Ok, so they're MY most anticipated releases, but still...

First and foremost - XNA Game Studio 2.0 is here! ... or at the least, the Beta has arrived including a project upgrade wizard, a new started kit and a few new samples to go with it!

The XNA team is pleased to announce the Beta release of XNA Game Studio 2.0! This Beta release is your chance to try out the new features available in XNA Game Studio 2.0, including support for Visual Studio 2005, multiplayer support over System Link and LIVE, and many more features and enhancements, many suggested by you, the community members.

Before you go jumping at it, just take note:

This beta is considered "feature complete." This means that while we still have some issues to address, all of the features that will be in the release are included as part of the beta. However like all our previous betas, the beta is for the Windows-based computer functionality only and you will not be able to deploy games to the Xbox 360 system.

Start here! Or, you may want to wait for the final release. Word is, the timeframe between the Beta and Release will be quite short.

The second big release from Microsoft this week is Visual Studio 2008! VS 2008 hosts a ton of new features and enhancements - read about them in Scott Guthrie's Blog. Be careful though, XNA is not supported in VS 2008 just yet but, as with previous VS versions, 2008 will coexist with 2005 quite happily.

November 14

Go Back to School, then to University...

I read an interesting quote yesterday that went something like this: "A computer programmer learns to program, but a computer scientist programs to learn."  Ok, so I may have gotten the quote slightly wrong - I scanned over it while trawling WSUS forums for answers - but the point is that I see myself as a computer scientist - I just want to learn as much as possible, and XNA gives me a whole host of new things to learn.

One of the many things I need to learn is about vectors, matrices and quaternions. I know what they are and how to use them, but while getting my Camera game component up to scratch I discovered that I really need a better understanding of them. So, I've gone in search of anything I can find on the subject. The is a lot of information available on the Internet, but as soon as you try to find information on these things in relation to game development you either get way too high-level explanations or way too complex explanations. I'm a programmer, not a mathematician. I don't understand what the subterfugal, congruent, flange of the angle* is, let alone how to find its inverse.

So, I've decided to start at the beginning and go back to high school geometry and algebra. Once I've touched up on those subjects (which should be rather quick), I'll move onto linear algebra at university level. While I'm doing this, I'll try to post snippets and relate them back to game development so that you know why these things are important. Right now, just know that they are...

* This is not an actual term, but rather an embellishment for illustration purposes.

November 08

Logging Made Easy

At some point during your game development, you'll need some way to create a log file - be it purely informational, or for support or debugging purposes. A lot of the time you want to be able to see what is happening inside your code, but your game is running in fullscreen mode and you can't see the debugger window in Visual Studio. I've seen a lot of people 're-inventing the wheel' in this regard by creating complex logging classes that emulate the Console writing functions, but its not required if you simply need to write some things to a text file.

The System.Diagnostics namespace provides you with the mechanism to easily output debugging and trace information with the Debug and Trace static classes. From the MSDN documentation:

If you use methods in the Debug class to print debugging information and check your logic with assertions, you can make your code more robust without impacting the performance and code size of your shipping product.

You can use the properties and methods in the Trace class to instrument release builds. Instrumentation allows you to monitor the health of your application running in real-life settings. Tracing helps you isolate problems and fix them without disturbing a running system.

By creating an application settings file, you can dynamically control what information you log without ever having to recompile your code. In the configuration section of the settings file you set up switches to enable or disable tracing, and to set the level of tracing.

<system.diagnostics>
    <trace autoflush="true" indentsize="4" />
    <switches>
        <!-- 
        This switch enables or disables debug tracing. 
             0 = Off
             1 = On
        -->
        <add name="Tracing" value="1" />
        <!--
        Sets the tracing level if it is enabled.
            0 = Off
            1 = Errors
            2 = Errors & Warnings
            3 = Errors, Warnings and Short messages
            4 = Verbose
        -->
        <add name="TracingLevel" value="4" />
    </switches>
</system.diagnostics>

In your code, you'd then create the switches and 'link' them up with the configured values by setting the value of the displayName argument the same as you specify in the settings file.

BooleanSwitch tracing = new BooleanSwitch("Tracing", "Controls whether or not tracing is enabled.");
TraceSwitch traceLevel = new TraceSwitch("TracingLevel", "The level of debug information.");

In order to output the trace information to a text file, we need to add a Listener that captures trace information and writes it to a text file.

if (tracing.Enabled)
{
    Trace.AutoFlush = true;
    Trace.Listeners.Add(new TextWriterTraceListener("Wrath.XNA.log"));
    Trace.WriteLine("");                
}

Now that everything is set up, you can use the writing methods in the static Trace class to write information to your log file.

Trace.WriteLine("Tracing Enabled: " + tracing.Enabled + " [" + traceLevel.Level.ToString() + "]");

You can also conditionally write things to the log file based on any boolean condition using the WriteLineIf method.

Trace.WriteLineIf(traceLevel.Level == TraceLevel.Verbose, " Being Verbose! " );

Any information you write with the Trace class will appear in the log file that you have specified, but what if you wanted to be able to trace what is happening in your game without the end-user being able to fiddle with the settings and without adding a log file? An example of when you would want to do this is when you need to inspect the trace information in a test deployment environment where you don't have the Visual Studio debugger to show you the trace information. Thanks to Mark Russinovich and Microsoft this is indeed possible with a simple application called DebugView.

DebugView is an application that lets you monitor debug output on your local system, or any computer on the network that you can reach via TCP/IP. It is capable of displaying both kernel-mode and Win32 debug output, so you don't need a debugger to catch the debug output your applications or device drivers generate, nor do you need to modify your applications or drivers to use non-standard debug output APIs.

I've found Tracing and DebugView to be a life saver when working with fullscreen games, as well as services that don't have a GUI. While I haven't gone into much detail regarding the Debug and Trace classes, they are very useful to any developer and I'd suggest you take some time to have a look at them in a little more detail. I think that the most important thing to keep in mind about this, before you go off and create a logging framework, is the bit of the Debug class description which states, '...without impacting the performance and code size of your shipping product.'

October 24

Real-time Gaming?

While not exactly related to directly to game development, I thought this bit of news was interesting.

Until recently, the Internet2 [Network] had a theoretical limit of 10 gigabits per second, which is thousands of times faster than standard home broadband connections. By sending data using 10 different colors, or wavelengths, of light over a single cable, operators are boosting the network's capacity to 100 Gbps.

That means a high-quality version of the movie "The Matrix" could be sent in a few seconds rather than half a minute over the old Internet2 and several hours over a typical home broadband line.

Can you imagine what your games could do if they had real-time networking available to them? The things developers are doing with MMO's these days are quite remarkable in themselves, but just imagine the immense worlds that could be created when you don't have to worry about packet size and bandwidth.

You can check out the Internet2 Consortium here and get some more info at wikipedia.

October 22

Getting Started Guide to XNA 1.0 Refresh

So, you've read all about the XNA Framework, seen some of the great things it can do and decided that you want to jump in and get started. Before I get into the details of how you do that, I just want to issue a warning. Unfortunately, like the DirectX SDKs and much of Microsoft's other product downloads, there are several large downloads and the use of download managers is not supported. I wouldn't recommend attempting these downloads unless you have at least an ADSL connection, and make sure that you meet the hardware and software requirements for XNA Game Studio Express.

The first thing you'll need to download and install is Microsoft Visual C# 2005 Express Edition. A web installer is provided so that you only need to download the components that you select to install. If you can, install everything so that you have a full arsenal at your disposal. After you have started the install, you should go ahead and register. This can also be done from the Help menu.

Next, you'll need to get the Microsoft Visual Studio 2005 Express Editions Service Pack 1 [24.3 MB]. This will make sure that your Visual C# Express is free of bugs, and comes with the bonus of quite a significant performance increase.

If you are using Windows Vista, you will also need to download and install the Visual Studio 2005 Service Pack 1 Update for Windows Vista [28.9 MB]. This update fixes several problems with Visual Studio running under Windows Vista.

Finally, once you have Visual C# 2005 Express installed and fully updated, go ahead and install the XNA Game Studio Express 1.0 Refresh [82.3 MB]. Once that's done, you're ready to dive right in!

As a side-note, getting the latest DirectX SDK may seem like a daunting task but, while you don't need it to develop with XNA, it does have a few tools that may prove useful in the long run. I'm hoping that Microsoft will make some of these tools available separately in the future, but until then try to get hold of it another way to save on bandwidth - from a magazine DVD (PCF - Oct 2007) or from friends.

October 17

Contacting Microsoft SA (Part 1)

The international support for XNA seems to be huge. At GameFest 2007, Microsoft gave a pretty convincing story that they would be pushing XNA to new developers and especially the Indie market to stimulate growth and innovation in the industry. What better place to stimulate growth and fresh ideas than from smaller countries with emerging game development markets? There are hugely untapped cultures and minds in the third world that I could add great value and insight into new formats and different approaches in games.

So, I decided to contact Microsoft SA to find out what, if any, plans Microsoft has for South Africa. I sent an email to Microsoft South Africa and asked two very direct questions:

  1. Will there be a drive from Microsoft to create awareness about XNA in South Africa?
  2. How can I help or drive this initiative within the local development community?

Two hours later I received a reply from Gill Marsden (Microsoft SA) stating that he had forwarded my questions to the 'Customer Access Unit' who would answer me directly. A half an hour after that I received another email from Victor Rangata (Customer Service Representative | Bytes Outsource Services on behalf of Microsoft SA) merely stating, 'I have forwarded your query to the relevant department and will get back to you.'

Well, that's not exactly what I had been hoping for, but its a start. Before I started writing this post, I sent another email to Victor asking for a status update (if any). I am ever hopeful that Microsoft will notice that South Africa is interested in XNA, and we want to be a part of this global movement too! I'm hoping that if I antagonize them enough with questions, then someone will take notice and back me up - and Microsoft is an awesome 'wingman'.

October 16

In The Beginning...

Blogs are one of the strangest anomolies on the Internet today. While most, seemingly, serve no purpose at all, others are helpful or informative and targeted at a specific audience. I hope that this blog will be the latter - a helpful and informative space targetted at anyone who is interested in game development using the Microsoft XNA Framework. This will probably by no means be the first nor best XNA blog out there, but it is special in that it is targetted at Southern Africans and I am hoping that I can bring a local flair to the amazing things that are being done with XNA abroad.
 
 
 

Xbox Live GamerCard

DrDeth SA
Xbox Live GamerCard
Rep:
Reputation:Reputation:Reputation:Reputation:Reputation:
Score:
0
Zone:
Underground
All the things I'm involved in...