This week I thought I’d turn my attention to adding a bit more detail into the environment. Starting with chairs, stairs and floor signage. The first strange thing that occurred however was the dialogue system failing for apparently no reason.
I discovered the bug whilst I was adding a few more dialogue sequences. The first part when the player starts the game, the first dialogue with the unknown voice and a third piece outside the door to kick things off. My routine from a few weeks ago decided that it would move the camera to a new object but then get stuck. It turns out that the routine wasn’t ending exactly where it should, due to number rounding, and that was getting the camera stuck. So, I had to write a quick function that compares to numbers and checks to see if they are within a certain threshold. Very quick, very easy:
After that was added in everything was working properly again.
Now, the first set of stairs the player will come to will be blocked. Someone has decided to throw a load of chairs and a cell bed down the stairwell. This gave me the opportunity to look at doing some stairs tiles and a little fake depth by using some carefully placed gradient boxes. Add in a short dialogue from the player and the job is good to go. Although I will be adding a few other items to the stairwell clutter.
With the game being drawn top-down signage on walls becomes impossible – because you can’t look at them. So, I decided that for the floor indicators I would apply the sign directly to the floor. This makes it easy and obvious to the player which floor of the building there in – in case they need to know – wink wink.
One last aspect I wanted to tweak was the thickness of the walls. The previous walls were fine for exterior walls but I felt they were a bit too wide for interior ones. So, I put together a new set of wall tiles and replaced the first half of the floor with the new ones. I think it looks better (feel free to comment on my Facebook page).