Unity’s lighting quirks and design of weapons/skills.
Hello all! I hope everyone had a productive, fantastic week. I actually went on a vacation to Lake Tahoe/San Francisco over this past weekend, so apologies for this post being a few days late. There will be another blog post regarding playtest results in the next day or two, so keep an eye out for that!
However, lets get started on what THIS post is about: lighting and design changes.
So I’ve struggling for a while as to why we weren’t getting any live lighting on our game. In the engine, it was working fine. However, when I pushed the build to our devices, only the lightmaps transferred (there was no live lighting, only static shadows from the environment).
I found this issue fairly quickly, and it was a simple check box that either got overlooked or somehow unchecked. Everything EXCEPT the floor was marked as “Lightmap Static”. If an object isn’t marked as “Lightmap Static”, it won’t accept shadows from lightmaps or live lighting.
The second issue, however, was more in-depth and took longer to solve: there were no shadows on the floor from the static environmental props.
Quality Settings (located under Edit -> Project Settings -> Quality). By default, Unity chooses the “Fastest” quality setting for all publishing platforms. This is great for getting things working smoothly, but not great for making things look good and aesthetically pleasing. By going into the settings and allowing shadows, changing shadow distance, and deciding what kind of shadows from which lights that we wanted, we now have a first pass at live lighting! (Also, protip: the arrows on the bottom of the check box matrix is how you move the green selection. Fantastically bad UX!)
However, the first time I pushed the build onto my iPad, a noticed that, even though I put “Soft and Hard Shadows” on the quality settings, only hard shadows were visible, and they were super jagged. I did some research and changed Shadow Cascades from “Zero” to “Two”, and changed the Shadow Projection from “Stable” to “Close”, and the jaggedness went away immediately. However, I was still having an issue with only seeing Hard Shadows, and zero soft shadows.
One of my biggest, BIGGEST gripes about Unity is how they have the same options tucked away in multiple places, and they have really important notes about their system hidden away. Case and point:
Now, theoretically, any options that overlap with each other should be condensed into one menu option. However, since they weren’t, I went through and made all the options the same for each light. I ASSUME that the quality settings is the lowest common denominator, as in all other settings filter through the Quality Settings (if something is a higher resolution than the quality, then it’ll be knocked down to what the quality says). It appears that’s not the case, though. I’m unsure what exactly happens in the black box behind Unity for lighting.
And finally, after many hours of troubleshooting, I came across this gem on Unity’s documentation site:
Not only was this tucked away into a small corner page (not shadows, not lights, not directional lights, but directional lighting shadow details), but why give us an option if we’re not allowed to use it? The quality settings for Mobile were marked as “Hard and Soft Shadows”, but soft weren’t showing up because mobile doesn’t support soft shadows.
The other side of this post is about design, so let’s discuss that really quickly.
As I mentioned previously, we are moving our weapon designs from “give 3 unique skills” to “give 2 unique skills + each unit has a base skill they keep regardless of weapon choice”. I’m calling this the 2+1 skill system. There were a few reasons behind the change. One was so that each unit could keep a skill that represents their role in the game, and with that, we can have weapons give added bonuses, effects, or skills that only trigger when the base skill activates. This allows for a lot of interesting multi-layered mechanics. Also, this allows me to avoid the possibility of a class accidentally falling out of it’s intended role.
My first pass at the base skills are as follows:
- Knuckleduster: Lasso (bring enemy into melee range, then punch them in the face)
- Gunslinger: Rapidfire (unload many attacks – great for blitzing down a unit)
- Prospector: Family Bourbon (heal over time – a necessity for our healer)
- Techwitch: Barrier (TW is our nullifier class, and I have many interesting effects for our barrier skill)
In addition, this allows us to trim off 4 new icons that we would have otherwise needed, and since the art team is currently well overloaded, I’m sure Keren appreciates that!
With this, I’ve devised a simple framework for me to follow for our new weapons. For example, the Knuckleduster will have a tank weapon and a DPS weapon. The Prospector will have a healer staff and a mage/DPS staff, and so on.
This quarter is quickly coming to an end, and our beta build is going to be fantastic! I’m incredibly excited about it.
Again, expect a short post about playtest results soon. Hope you all have a fantastic Sunday and a great week.