Tile Fix, Lighting Sprites, and Trailer Work

Hey Folks! Another light update day today, as a chunk of my time went towards working on the teaser/trailer script. I'm feeling pretty good about it, though, which is a relief. Before I reached out to Josh and got this started, I was a bit anxious it wouldn't be possible to make something exciting with the limited gameplay so far. But I'm definitely more hopeful now :)

On the dev side, I figured out that tile placement issue. It was a simple rounding bug in the calculation of tile sizes. It uses the image to determine the tile size of items when it loads them, and tiles had an invisible 1x1 pixel image, which rounded down to 0x0. So I fixed the code to always have a minimum of 1x1, and gave them a more suitable appearance just because. And voila! Now ship power systems work again.

My next task was to get light sprites working again. Previously, only the light reflections would appear. The light itself would not. That meant no pretty LED and other blinky things to look at. So I started work on restoring those in the game. I also hooked-up the light colors, so now the data once again defines the light color.

As you can see in today's screenshot, we're getting there. The lights are mostly appearing as they should now, except one thing: they aren't rotating correctly. This is due to the way they're attached, as children of the light meshes. The light mesh for pools of light has to be non-rotated to fit the scene, and that means its children will also be non-rotated. I'll have to come up with some way to selectively rotate the light sprites without rotating the light meshes.

That, and the alarm lights need to be toned way down, or limited to sprites-only. That green looks pretty bad :)

In the process of doing the above, I decided to yank out all the old line-of-sight and light objects, since they were no longer used. I also discovered that the shader code I was using to do instanced rendering was useless. I needed to change the syntax a bit so it correctly utilized instance batching. It'll still likely need testing and optimization, but it's a step forward.

And that's all for this week. Hope everyone has a good weekend, and see you Monday!

Tags: Ostranauts