I have an top-down perspective android game that uses opengl-es. In the game, the user moves around a cylinder to navigate obstacle courses. I have implemented a jump effect (user flicks the screen up to initiate), and I want to have some bottomless pits that must be jumped over.

I'm looking for some ideas about how to draw this given the top-down 2d perspective. My question isn't about the specific implementation (I can handle that), but just what are some ways to depict a pit in 2d?

  • 3
    Maybe try gamedev.stackexchange.com also... Commented May 8, 2011 at 21:22
  • 1
    Or graphicdesign.stackexchange.com Commented May 9, 2011 at 0:27
  • i like how programmers exchange referred me here, and now you're referring me elsewhere Commented May 9, 2011 at 7:20
  • 1
    Yep... sorry for the redirecting but it really isn't a UX question. I'd go for graphicdesign.stackexchange.com
    – Phil
    Commented May 9, 2011 at 7:55
  • its totally a user experience question. this is all about perception. Commented May 9, 2011 at 15:25

3 Answers 3


The most obvious thing that springs to mind is a something that fades from the colour of the ground (or something equally visible) to black at the centre. As long as your ground isn't black they should stand out and once the player falls in one they'll remember ;)


Texture, or rather a change in the graininess of the texture over distance can be a strong visual cue for slope or depth. You could have a texture around the entry of the pit that originates from the surrounding graphics and as the gradient of the surface increases into the pit the texture becomes finer and darker in color. This will give the impression of depth into the screen. As ChrisF said, for a bottomless pit the obvious color for the center would be black; in this case the texture would decrease in size until it got fine enough to blur into black.

An advantage of using texture over just a color gradient is that you can more obviously show the pit looming up from a distance from an oblique angle view point as the texture provides a stronger cue for shape than color does. However you did say that your domain was a 2D one only.

Another advantage of texture gradients is that they can be used to give an impression of motion which you would not get from a uniform color gradient. Rerendering texture elements on the screen over time in the appropriate locations will give the impression that the whole surface is moving. Should your hapless game character venture too close to the pit it would be nice to show some movement of the pit surface as they plumet into it.

There are many other Monocular cues for depth perception that you could also explore.

The other thing to think about, which is really cool with the latest devices with forward facing cameras, is the possibility of developing a [no-glasses ] 3D effect (maybe in a future version of your game). This will allow the game to obscure the edge of the pit from certain viewing angles which would give a very strong illusion of pit-ness.


I agree with ChrisF. I recently downloaded a game from my iPad entitled "Falling Fred". The whole game revolves around you dodging obstacles as you fall to your death. Here's how they treat the perspective and the hints at distance. http://static.apptrackr.org/itunes/3/414729389-1303528620/screenshot0_1303528621_a43582a4c8404462fded2d874a325ca9.jpg

  • Link: 403 - Forbidden
    – Phil
    Commented May 9, 2011 at 7:03

Not the answer you're looking for? Browse other questions tagged or ask your own question.