Saturday, March 20, 2010

Valve and Level Design

The designers at Valve are the supreme rulers of the realm of level design. Virtually every single game that Valve makes boasts superior artistry and craftiness. They truly are masters of their art.

My question is: "How on Earth do they do it?"

Turns out Valve is awesome enough to tell us.

Just check out the Valve Level Design Wiki for Source Mods: http://developer.valvesoftware.com/wiki/Half-Life_2_Level_Creation. It's a priceless resource. Did I mention Valve is awesome!

http://developer.valvesoftware.com/wiki/Single-Player_Mapping_Tips
Single player mapping tips! That's gold!

http://developer.valvesoftware.com/wiki/Bounce_(level_design)
http://developer.valvesoftware.com/wiki/Adding_More_Detail_to_a_map
http://developer.valvesoftware.com/wiki/Loops_(level_design)
http://developer.valvesoftware.com/wiki/Push_Gameplay

All stuff that is definitely worth taking into consideration when creating a map.

Saturday, January 30, 2010

Video Games as an Art Form

Video games are a form of fine art, where emotions are expressed through multiple mediums. Rather than simply presenting the user with events and allowing them to interpret it by themselves, video games make the user feel as if they are experiencing the world for themselves. In this way, players have a much stronger connection with their environment. But, like every art form, ther are many different elements that come together in the final product.

First and foremost is the story. The story is such a key element because it is what motivates the player to actually play the game. The story is what pulls the user into your fictional world and drives the action of the game forward. The story is what unifies all of the elements under a single purpose. Just as in a book, the story of a video game has a distinct plot. Some games gently ease in the conflict, while others throw you straight into the action. A satisfying story will, in the end, resolve the conflict. An example of a game with great storytelling is Half-Life. Half-Life told the entire story from a first person perspective in a seamless manner. You always have full control of Gordon Freeman, and the story flows smoothly without any discontinuities. Another game with superb storytelling is The Legend of Zelda: Ocarina of Time. This story involved complex myths about gods and demons, and a struggle for an artifact of ultimate power. It really sucks you into the fantasy world.


Half-Life


Another key element is the design of a game. These are reoccurring elements that the player will eventually gets used to. This involves controls, camera and movement schemes, power ups, health, etc. These are important because they effect the feel of the game. Game with terrible cameras and controls, such as superman 64 will seem very akward and not be fun. The design should also compliment the art style. For example, it is unsuitable to have hovering rotating hearts as health pickups in a modern tactical shooter. Just as it is unsuitible to have tactical shooter elements in a cartoon like game. People should also feel like they have natural movement of their character. Super Mario 64 introduced an innovative new 3rd person camera which was intuitive to use. The Legend of Zelda: Ocarina of Time has outstanding game design, with a perfect cartoony, yet dark style that was easy to use and understand.

Super Mario 64

Finally, we come to the presentation of the game. This category in itself has multiple topics, which I will discuss. First, there is the sound. Great music and great sound effects make a good game ten times better. Music can help establish the mood and ambience, while sound is another way to provide sensory feedback to the player. An example of a game with great mood establishing music is The Legend of Zelda: Ocarina of Time. Presentation also includes visual art. This is independant of processing power. Art is how a level stands out. It determines if it's just another kids drawing or a masterfully crafted sculpture, or painting. Art gives a level it's theme and feel, as well as compliments the story. Once again, I will bring up Ocarina of Time as an example. Metroid Prime also has amazing art. Finally, presentation also includes graphicall effects. Combined with good art, this is an indispensable tool for bringing the player into your world. An example of a game with graphics effects is Crysis.

Crysis

Sunday, January 17, 2010

id software

Only one company can claim to have truly ridden the whole ride: id software. From 1988, till the present day, id software has been at the head of gaming, setting numerous industry technical standards.

Commander Keen:
We begin with Commander Keen, id software's first revolutionary game:


This game pioneered the use of smooth side scrolling on a PC. It was also the first to use an advanced graphics card.


