Oct 022009
Healer Game
by Hannes Rahm
Today I made a small just-for-fun game in javascript, partly while waiting between pulls in my wow raid.
It's pretty much an ugly hack that I made to better understand javascript. jQuery is used heavily throughout. Love it!

The game idea is ripped straight out of wow and the addons Grid and Clique that I use for healing.

I added a little twist where the game loads the names from our guild roster at the wow-armory. To dodge the cross server scripting restrictions in modern browsers I made a small proxy in asp.net that loads the xml for me. jQuery made xml-consumption easy.

It's ugly as hell, and not very well balanced.
I don't know if I will return to this someday and add some features. Different types of heals would be cool for example.

So, can you beat "the boss"? Try it out HERE!

Oh, sweet bed, here I come!
/Hannes

XmlProxy.ashx - ASP.net script used to load data from the armory
%@ WebHandler Language="C#" Class="XmlProxy" %>

using System;
using System.Web;
using System.IO;
using System.Text;
using System.Xml;
using System.Net;

public class XmlProxy : IHttpHandler {
    
    public void ProcessRequest (HttpContext context) {

        context.Response.ContentType = "text/xml";
		
		string url = "http://eu.wowarmory.com/guild-info.xml?r=Burning+Steppes&gn=Bingohallen";

		HttpWebRequest httpRequest = (HttpWebRequest)WebRequest.Create(url);
		httpRequest.UserAgent = @"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)";

		using (HttpWebResponse httpResponse = (HttpWebResponse)httpRequest.GetResponse())
		{
			XmlDocument xmlDocument = new XmlDocument();
			xmlDocument.Load(httpResponse.GetResponseStream());
			context.Response.Write(xmlDocument.OuterXml);
		}

    }
 
    public bool IsReusable {
        get {
            return false;
        }
    }

}
archived as: ,healer,wow,ASP.net,XML