Asylum Dev Diary 90 – Trinkets

This week was more of a bug fix session than I’d expected but I did add in one new feature that has been needed since I added collectibles to the game. Previously you’d find a collectible, read the text (maybe) and then close the window, at this point there would be no way to view them again.

So, on the pause screen there is a new page called Trinkets and in here there will be a list of all the collectibles you’ve discovered so you can browse them again. It will also help indicate if you’ve missed any as they are in numbered series.

This is still a work in progress and I don’t know as yet how mant trinkets there will be, so expect the final display to look different.

Asylum trinkets display screen

To test out the trinkets sceen I had to reset my dev game progress and start from the beginning collecting the trinkets as I went along. This revealed a few bugs that needed to be corrected.

The age old bug that resulted in a completely black screen after returning from a flashback appeared again. I spent a good few hours trying to find the cause. After a lot of debugging I discovered that the noise shader was responsible. When it’s strength was set to exactly 0 it is supposed to turn off (as the shader isn’t needed), the problem was there was a very important draw_surface command that was also being turned off and that was the cause of the black screen. I’m very happy to have found the problem after so long.

INI files are used for all the text strings in the game, and they were configured to allow multiple languages (if I decided to translate the game), however after reading throught the GMS2 manual on INI files I discovered they are restricted to a maximum file size of 64Kb. Now I’m a long way off meeting that for any of the string files but I can see that I would hit it if the game was in a few languages. So, I had to rework the string files so that they are split into the different languages: UIStrings_english.ini, etc.

There were also a few minor bug fixes:

The quick message display would sometimes cause other objects to become invisible! Strange but true. This was caused by the draw_set_alpha command. If you don’t reset it to a value of 1 (100%) it will pass the alpha value on to any other object that has a configured draw event.

The ability to talk to some of the NPCs in the flashback stopped working.

The pause screen would flash an unprocessed screen very briefly when navigating between trinkets, options and objectives displays.