Wolfenstein 3D:
Wolfenstein 3D is the grandfather of the entire FPS genre. With this game, id singlehandedly paved the path for generations to come. There's a reason why literally every FPS since then featured Nazi's as the enemy. In the technical area, Wolfenstein 3D pioneered smooth scrolling, pseudo 3D, ray casting. Unlike many games at the time, Wolfenstein 3D could run on virtually any computer without graphics enhancements.




Doom (id tech 1):
All right... You knew this was coming. Meet Doom, the first game using the id tech engine. Ever heard of it? It's only like one of the most used game engines of all time! Doom set numerous graphics standards, with it's use of high quality textures, and atmospheric lighting.



But Doom gave us one thing that we will never forget. BSP: Binary space partitioning. BSP is used in every freaking engine today. The Source engine, Unreal engine, Torque, Cryengine, you name it. It is the single most common method used for geometry, due to it's super fast rendering and collision detection. Thank you Doom!

Quake:
What is Quake? Quake is the difference between Wolfenstein 3D and Halo. Quake is the modern FPS. Improving on id tech 1, the quake engine gave us total ultimate pownage! Oh my god, you can look up and down! Oh my god, I can play death matches against people all over the world! Oh my god, it's a light map! Quake is awesome.



Quake 2 (id tech 2):
Now, we see the next iteration of id tech! Quake 2 supported hardware accelerated rendering, as well as sported multiple networking enhancements.








Quake 3 Arena (id tech 3):
Oh yes... Id tech 3. This is engine is probably the most popular of the id tech series, being used in 100's of games, including the almost as famous Call of Duty. Quake 3 boasted superior networking, fast paced game play, high resolution textures, and even some shader support.




Doom 3 (id tech 4):
Now, most of the previous title look kind of lame compared to modern standards. But Doom 3 set the bar so high, that it still has yet to be broken. Doom 3 gave us modern graphics, complete with shadow mapping, advanced lighting effects, and numerous other technical improvements. Doom completely revolutionized how we create stunning effects, pioneering the use of various optimization and shader techniques to produce amazing results. Id tech 4 has been used in numerous game including Quake 4, Enemy territory Quake wars, and many of the more recent Call of Duty games.




Rage/Doom4 (id tech 5)
Id tech 5 is id's upcoming engine, and it is expected to continue the amazing trend that id has established.




Cousins of id tech:
Many games have utilized id tech, or use a modified version of it:




Half Life (GoldSrc)



Call of Duty



Medal of Honor Allied Assault


Jedi Academy



Prey



Monday, November 30, 2009

Hand Posture and Gesture Recognition

Human-computer interaction is currently a active field in computer science, with Microsoft working on project Natal, and Universities developing virtual reality systems. One of the most basic problems in HCI is hand posture and hand gesture recognition. While these to terms are often used interchangebly, they are fundamentally different. Hand posture is a static model of the hand, which a gesture is dynamic, and involves change in pose. We use both of these naturally in a normal conversation to convey ideas and emotions. There are two ways to implement such a system. One is data-glove based, and the other is vision based. A data-glove based system will give the most tracking results, but requires the most hardware to implement. In addition, most devices are clunky, and may limit how natural such a system feels. The second method is a vision-based approach. This involves using a simple web cam to provide an image of the hand and extract pose data from it. This approach is the cheapest, and most lightweight, but the results can be unreliable. Part of the problem is that most vision based systems are oriented in 2 dimensions. Using 2D data to classify gestures is much more innacurate than using 3D coordinates, but then the problem arises of how to determine depth from a single image. Multiple cameras can be used, but current stereo matching algorithims are not efficient enough to be used in real time. The solution is to take advantage of a variety of monocular depth cues to determine the depth with the most likely probability. These cues include shadows, occlusion, scale change, and more.

