Prince of Persia’s Parallel Projection

Prince of Persia (1989) uses oblique projection – the same as is used for furniture diagrams – to give a sense of depth to an otherwise flat 2D platformer.

Prince-of-Persia-11

The problem is that oblique projection, while it gives an intuitive depiction of objects, is not really physically possible, for say a camera.

To do any kind of realistic lighting of a game in this perspective, we need to understand how the light rays are received by the camera.

Read more Prince of Persia’s Parallel Projection

Pixel Art vs Pixel Perfect (Part 1)

In the early days of video games – ignoring Tennis for Two and the like – graphics were low resolution images using a very limited palette: first two colours, then 48 for the NES. The golden age of these hand drawn pixel art games, before the move to 3D games and digital painting, was arguably the SNES, which had 32,768 possible colours but could only display 256 different colours on a single sprite. The limited colour choice meant that smooth gradients were not possible, and colours tended to look blocky and contrasting. This, combined with the low resolutions stretched over a large tv screen, gave a distinctive art style where individual pixels were very visible.

Super Mario WorldSuper Mario World (1990), one of the flagship games for the SNES, before 3D games became the norm

Read more Pixel Art vs Pixel Perfect (Part 1)

The Floor is Jelly: Why a good concept isn’t enough

floorisjelly
On the face of it, The Floor is Jelly by Ian Snyder is a great example of an indie platformer. The graphics are excellent, the music is good and it all comes together in a coherent mood. Not only that, but it has a unique and interesting mechanic, namely that … the floor is jelly.

It’s only when one comes to interact with it that the cracks start to appear. There is no proper controller support, although occasionally I can get it to work by unplugging and reconnecting my gamepad. It loads in a window – but not a splash screen – and then switches to full screen, which is quite jarring.

There are some elements in the game which make noises which change pitch, but do so in a seemingly random way. If it’s meant to spell out a recognisable tune, it doesn’t. In Mario games, the pitch rises continuously as you pick up red coins. Maybe that’s not appropriate. Try the fun little game Winterbells. All the bells have the same pitch sound. I think this would make for a much smoother experience.

These are minor interaction issues, which make the game feel very hodge-podge and not worth the £6.99 it is on Steam.

But then we come to actually playing the game (on a keyboard). The jelly physics works well and has super smooth curves, presumably using something cool with pixel shaders. Ian Snyder deserves a lot of credit for that alone, and bringing it into game form.

However, the levels are not balanced and the learning curve is steep, and after any period of gametime I quickly lose interest. Also, the jumping, the very basis of all platforming, feels broken. It takes careful timing to build up high jumps, as it should, but not in a meaningful or intuitive way.

Imagine if the rotation in Fez were delayed somehow, and it started out very hard. It takes not only a good mechanic, but carefully crafted levels and carefully balanced controls to make a game fun.

Review: Outland and Stealth Inc. 2

I thought I’d write a short review/analysis of two games I’ve been playing recently: Outland and Stealth Inc. 2. It’s worth saying that Stealth Inc 2 is free, and Outland very cheap right now on the Humble Store.

Both are great games, and both are 2D platformers, but that’s where the similarities end.

Outland

2015-08-30_00001

This is a platformer with strong bullet-hell elements. This makes for some fast paced platforming action, but also slow and careful analysis of areas. I wouldn’t go so far as to call them puzzles, because with enough lives one can just run through.

The movement in Outland uses actions we’re all familiar with (wall jumps, stomping etc.). But it’s pretty far removed from the Mario/Super Meat Boy style of fast paced platforming – it also includes ledge-hanging and uses a accurately proportioned humanoid, reminding me of Prince of Persia or Another World.

Most platformers these days have some kind of unique twist on the classic Mario or Megaman formula. In the case of Outland, this is the ability to change between two different colours, blue and red, to avoid bullets and activate triggers. Lots of 3D games recently have used switching between two different modes to add additional elements – I’m thinking of the Veil from Wolfenstein, Wraith abilities in Shadow of Mordor and Eagle Vision in Assassin’s Creed, to name just three. In fact these have been getting pretty tiring recently, but I can’t think of any platformers I’ve played that use a similar tactic. It’s quite refreshing really. Admittedly, the games I just listed had asymmetric modes whereas in Outland the areas would work equally well the other way round.

The world in Outland is a ‘Castlevania’ exploration, with a map to keep track of where you are, and easy teleportation between places. It features relatively difficult boss battles before one acquires new powers, which grant access to new areas. All this I like.

The setting and story is vaguely mythological, and is told through text screens. I don’t think it adds much, it follows that famous Carmack quote: “Story in a game is like a story in a porn movie. It’s expected to be there, but it’s not that important.”

