It’s been a really productive week–lots of code cleanup, which always feels so nice. Since refactoring doesn’t make for very interesting dev blogging, my goal for today was to have something new to show. And with just a few extra hours of work…

Soulcaster3 2014-11-21 17-08-10-33When this room layout engine is more robust, I’ll do a more thorough post explaining how it works. You can tell what’s going on if you stare at it…

Continue reading

Realtime Editor Lighting

When I fix the problem with WP uploading GIFs, I can post this sort of thing directly. In the meantime, here’s the room editor which now updates light sources and obstruction in realtime as the room structure changes:

This week is mostly earmarked for editor work, so I should have some editor features to show pretty soon.


Most of today was spent doing fixes for the editor to handle the updated room definition and pattern format. But that doesn’t make for an interesting screenshot (yet), so here’s a test level with some light sources:

atmosphereIt’s starting to look a bit cooler. Need a few more light sources and better shadow behavior.


Though Soulcaster 3 has been using the Escape Goat 2 rendering code for a while, today was the first day for me to enable the lighting features. It uses pretty much the same techniques as before, though we’ll need to account for the different surface facing directions given this new camera angle. With EG2, it was easy because you could only ever see one face of a cube, from the side. In SC3, with its early Final Fantasy camera perspective, you can always see the top and one side of a cube. We’ll figure out a solution to lighting objects at some point (maybe with some tasteful normal maps). In the meantime it actually looks pretty cool:

lighting1Everything is set pretty extreme to start. The light cast by the summoner will likely not cause shadowing on the floor, because as cool as this looks in motion, it actually makes me kind of motion sick to have it constantly casting rays around. And Randy would kill me if I tried using red #F00 as a light hue.

The fake ambient occlusion is back as well, which involves stamping a blurred rectangle or circle subtractively to the light map at obstacle positions. This will be cleaned up to be a lot more subtle for stuff like the pillars.

lighting2Because we composite the scene with two basic layers, each with its own lightmap, we can have elevated objects cast light on the walls below them. Here we have the molotov cocktail casting some light down on the wall, but the light coming from the summoner doesn’t affect the tops of the walls. This goes a long way to making the scene look 3D.