February 2006 - Posts

Tracing Windows Workflow

Here’s a small little pearl I found while playing with Windows Workflow; WWF provides tracing through System.Diagnostics.  This is not tracking (which is a full blown service in WWF) but simple tracing, showing which workflows and activity has been executed.

The System.Diagnostics in .NET 2.0 should be familiar with anyone who’s used Enterprise Library in .NET 1.1.

To enable tracing on your Windows Workflow application add an app.config file to your application and in the <configuration> section add a <system.diagnostic> section.

System.Diagnostic has 2 sections in it: <switches> and <trace>.  <switches> contains the tracing options and information levels and <trace> tells the system where to write the trace file to (For more information on System.Diagnostic read it up on MSDN)

There are 5 classes provided by Windows Workflow to use: WorkflowTraceToDefault, Host, Runtime, Tracking and Activity.  The last 4 classes are Trace Switches, are optional and have 5 states: Off, Error, Warning, Info, Verbose (although All seems to be able to replace Verbose).  The first class is a Boolean Switch and is a required field.  Tracing is off by default for Windows Workflow so you’ll have to enable WorkflowTraceToDefault to get results.

Here’s an example of enabling Tracing:
  <system.diagnostics>
    <switches>
      <add name="WorkflowTraceToDefault" value="1" />
      <add name="Host" value="Error" />
      <add name="Runtime" value="Warning" />
      <add name="Tracking" value="Info" />
      <add name="Activity" value="All" />
    </switches>
    <trace autoflush="true" indentsize="4">
    </trace>
  </system.diagnostics>

Hot Lab #8: Cancelled

It is with a surprisingly easy heart that I’m cancelling tomorrow’s Digital Gaming Hot Lab.  This is due to lack of RSVPs.

 

This isn’t really surprising since the community has been using Game Maker for quite a while and we do not need to cover the basics.  The talk material isn’t a waste however since it’ll be used for driving game development into schools, a mission from Danny Day (BTW, you can read his LiveJournal and here’s his RSS Feed).

 

I will however rethink my ideas for the next Hot Lab since it seems I can delve straight into high level talks (which is still worrying because some of the functionality requires a registered version of Game Maker, and not everyone has it).

Posted by mailowl | 9 comment(s)
Filed under: ,

Chuck Norris roundhouse kicks your mailbox

Put away your photo edited Hoff pics and make way for the latest internet retro-celebrity glorification.  It’s Chuck Norris and he’s roundhouse kicking his way into mailboxes across the world!

For those outside the loop (or who don’t receive a lot of mail) there are lists going around of Chuck Norris “facts” describing the most outrageous things about Chuck Norris mainly focusing on his killing ability.  Examples include “The chief export of Chuck Norris is Pain” and “Chuck Norris counted to infinity – twice”

I think what’s really sad is that besides getting its own website (Chuck Norris Facts), which is almost obligatory in this day and age; you can get a t-shirt (custom or pre-made) with your favourite “fact”.

Merchandising has gone through its own industrial revolution and if you have an idea you can easily and cheaply put it on t-shirts, mugs, shoelaces, caps and key-rings.

Well, enjoy and 10 points to who guesses who the next retro-celebrity to be idolized is.

BTW, I know this isn’t new, but I’m tired and wanted to blog something.

Understanding Attached Properties (DependencyProperty)

It is vital to understand attached properties as the concept is used throughout WinFX (and according to sources is being implemented in .NET 3.0).

Very simply, an attached property is a property that can be attached to a child object from a parent without the child object having prior knowledge of the parent.  The parent can then use the child’s new properties in a meaningful manner.

Normally this is achieved with the child inheriting from a base class, but this is restrictive to that specific parent while attached properties allow any parent to attach properties to the child object.

To achieve this in WinFX both the parent and the child must inherit from DependencyObject which is just a glorified hashtable.  Properties are created using a public static DependencyProperty.  On the parent the DependencyObject creates a hashtable per instance of the child with the property name being the key and the properties value, the value.

Microsoft defines an attached property as: "A dependency property that can be attached to any DependencyObject type and that is not limited to the type which defines it. The attached property provider must provide static Get(PropertyName) and Set(PropertyName) methods as accessors for these attached properties."

The pattern of the parent providing a static Get and Set is also important as its used in XAML (Another concept that’s used throughout WinFX; in WPF for form layouts and in WWF for defining workflows) when you set an attached property in the child’s tag.

For a good example check out Drew Marsh’s article on his blog, Avalon: Understanding DependencyObject and DependencyProperty.

While I haven’t investigated them yet, events can also be attached to child objects.

My first WWF demo working