The graphics are excellent: It uses intricately detailed silhouettes against pastel shades to create quite a unique atmosphere. I wasn’t a massive fan of the music or sound though, and I think Outland lacks ‘game feel’ – some screen shake when jumping or landing would have added a lot, sometimes it seems as though one is controlling a lifeless ragdoll rather than an actual person interacting with a world.

 

Stealth Inc. 2

2015-08-30_00001

This is the sequel to a game called ‘Stealth Bastard’ which, full disclosure, I’ve not played. It belongs very squarely in the post-Portal world of puzzle games: there are even ‘test chambers’. In fact, the world game is oddly reminiscent of this video.

The game expands as areas are lit up on a black background. I really like the way it looks, using pixel art but at normal resolution, and a rendered 3D character.

The platforming is Megaman-esque, with high friction and low jumps, which feels great. There is basic physics which is used in some of the puzzles, but the main unique element is the simple stealth system, where one can be visible or invisible depending on whether the player is standing in a shadow or not.

The puzzles are quick but sometimes require thought. It makes me feel like I’m progressing quickly and exploring new areas.

There is a story, told through simple animations which don’t look all that good or fit the feel of the rest of the game in my opinion. I also didn’t really understand the story, but perhaps that’s because I didn’t play the first game.

The game also seems pretty badly optimized, and runs very slowly in 1080p, which shouldn’t happen on my machine, certainly not for a 2D game like this. The slowdown actually affects the game too, as opposed to dropping frames in most 3D games where the game takes this into account and moves objects further: that is to say, the physics is all calculated per frame rather than per second.

In Outland, every collision with an enemy loses one life, and when all lives are gone the game restarts with lives full at the last checkpoint. These checkpoints are relatively spread out, and the game only saves between sessions at each level.

In contrast, in Stealth Inc dying (by falling off, hitting a fan or being shot by a laser…) results in immediately respawning at a checkpoint just before, and these are close together. It’s not quite what happens in Fez where you return to wherever you fell off from, but it creates that same fast paced experience, and I think it works very well.

New Super Mario Bros. physics analysis (Part 1)

This is an analysis of the physics mechanics for New Super Mario Bros. Wii (NSMBW). I imagine the physics for the rest of the New Super Mario Bros series (i.e. the original DS game, the 3DS game and the Wii U game) are virtually identical.

Screenshots included in this article are the copyright of Nintendo and are used under fair use.

Game World

Like the very earliest Mario games, NSMBW is tile based. Look at this screenshot:

screen_1440154175.0

We see that the blocks by Mario’s head are clearly simple squares, but the ground seems to have smooth curves. Now we overlay a grid the same size as the blocks:mariogrid

Now we see that each part of the slope is just a tile. Here we have three different slopes: flat, 1:2 and 1:1. It’s also interesting to spot the repetitions of the tiles of the terrain.mariogrid

That said, not everything in Mario is built of square tiles. The moving platforms and rotating circular bits (e.g. World 1-1) are handled differently. I may cover this in a later part.

Movement

The Mario games are famous for having a “slippery” feeling, as opposed to many other platformers. The acceleration is slow, but the top speed is quite high, making them feel fast paced.

Without the run button pressed, it takes about a second to get to top speed. With the run button pressed, accelerating is higher and so is top speed, mimicking real drag forces. Friction is also low, taking about a second to stop from walking, and even longer from running.

On ‘ice’ tiles, all these are exaggerated, with acceleration lower, and friction lower too.

I’d always be tempted to code this movement explicitly rather than trying to do force balance, so that top speed and acceleration curve can be fine tuned to what feels best.

On upwards slopes, the horizontal acceleration and top speed are decreased, and on downwards slopes they are unchanged, again as if the forces were resolved correctly, and the force were always in the horizontal direction – rather than up the slope. Note however that Mario never runs off a downwards slope. We’ll come onto this in the next part.

Gravity

This is a fairly realistic uniform acceleration and drag (so alternatively, acceleration decreases with speed downwards).

Jumping

Jumping is quite interesting. Mario can jump up to 4 blocks high, but he can only reach this is one holds the jump button until he’s reached the top, otherwise he falls back down. Just tapping the button makes him continue jumping for a while after the button is released – he can never jump less than one block. Holding the button until it makes no difference then means he falls away instantly. So it is neither of these two possible implementations:

  • The jump speed is uniform up to a certain point in time, when it switches to using gravity
  • A uniform acceleration is applied when the jump button is pressed, and gravity is present throughout

Instead there seems to be a desired velocity, more or less a parabola, which has less deceleration than it would under normal gravity. Then releasing the button just switches to the usual gravity.

 

In the next part I will cover collisions in depth.