• Register

NOME is a 2.5D survival rogue-like adventure game. You play as NOME, a curious salvager who journeys to distant planets to discover new elements, treasures and sometimes more than you bargain for.

Post feature Report RSS Lighting, Shadows, and Reflections in a 2D Game

The words "2D" and "3D" are often used to describe games, and although most people have a common understanding of what is meant by those words, they're actually pretty meaningless. In Nome, we're using a range of techniques typically associated with "3D" games including realtime shadows, lighting, reflections and physically-based rendering, applied to 2D sprites.

Posted by on

The words "2D" and "3D" are often used to describe games, and although most people have a shared understanding of what is meant by those words, they're actually pretty meaningless:

  • You could argue that all games are 2D, since the monitors on which the graphics are ultimately rendered are flat, two-dimensional displays (unless you've got some fancy 3D holographic projection monitor?!).
  • You could also argue that almost all games are actually 3D, since in modern engines even sprite-based graphics are typically rendered onto quad meshes defined in 3D space (even though those quads might all be positioned at a constant "depth" from the camera).

There's also often other assumptions based on these types of games: "2D" games are often associated with hand-drawn, stylised pixel art or cartoon effects. In contrast, "3D" games typically strive for more realistic graphics - using techniques such as global illumination, realtime shadows and physically-based rendering.

In Nome, we're crossing these boundaries somewhat; we're making a 2D game (in that both the camera and the player are constrained to moving only in the horizontal and vertical axes, and the graphic assets are sprites, not meshes), but we're employing many graphical techniques typically used in 3D games such as normal mapped lighting, realtime dynamic shadows and reflections, fog, and physically-based shading.

We're certainly not the first or only people to introduce these methods to 2D games (see, for example, Legend of Dungeon and In the Shadows), but it's certainly not widespread nor well-documented, which means that there's not a wealth of information out there when trying to figure out how to overcome barriers along the way! Over the coming months I'll be describing a bit more about our approach in more detail but, in the meantime, here's a few screenshots showing some of our current processes in-game:

Reflections

Reflections in liquid surface in Nome

Fog

Distance- and Height- based fog in Nome

Shadows

Shadows in Nome





Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: