Post feature 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
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.