Sunday, November 20, 2011

Game Review: Super Mario 3D Land

How to create Super Mario 3D Land:

  1. Invent a time machine.
  2. Travel back to 1988 and kidnap the Super Mario Bros 3 design team.
  3. Put the Super Mario Galaxy development team under SMB3 designers.
  4. Have James Cameron be a senior producer of the 3D department.
  5. Profit!


While its not the open world adventure Super Mario 64 2 sequel I have been waiting for since 1995, it still kicks a**. Creative worlds, vivid colors, classic music, fluid controls, Luigi, Dry Bowser, tanookie tails everywhere, this game has it all! Aside from living up to it's lineage as a masterful platformer, and beyond being jam packed packed with well polished content, Super Mario 3D Land really shines by doing two things right in particular:

First, the 3D is actually useful.

Forgive the pun, but the 3D element of Super Mario Land actually adds a new dimension to the game play. Some of jumping puzzles can be quite challenging, and having depth perception is very helpful to gauging your jumps. Just to put this into perspective, yes that was another pun, I have only ever turned the 3D on while playing this game. However, to be honest, I still don't usually leave the 3D on the whole time that I am playing; but I do try using the 3D before I fall back on the golden tanookie leaf.

Second, it has a perfect challenge curve.

Professional game reviewers all seem to agree that good games should be easy to play, challenging to beat, and very difficult to complete. Super Mario 3D Land seems to agree with that philosophy, as it follows it to the letter. I blew through all eight worlds the first week I got it, and now I am crawling through the super frig'n hard special worlds. To be clear, the special worlds are not just harder; they also add fun new mechanics (Shadow Mario) and game play modes (timed runs) that really contribute to the replay value of the entire game.

Score - 9/10

It has taken far too long for the 3DS to finally get some games that made the investment in the hardware worth it, but that at least that time has finally come. Even though I don't much care for 3D technologies, I must still confess that this game got it right. Super Mario 3D Land is just a platformer, but it is a truly masterful platformer that acts as the perfect cornerstone for this young game console.

Game on!

Sunday, November 6, 2011

jQuery UI Modal Dialog disables scrolling in Chrome

Is Chrome becoming the new IE?

As much as I love jQuery, I still cannot escape the fact that jQuery UI leaves a lot to be desired. Yesterday I ran across an issue where the jQuery UI modal dialog acted inconsistently in different browsers. Normally opening a modal leaves the background page functionality unaltered, but in Webkit browsers (I ran into this while using Chrome) it disables the page scroll bars.

The Fix

Yes, this bug has already been reported. Yes, it is priority major. No, it won't be fixed anytime soon. For a feature as widely used as the Modal Dialog, I find that kinda sad.

However, thanks to Jesse Beach, there is a tiny little patch to fix this! Here is a slightly updated version of the fix:

(function($) {
  if ($.ui && $.ui.dialog && $.browser.webkit) {
    $ = $.map(['focus', 'keydown', 'keypress'], function(event) { 
      return event + '.dialog-overlay';
    }).join(' ');

Additional Resources

Hope that helps!

Thursday, November 3, 2011

Configuring MVC Routes in Web.config

ASP.NET MVC is even more configurable than you think!

Routes are registered in the Application Start of an MVC application, but there is no reason that they have to be hard coded in the Global.asax. By simply reading routes out of the Web.config you provide a way to control routing without having to redeploy code, allowing you to enable or disable website functionality on the fly.

I can't take credit for this idea, my implementation is an enhancement of Fredrik Normén's MvcRouteHandler that adds a few things that were missing:

  • Optional Parameters
  • Typed Constraints
  • Data Tokens
  • An MVC3 Library

Download for the project and a sample application.

Example Global.asax

public static void RegisterRoutes(RouteCollection routes)
    var routeConfigManager = new RouteManager();

Example Web.config

    <section name="routeTable" type="MvcRouteConfig.RouteSection" />
      <add name="Default" url="{controller}/{action}/{id}">
        <defaults controller="Home" action="Index" id="Optional" />
          <add name="custom"
              type="MvcApplication.CustomConstraint, MvcApplication">
            <params value="Hello world!" />

Thanks Fredrik!


Update 2/16/2013 - I have added this source to GitHub and created a NuGet Package.

Shout it

Real Time Web Analytics