NokiMo
relativisticgame
relativisticgame

patreon


Week 21 progress update

This week I worked on improving the terrain in the demo. I replaced the green box placeholder with a procedurally generated terrain. The way this is handled in the shader is pretty inefficient and there are issues with antialiasing and more. Well, I did some work and now, as a result, I have even more work to do.

I also worked on some other improvements to the demo and engine. (1) When revealing the interior of the hill, I now draw a zig-zag line to hint that we are cutting through the ground. (2) I made the train’s headlights turn on/off gradually, rather than sharply. (3) I added light occlusion for the train’s headlights when entering the tunnel. I had to add dedicated code in the shader, as my game is 2D. I cannot easily implement the techniques used for 3D games, i.e. re-render the scene from the lights' perspective to see how deep the light goes. The final result was decent. See the video.

I also wrote a blog post about texture premultiplication. I found that other posts were not particularly clear about the fact that premultiplication should be done for any kind of texture where the alpha channel represents presence/absence of a physical quantity. It is not just for diffuse textures.

Week 21 progress update Week 21 progress update Week 21 progress update

Related Creators