If you've ever woken, sweating and shaken, from terrifying dreams in which gaily-coloured mushrooms dance happily with talking dinosaurs, and bombs with legs stroll alongside mice who wear high-heeled shoes, then Paper Mario: The Thousand Year Door is not the game for you. If the hallucinogenic, acid-tinged world of Mario's Mushroom Kingdom has ever struck you as a little sinister, then this game may push you over the edge. If, on the other hand, you've ever thought that the standard Japanese RPG template of "boy with spiky hair defeats evil monsters and saves the world" might be improved by replacing the spiky-haired boy with a fat plumber in dungarees, and the evil monsters with a demented selection of origami nightmares, then you might enjoy this one. Just don't say we didn't warn you.

Yes, it's the end of another console's lifespan and yet again the innovations department at Nintendo is going berserk. Hot on the heels of Zelda: Four Swords Adventures (surely so-called because only four people in the entire world will ever be able to afford all the Nintendo hardware required to play it) comes this Paper Mario sequel, which pushes the role-playing game format to breaking point and beyond. Simply put, it's just about the most surreal and inventive game yet seen on the GameCube. Happily, it's also one of the very best.

The Thousand-Year Door in question lies deep beneath Rogueport, a disreputable coastal town swarming with thieves and ne'er-do-wells. (OK, talking mushrooms. Some of whom are thieves). Mario is here, treasure map in hand, searching for Crystal Stars with which to open the Thousand-Year Door. He's also, almost incidentally, looking for the hapless, hopeless Princess Peach, who's inconveniently managed to get herself kidnapped again; this time however, she's been nabbed by the mysterious X-Nauts, and Bowser for one is not happy about it. With the threat of total destruction waiting behind the Thousand-Year Door, can Mario save the world again?

What follows will be familiar to those who have played the first Paper Mario, or indeed the GBA spin-off, Mario & Luigi: Superstar Saga. On one level it's a relatively traditional, and highly structured, RPG: Mario ambles around talking to people and amassing clues, while fighting off enemies in turn-based battles. Along the way he accumulates a motley crew of allies, ranging from a shy Koopa to a hyperactive Yoshi, one of whom can fight alongside him in each battle and all of whom chip in with comments and suggestions along the way. Gameplay is divided into chapters, eight in total, the first seven of which are devoted to the quest for a single Crystal Star and the last one acting as a grand finale. Up to a point, it's pretty familiar.

However, it soon becomes clear that Paper Mario is a game that takes great delight in gleefully subverting these established genre staples. Everything is given a frenzied arcade-style twist - Mario is able to bash approaching enemies with his hammer or jump on their heads in order to get the first strike in battle, and each turn-based attack can be enhanced or avoided with clever timing and nifty button presses. Battles are played out on a makeshift wooden stage in front of a wild audience of Mushroom Kingdom regulars, and trying to actually win a battle while onlookers hurl objects at you and the stage scenery collapses around you, and on top of you, can be a hectic affair. The badges you collect along the way affect your team's abilities for good or evil, and the range of strategies on offer might come as something of a surprise to those inclined to dismiss this as an "RPG lite". Even outside of battle, some sections of Paper Mario play out in a manner remarkably close to the character's platform origins: each ally offers a special skill (Koops the Koopa can hit switches at a distance, for instance, while Bobbery the Bob-omb can blast through walls) and you'll need to use them all in order to make progress.

On top of that, there's the truly insane storyline to consider. Although things start off in sedate fashion, with the first couple of chapters forming a fairly standard "go to village - go to evil lair - fight boss - get star" template, the game quickly starts to subvert its own template. Later chapters see Mario entering a wrestling tournament, chasing his own shadow through the game world, and solving mysteries, Hercule Poirot-style, on a decadent three-day train journey. Along the way you'll also find yourself helping Princess Peach to fend off the advances of an amorous computer, and you'll even get to control Bowser, who prances and preens through the game like an enormously ugly pantomime dame and manages to steal every scene he's in. Yes, the chapter format means the game is essentially linear, but the central town of Rogueport acts as a hub, and much time is spent between chapters helping out townspeople, exploring around town or tracking down treasures. Obsessive collectors are particularly well catered for - with badges, shine sprites, recipes, star pieces and other goodies all cunningly hidden and simply begging to be found.

Given the general air of lunacy that pervades every part of Paper Mario, the fact that the moustachioed marvel himself is looking a little flat these days hardly warrants a mention. In fact, no-one in the game ever alludes to Paper Mario's central conceit - the fact that every character, and much of the scenery, exists more in two dimensions than three - but it's a central part of the gameplay. Mario can flatten himself to the thickness of paper, roll himself up into a tube, and even transform into a paper aeroplane and a paper boat; it's also possible to blow away sections of scenery, unfurl staircases and slip through the narrowest of gaps, as the situation requires. The constant drip-feed of new abilities leads to a constant progression that owes a debt to other Nintendo franchises like Zelda and Metroid. It's often necessary to return to previous areas with new powers in order to reveal new wonders. The paper motif is by no means consistent - for instance, it's still possible to be hurt by large spikes even though it should technically be possible to slip between them, and despite his two-dimensional nature, Mario's still pretty handy with that hammer - but it's charming, and it's funny, and it works. The paper motif also allows for some spectacular graphical effects that emphasise the cartoon nature of the action: buildings fold flat as you enter, vast hordes of Boos fly out of tiny treasure chests, and enormous paper dragons gurn enthusiastically at the camera. The characters are boldly drawn and pin-sharp, and the animation is faultless throughout. Forget Wind Waker's over-stylised cel-shading: Paper Mario 2, in both style and spirit, is definitively the closest correlation yet between game and cartoon.

This is the dragon I was talking about

Yet Paper Mario's greatest triumph lies in the way it takes the assorted psychedelic creatures of the Mushroom Kingdom - which, we must remember, mostly started life as a selection of sprites for a twenty-year-old platform game - and unexpectedly turns them into living, breathing characters. By the end of the game, you'll care deeply about the people you've travelled with and the places you've visited. The game drips charm, it's often laugh-out-loud funny, and even though there are plenty of references for long-term fans to recognise and enjoy, the humour is always inclusive. Immense enjoyment could be gained from Paper Mario without any prior knowledge of the Mario legacy whatsoever; the many in-jokes and subtle references simply add to the fun for those who've played more Nintendo games than they'd perhaps care to admit. By the time the credits roll, following the most beautiful and shamelessly emotional ending seen in any game since Link first blew on his ocarina, you'll be as attached to this game as any other you've played.

It won't sell, of course. It's a sequel to a game nobody bought, on a console that everyone has abandoned, in a cartoon style that has never been less fashionable. Somehow that doesn't matter, because the Mario role-playing games have always felt like a secret - something to be shared with a privileged few, and treasured deeply. Paper Mario 2, while fundamentally similar to its predecessor, comprehensively outdoes the original in every way, with a better storyline, a surprisingly sophisticated battle system and some superbly detailed characterisation, as well as a defiantly loopy sense of fun. It's in every sense a vindication of Nintendo's unique family-based vision, and if you're broad-minded enough to leave your gaming prejudices on the shelf, you'll be rewarded with the most entertaining game in years. It's hammer time.