Dungeon Lighting

Today I did some work on lighting. I added a system that keeps track of whether you’re outside, or in a building, or in a dungeon, and then changes things like light color, intensity, and position to create the right mood. I added torch models with point lights on top, which give a little more lighting to the scene. I had to turn down the shadow resolution to Unity’s lowest setting in order to keep performance reasonable on my laptop. According to Fraps I’m getting about 45 FPS at 720p.

I got rid of the custom physics stuff I had written, so now I’m using Unity physics to handle movement, collision resolution, raycasting, etc. The main reason for that was performance. I liked having control over everything. For example I still need to figure out what I’m going to do about pausing physics when the game is paused. I’m losing some┬ácontrol┬áby using Unity physics, but the performance has improved so I guess I’m sticking with it.

Right now I’m using a ton of little cubes, one for each cell on the map that’s blocked. I have a feeling that might be a performance problem, and I might need to do some smart stuff with joining adjacent blocked cells together into a single physics collider. For now I’m not going to worry about it too much though.

dungeon lighting

Author: Miller

Independent video game developer. Formerly Halo, Age of Empires.

Leave a Reply

Your email address will not be published.