Asylum – Dev Diary 8 : Static Light
One thing that I needed to amend with the lighting is to prevent every light from being constantly updated. A light that isn’t moving and isn’t going to be casting any additional shadows can be set as static so that the game doesn’t need to recalculate the shadow mask every frame. So, one of today’s tasks was to set all the lights to static and then ensure that the player required lights (torch and general ambient halo) are set as dynamic. Obviously in some cases like a door opening a static light has to temporarily become dynamic and then revert once the door (or other item) has finished what it’s doing. This is all sorted now and should help keep performance up.
At some point I will have to make a list of all the variables that will need to be saved so that the game can be loaded at a later time. Rather than writing my own load-save routine I decided it would be better to use one that has been tried and tested already. At the moment I’m concentrating on using Easy Save & Load, it allows for multiple save slots and has a nice level of flexibility.
I have now mapped out probably about half of the basement level. I won’t reveal too much detail as I wouldn’t want to spoiler anything. The area will include a number of environmental puzzles and potentially the first up close encounter with an enemy. I did run into a small issue where the objectives I’d mapped out could result in the player being stuck. Basically I’d got it to a state where if the player failed to collect a required item before completing an objective they wouldn’t be able to retrieve it and would therefore be stuck. After some head scratching I’ve worked out a solution.
The overall story has been broken down into an overview of the game. This will help to to understand the scope and what areas I need to build. At the moment it looks like a dozen main floors; and it’s worth pointing out that the player will be returning to some areas more than once.
The tannoy has been reworked and I’m happy with the outcome so far. Nothing much else to say about this sprite just at the moment 🙂
I think the next step is to start on 2 more of the systems I will need. The inventory and, for want of a better word, the Examine system. The Examine system is where the player can look at an object to see more information but not to pick it up and keep it. This will be useful for environmental objects such as looking at writing on a wall or examining a generator in the basement.
I’m also considering taking another look into the possibilities of normal mapping some of the game elements for added depth.