Hacker News new | ask | show | jobs
by MarkMoxon 849 days ago
The coordinates of the shadow are calculated here:

https://lander.bbcelite.com/source/main/subroutine/drawobjec...

and they are drawn here:

https://lander.bbcelite.com/source/main/subroutine/drawobjec...

The shadow is a very simple projection straight down onto the landscape, which isn’t totally accurate, but it’s quick and easy and looks good enough. The shadow doesn’t drape over the shape of the landscape, and the ship shadow appears on the ground beneath objects rather than on top of them, but you don’t really notice.

Lovely, simple, effective code. Much like the rest of Lander, really!