I’m SO chuffed with myself because I’ve completed my first working demo for Windows Workflow Foundation!

Titled “Connecting Activities” it demonstrates how to use the DependencyProperty to pass data from one activity to another.

It’s not much but I’ve been dying to properly play with WWF and it had to wait until I got my own PC at home and then only once I got a VM with WinFX installed (the latter being a very valuable suggestion from Willy-Peter. NEVER install Beta SDKs on your dev machine in case it corrupts).

Something I want to share which I didn’t add to the demo is that I recommend you update the DependencyProperty – Property code snippet (found in C:\Program Files\Microsoft Visual Studio 8\VC#\Snippets\1033\Workflow\DependencyProperty - Property.snippet) and add <Shortcut>dependprop</Shortcut> just under the <Title> tag as this’ll make it easier to access.

As soon as I’ve got the documentation done for my demo I’ll upload it for all to see.

Posted by mailowl | with no comments

Digital Gaming Hot Labs #8

My apologises for posting so late about the next Digital Gaming Hot Lab.  I have been completely distracted by work, SA Developer and my first home PC.

Anyways, on with the show, and for February I’m giving a talk introducing Game Maker and exposing to you the basics to create a game.

I have been convinced by Danny Day and other leaders in the local game development community to focus this year on Game Maker.  It makes sense for a couple of reasons:

A) It requires minimal coding and coding experience.
B) It is being used widely by an established gaming community (namely NAG’s Game.Dev)
C) It is a powerful in its own right and can be used to create completed games (my main objective)

When: 25th February 2006, 12:00 – 14:00
Venue: IT Intellect, Bryanston (map)
Presenter: Andre Odendaal
Topic: Game Maker Introduction – Sprites, Objects & Rooms
Level: Beginner
Objective: This workshop covers what is Game Maker and some of the resources for making games (Sprites, Objects and Rooms).  We’ll create a complete game in the lab and if there’s time work on adding special effects.
RSVP: here

Posted by mailowl | 2 comment(s)
Filed under: ,

It's All Thier Fault

Have a look at this article “It’s All Their Fault” from The Escapist (Thanks Miktar for the link) and enjoy.

Even if you’re not a game developer you’ll appreciate the extreme views in this “customer/supplier” rant.

I wish this article was true because I feel I could handle the flak of producing bad games while driving around in a fast car with a faster woman, my nose powdered by Peruvian Marching Dust.

Anyways, back to my slog.  I owe everyone an update of Elevator Action but at the moment it’s just a hive of bugs.

Strongbad emails available for your iPod

Strongbad, with his trusty allegedly portable Lappy 486, from Homestarrunner is now available on your iPod Video!

Head over to http://podstar.homestarrunner.com/ and download the more classic Strongbad Email episodes.

I hope we get to see more episodes being released and this is a start of a trend for online cartoons.  Next must come Happy Tree Friends and then Joe Cartoon.

Posted by mailowl | with no comments
Filed under:

NAG Game.Dev Competition 07: Elevator Action

Well, the first NAG Game.Dev competition for 2006 is underway (read the full objectives and rules) and the theme is to take an old retro game and remake it but with your own style.

My first idea was to remake Sopwith, but I was beaten to chase but Danny Day (dislekcia) who posted it as his idea first.  Of course I could still make the game in my own image but I’d rather have something to call my own with drawing comparisons.

The idea game I thought I remake was Montezuma’s Revenge but once again, I was to slow and TrXtR is remaking it.

So my game is a remake of Elevator Action!

While sticking to the original gameplay the game is going to receive a 40’s comicbook veneer and a cloak-and-dagger theme.  An innovation will be that when the lights are shot out in the game and the building goes dark, all the animation will be done in pure black and white which will add to the comicbook theme as well as making the game harder to play.

Below are the sprites I’ve made for the first beta release.  We have the floor, the doors, the door containing the secret our agent must find, an enemy spy with his hat and sweeping cloak and our dashing agent wearing a tux.

I’ll post updates on my game as it progresses and I’ll make sure there’s something to download to.

Posted by mailowl | with no comments
Filed under:

Get your comics on an RSS Feed

Do yourself a favour and lighten up your day by reading your favourite comics through your RSS Reader.

Go to Tapestry Comics and get the links to official and unauthorized feeds (unauthorized meaning someone’s managing a feed where each post contains the image url to the official website) for a host of online comics like yester-year’s Peanuts to the illicitly funny Sexy Losers

I can recommend: Alien loves Predator, Ctrl + Alt + Delete, Dilbet, Peanuts, Sexy Losers and Sinfest.

Leave a comment with your favourite online comics and thier links!