Category Archives: Game Analysis

Creative use of assets in videogames

Models and textures are two of the most basic assets in a 3D game. From vast environments to collectable items, everything in a 3D game have to be carefully modeled and textured.

Shadow of the Colossus for the PS2 is a good example of how models and textures can be used to create new effects while working with hardware limitations.

Shadow of the Colossus

Shadow of the Colossus is generally referred to as one of the games that pushed the boundaries of the PS2 in terms of graphics, and one of the reasons for that was the way it could render fur in real time, an effect almost impossible to achieve with the PS2 hardware. The fur of the colossi play an important role in the game, since it indicates the areas the player can climb. This also means that these areas had to be very detailed, since the player would see them from a close distance.

The most basic technique to simulate fur and hair in games consists in using textured planes with opacity maps in a perpendicular position to the model.

In Shadow of the Colossus the effect was achieved with a combination of perpendicular and parallel textured planes. This technique was used to keep the effect visible in every angle.

A normal mapping of the hair texture was added to the planes to add highlights and reflections to the fur of the colossi. The finishing touch was the vector unit lighting system that creates the illusion of an anisotropic effect.

Example of hair shader with anisotropic reflections

While this technique was very economic in terms of polygon count, the resulting effect was very impressive.

Advertisements
Tagged ,

Game Analysis – Spelunky

Let me start this game analysis by saying that choosing a game to analyze was harder than I thought it would be. My initial idea was to look into Super Metroid for the SNES, but let’s face it: it’s been analyzed by every single game magazine, blog and game theory student a million times.

Super Metroid

My second idea still followed the first one. I would write about Cave Story, a game that was heavily inspired by Super Metroid, but it’s more recent, and it’s indie, which makes it more interesting to study.

Cave Story
Opening screen from Cave Story+, a version with updated graphics and music.

And still something wasn’t feeling right. I felt I wasn’t making justice to the only game I’ve been playing almost constantly for the last 2 years, and by constantly I mean at least twice or three times a week. Every week. Seriously.

This game is called Spelunky.

Spelunky

Let’s see what Spelunky is about, and why it’s so good:

THE GAME

Spelunky is an indie 2D platformer and was developed by Derek Yu in 2009 as a side project. The game’s main controls are jumping and using your weapon, in this case a whip. What makes it different from other platform games is that it borrows some characteristics from another game genre called “roguelike”.

Some characteristics from roguelike games adopted by Spelunky:

1. levels are procedurally generated, so every play through is different from the last one
2. roguelikes are hard!
3. death is permanent, and generally you don’t have many lives

By combining aspects from platformers and roguelikes, Spelunky has a nice balance of simple controls and complex strategic gameplay.

The game is divided in four areas (cave, jungle, ice cavern and temple), with four levels each. The difficulty level is progressive, and enemies are completely different from one area to the other.

There is no time counter, but there IS a time limit of 2:30 per level. Once you hit the time limit, you receive a message at the bottom of the screen, and a ghost starts following you through the stage. If you touch the ghost you get an instant game over.

To make things more interesting, there are lots of items that can be bought (or stolen) in shops that spawn randomly in the map. The items range from guns to climbing gloves and jetpacks, and they can be very useful if you want to stay alive for longer than a minute.

Items

I don't even know what half of these do.

Sometimes, even with all the items and strategies you won’t be able to keep your character alive, because this game is HARD! But definitely, not in a bad way. If you die in this game, you can be sure it was your own fault. Every trap is positioned in a way you can avoid or disarm, and every enemy can be killed if you know how to. It’s a learning process: every time you die, you get better at playing the game, much like old classics like Mega Man and Contra.

To help you get to the end of the game, every time you reach a new area you encounter the “Tunnel Man”. You can pay him to create shortcuts for that area, so in your next game you can access it directly. It will cost you though, so be prepared.

Tunnel Man

Tunnel Man's prices are a little high...

...but the rewards are worth it.

CONTROLS

The controls in Spelunky are very simple. Apart from the directional buttons used to move your character, you only use 3 more buttons: the weapons/action button, the jump button, and the weapon selection button.

This simple control scheme can produce very complex actions. If you press down and left, or down and right at the same time, the character crawls, and if you crawl close to a ledge, you can hang from it and see whats underneath your position. You can also keep the action button pressed to run. The weapon selection button cycles through your weapons with each button press, and shows the selected weapon in the characters’s hands.

ENEMIES

Every area of the game have different enemies, and each enemy have a different behavior and very specific characteristics. In the first area for example you have bats, snakes, spiders, giant spiders, skeletons, cavemen, and a number of different traps. Each of these have to be dealt with in a different way, and this differentiation asks for diverse and creative tactics to finish a level.

DESIGN

In this game the levels and obstacles are generated randomly. On top of that, every level have some special variations called “level feelings”that appear every once in a while. You can identify these special variations by a message at the bottom of the screen when the level starts, and they feature harder enemies or boss versions of some enemies, different items to be collected and completely different challenges. Some examples of this are the dark levels where you have to carry a box of torches, or levels where the bottom sections are replaced with water and a giant fish. All these variations give the game an almost endless replayabity factor.

Level feelings

SECRETS

This is the kind of game you can finish without ever knowing there are secret areas and items in it. Let’s take the City of Gold secret area as an example:

To access it, in one of the four initial stages you have to find a key and the corresponding chest, open it and get the Udjat Eye item. Then, in one of the next four levels, the item will start to blink, showing you the location of a secret entrance to the Black Market. The Black Market is the only place in the game where you can buy an item that revives you if all your hearts are drained. After you buy this item (for 50.000), you have to find the giant Moai head, and die right next to it to find another item called Hedjet and a passage. On the next level you have to kill the mummy and combine the item it drops with the Hedjet to create the key to the City of Gold. Now you just have to find the entrance to the City of Gold and enjoy.

City of gold

Just be careful not to die after all the effort to get here.

GRAPHICS

The graphics follow a simple yet appealing pixelated style. The main character is only 40 pixels high, but still have a lot of personality, and is well animated if you consider the resolution limitations.

The power of PIXELS!

MUSIC

The music is divided by area, and is generally very good. That’s a good thing, since you will probably hear the same music over and over again for a long time.

TECHNICAL ASPECTS

Only recently I found out that the game also comes with a built in level editor, and you can access it by pressing the “F2” key at the title screen.

The game was created using GameMaker, and a very smart tool to randomize the levels and obstacles in chunks of 4 by 4 screens.

You can find some very interesting technical information in the developer’s blog.

CONCLUSION

If nothing I said until now convinced you to play Spelunky, I should mention that the game is completely FREE, and the developer also made it’s GameMaker files and source code available for download, as a learning resource for indie developers and students. Awesome!

The game is currently being remade from scratch for a XBLA release, with better graphics and new gameplay features.

Spelunky is a great game, both played in short bursts or in long and careful attempts to reach it’s ending or the City of Gold. Like the old NES classics, it’s a game that teaches you how to play it little by little, and get’s better every time you play it.

You can download the game and source code by clicking here.

Tagged ,