Asylum – Dev Diary 27-29
After a false start over the weekend thanks to an external drive failure and a few other jobs that needed doing bank holiday Monday has been very successful. So let’s get down to it:
The all important lighting. It’s probably one of those things that I will be revisiting over and over until I’m happy with the results. One aspect I wanted to look into was allowing certain objects to also cast shadows, such as tables and chairs. The problem I had was that the lighting engine was only coded to handle one density of shadows and for my game that meant pitch black – and this works extremely well for the walls; but for minor objects that you should be able to see over it was impossible to use. So, I had a look through the code that draws up the lights and discovered a way to alter the shadow strength per object. So, a quick variable was added to the lighting engine (aura_shadow_density) and then all I would need to do is to apply this variable to my shadow objects. Hey presto I can now have lighter shadows for objects and pitch black shadows for walls. As an added bonus this also allows me to have windows that don’t let all the light through which looks really nice. One other change I’ve made because of this new shadow effect is to set the doors to cast lighter shadows, this gives me a kind of light bleed effect which slightly illuminates the area behind the door. Sadly there is one bug that I’ve contacted the lighting developer about. It seems that if my new shadow object is rotated and scaled it doesn’t get rendered at the correct position. Hopefully they’ll be able to offer an insight into the problem.
The lighting in the corridors have all been replaced by a new rectangular light which I hope emulates a more realistic bounced occlusion light, it also improves the illumination for the player in the early areas of the game where he doesn’t have a torch.
As well as improving the lighting where doors are concerned I’ve also tweaked the code so that they can update an lights around them that might need their shadows altered as they open and close.
Finally interior windows have made an appearance. With the new soft shadows this is a really nice new visual feature. It means that rooms that are locked could potentially tease the player of their contents – how do I get that key on the table in there?
The torch has had a few improvements, and now it will automatically switch on when the player enters an area that previously notified him that it was too dark to enter without. I’ve also improved a flickering torch beam effect but I can’t go into that here (spoilers).
Another few rooms have been decorated. not many left now 🙂
During the course of testing the improvements I discovered a number of issues with the save game routines that could potentially trap the player if they quit and reloaded; doors being opened in the wrong direction, doors that should be closed are in fact open, little things like that. Hopefully those have been resolved but play testing later on will tell me one way or the other.
And finally; a number of additional objects that can be examined have been added to the start area of the game that help further set the scene, and there’s been a few new dialogue pieces added as well.
Phew, that’s a lot of stuff.
In the shot above you can see the light shining through the door slightly.
And here you should be able to see the improvements the rectangular lighting has made to the illumination of the first corridor.