Continuing from last week I’ve been working on the UI elements. With the objectives display being moved from the game view to the objectives screen there was no longer a visual cue for when an objective had been completed. So, I’ve added in an additional notification so the player knows which task has been finished.
When certain elements of the UI are displayed I have to use a look up .ini file that contains all the translation strings (in case I want to add other languages later), my concern was the amount of times I would need to access a file. To avoid the potential performance hit of reading from the HDD I decided to add in a basic buffer. When a string is first loaded it is added to a ds_map that stores information in an associated array (key -> value), when the string is needed again the function will first check the ds_map to see if it’s already in memory. If it is then we’re good to go; otherwise it will load it from the ini file and store that for later.
Finally, the most complicated item on this weeks list, although it sounds very simple, was to blur the screen when the objectives/system screen is displayed. Yes, it all sounds easy enough but because I’m doing this by grabbing a screenshot for the still makes it a little more involved. I wasn’t certain that I’d be able to run a shader on the single frame before grabbing the screenshot. Fortunately, it worked and the result looks great.
You should just about be able to make out the effect from the screen below. Please bear in mind that the layout is all a work in progress.