2
\$\begingroup\$

The view of my game is always semi topdown. I'm trying to make the contactpoint between characters and the floorplane more grounded without rendering hundreds of sprites.

One thing that I think could work well is to just hide some pixels of every object that is i.e. 2 cms above the floor.

See GIF below of an example I did in Photoshop:

enter image description here

Things that I'm thinking about:

  • check the z depth before rendering - if it's very close, then randomly don't render the pixel
  • randomly writing "wrong" depth buffer values for the ground plane
  • a small layer 2cm over the groundplane that writes z values only - draw this before the character

As I'm still in the research phase, I'd like to also explore other possibilities.

Is there already a well established way to do this?

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.