.O.
..O Deniz's personal pages
OOO
/home /about

Kogmind Devlog #4

June 15, 2020

I was using a fixed seed during the development up until now for the RNG but I thought it would be a good time to start seeing how different seeds affect level generation and weapon rolls. So I started randomizing the seed for the RNG but I also log the selected seed in case I need to reproduce something.

Yesterday I wrote about the ranged targeting line running through walls. It was replacing the wall tiles completely and looked a bit weird so I decided to use the overlay rendering layer to render the targeting line. I also changed the background to green with some transparency so that the wall tiles can be seen. This makes for a better visual.

With the panning implementation the viewport updates needed to be changed and this has caused some new issues that I discovered today. When the player was alternating directions per turn (left, right, left, right,..) the viewport would update before the level rendered and produced a perception of sluggish rendering. I moved the viewport update to happen after the level rendered in the scheduler tick.

Another annoying bug I introduced by trying to be clever and not rendering cells that are not in FoW caused some quirks. Pay attention to the corridor on the middle left (the last one before the void). As the player moves down it looks like it’s replicating itself to become a thick wall.

 if skipFow {

     target[y][x].illumination = illumination

 } else {

     if game.level.fog[y + viewPort.y][x + viewPort.x]  {

         target[y][x].illumination = illumination

     } else {

         //return //this is wrong and causes tiles to hang around

         target[y][x].illumination = 0 //this is correct

     }

 }

It took quite a while until I understood what was causing the issue as I was thinking that some how a viewport update was getting out of sync with a render call.

Tags: #gamedev