While optimizing the codebase for project PW, we experimented with the idea of changing the way sprites are lit, and how they interact with the world, the results speak for themselves, the improvement to the visuals is so striking that we’ve merged the new codebase into the main game and begun the legwork of updating all existing assets to use the new system.
So the new system started life as a new project file, with a few of the existing assets imported in, with each sprite given a custom material which takes into account the bump map resource, the lighting then illuminates the diffuse material based on that bump data.
In addition, the player model is split into individual prefabs, making collision based on what frame of the animation is playing, possible – this helps in a number of ways, most obviously being the ability to make not only custom collisions but also custom masks, each individual frame can be masked regardless of where the prefab is positioned, and because everything is run through a pixel process, the result is accurate lighting and colors, with pixel-perfect shadow casting.
With this early revision the framerate suffered greatly because of the scripts being used not being optimized.
As the code was more optimized, the framerates improved dramatically, unlinking the lighting system from timescale (and thus, being redone each frame on update), meant that not only was the framerate improved but adding complexity to the game would not severely impact performance.
Once imported into the current build of the game, what we get is a huge boost to visual quality and polish, while also greatly improving the original builds performance!
We’ll keep you updated as the build progresses!