Another problem with determining hand poses is getting it to function in real time. A non-realtime application destroys the interactivity and complicates the gestures. This problem can be solved by taking advantage of multi-threading technology. Intel's newest processors, including the Core 2 Duo, and the Core i7 both have the ability to preform parallel processing (executing multiple commands at the same time). In fact, the Core i7 allows 8 commands to be executed at the same time. Since this is a relatively new technology, most programs don't take advantage of this. Utilizing this technology can optimize the program up to 8 times.

When detecting hand poses, images must be passed through different filters, some o which are independant of each other. By performing a different filter for each thread, you can increase detection times. This means that instead of waiting for 16 image operations to complete, you only have to wait the time of 2.

Friday, November 27, 2009

Bloom

Image based lighting is the process of taking an image, and lightening and darkening areas of the image based of it's content. One highly used effect derived from this is the Bloom effect, which is used to create a dreamy and cloudy atmosphere. It is mostly utilized in outdoor levels.

The first step is to take an image:



Then use a color ramp to convert it to a luminosity map of the image:



The step after that is to blur the luminosity map:



Then, this image should be overlayed over the original image using a mix method (not add or subtract). Here is the final result:



This technique can be easily implemented in shaders and other postprocess methods. Another common technique is HDRR (high dynamic range rendering), which highlights specular areas, and grays out dull colors. This technique is similar to Bloom, except the luminosity map is not blurred.

Game Engine Architechture

There are many different game engine architectures that are used throughout the gaming industry. I will now attempt to assign names them: code interface based, config based, and scripting based. These three are the main types of architectures used.

Code interface based engines still require you to use code to access engine functions. These engines basically take everything that you need to make a game, and put it there and wrap it, so that you can easily use it. This type of architecture is more commonly found in open source engines, with predominant examples being irrlicht and OGRE (although technically not a complete game engine). The advantage of this type is that you have full and complete control, without any limitations. A disadvantage, however, is that it still takes a large amount of time to make a game.

The next type is config based, which doesn't require you to do any programming at all whatsoever. This is more oftenly found in the commercial world, with engines such as Torque. An open source example would be Reality Factory. These engines are generally genre specific, because the lack of code limits flexibility. Many of these engines, however, have a small element o scripting, for in game events and sequences. The advantage of this architecture is the ease at which you can create a game. The blaring disadvantage is the lack of flexibility or customizability.

The third and final type is a scripting based engine. There are actually two types of these. One type is very similar to the code based interface, except the engine is written in code, but the game is actually run through scripts. Examples of this are Love 2D, or Wrecked games engine. The next sub category, which is probably the best type, is many component engines, with the wrapping game engine written in scripts. This type is the most easily customizable, and usable engine architecture. A proffesional example is the Unreal Engine, which is written in UnrealScript. This means that large portions o the engine, as well as gameplay, can be customized without the need to touch a single line if code. This allows for the most flexibility and ease of use. The only disadvantage is that the creation of the game engine takes a lot of planning, as well as a lot of time to create. This architecture is still, by far, the best possible one to utilize when making a game engine.

Thursday, November 26, 2009

Open Source Rendering Engine

Many people often confuse the term "rendering engine" with "game engine", while in reality, they are very different. A game engine normally consists of multiple components, seeing as a game consists of many different elements. This includes audio, graphics, scripting, physics, and input. Rendering engines focus on the graphics component of games. Taken together with audio engines and physics engines, they make a complete game engine.

In the category of rendering engines, there are many open source options. The most powerful and predominant engine is th OGRE Engine. This behemoth is, by far, the largest, most mature, and most extensible open source rendering engine. When OGRE was not as mature, a competitor by the name of Crystal Space was another alternative. That project, however, died out, and has not been updated in a while. Recently, a new project by the name of Horde3D was started, with a huge focus on simplicity without sacrificing ability. While currently, it seems like a possible contender, it is simply not mature and developed enough to be a permanant solution. It's worth checking out, however.

The reason that OGRE has become so popular is because of it's amazing organization. The entire engine is object-oriented and a highly customizable plugin architecture. This flexibility sets it as the engine of choice for even many commercial game engines, for example the NeoAxis engine. By far, OGRE is the most flexible, powerful, and customizable rendering engine.