Mark Everard
Nov 30, 2009
  5786
(0 votes)

The Distraction Gadget

My gadgets are like buses you wait ages then two turn up at once...........

Here is my second (does quantity count over quality?) contribution to the EPiServer Gadget contest 2009.

Presenting......

The Distraction Gadget

Everybody loves a distraction and what better way to distract yourself than by playing a game. A sentiment Cristian no doubt agrees with. So here you have a single player javascript game. Click and drag your user’s head around the CMS world and stay clear of the evil EPi-Enemies!

I can't claim the idea for the game, its something I found ages ago when I was first getting interested in web development (I remember it being one of the first truly dynamic html pages I'd ever seen - it was a real jaw dropper at the time). That time was some time ago now and the web has moved on, but this game and I have had a close relationship ever since. I've not only wasted much of my own time playing it, but I also began tweaking it and adding more features. It seemed only right that I should repackage it and share it with you.

This has been quite a rewrite, firstly to utilise the magic of jQuery, and then to try my hardest to ensure that you can run multiple instances of this gadget without issue on the Site Center dashboard. I'm not sure why you'd want to, but feel free to give it a try!

I've also implemented a leaderboard (using the DDS) so you can compare scores with other users. Getting distracted for 30 seconds is a very very good effort!

distractiongadget

Lessons learnt: In retrospect the Site Center is not really the best place to be doing a lot of heavy client side scripting work, as there is already a lot of stuff already going on under the covers. This is why I've quickly bolted on a way of running the game from a separate window, all of that DOM traversing is expensive!

Extending this idea: Some simple LINQ queries could return an aggregated list of the total amount of time that each user has been distracted for. (I decided it might be best not to implement this as the outcome could get some poor distracted web-editor into trouble!)

Installing the gadget

I've put together an installer file, which can be used with EPiServer Deployment Centre

The source code lives here

Nov 30, 2009

Comments

Sep 21, 2010 10:32 AM

Hehehe! Now I know how to spend a few hours on the dashboard ;)

Please login to comment.
Latest blogs
Optimizely CMS 13 and the Alloy demo site

The Alloy demo site now runs on Optimizely CMS 13. Here’s a quick guide to getting it up and running locally.

Tomas Hensrud Gulla | Apr 10, 2026 |

A day in the life of an Optimizely OMVP: Getting Up to Speed with Optimizely CMS 13 — A Free Learning Path

If you're working with Optimizely and haven't started exploring CMS 13 yet, now's the time. I've put together a dedicated CMS 13 course within the...

Graham Carr | Apr 10, 2026

A day in the life of an Optimizely OMVP: Optimizely CMS 13 Is Here: The Features, The Add-Ons, and What's Coming Next

CMS 13 went GA on 31st March 2026, and after months of previews, webinars, and internal engineering sessions, it's finally real. I've been deep in...

Graham Carr | Apr 10, 2026

How to get the Page Tree back in Optimizely CMS

Lost the page tree in Optimizely CMS? Here's why it happens and the non-obvious fix to get it back.

Henning Sjørbotten | Apr 10, 2026 |