itch.io is community of indie game creators and players

Devlogs

Refactored Shadows for Performance

Vaults & Vampires
A browser game made in HTML5

I returned to this project after several months away. The next item I had in the backlog was to optimize shadow rendering for collectibles. I had been using a third-party asset for blob shadows. In the debug scene, I noticed that rendering a large number of collectibles caused a severe performance hit. I went from 400-500+ FPS down to less than 100 when getting all collectibles in view.

At first, I tried using a more performant asset I had found while working on another project. This did improve performance significantly, however, there were a number of visual issues that I didn't wasn't able to resolve.

In the end, I went with the Mario Odyessy approach. The scenes will now primarily be lit with a directional light that points straight down. This approach both gives the best performance and it has the added benefit of making it easier to judge the absolute position of moving platforms.

I anticipate this will make lighting in more complex scenes challenging, however, this is a good trade-off for the moment and I'd really prefer to implement some new gameplay mechanics as I return to this project.

Files

  • vaults-and-vampires-webgl.zip 14 MB
    Version 2024-08-17-e76eaeb
Leave a comment