What did I do for the past 2 days?

So over the past few days I did many things surrounding my current project, Night and Day. I worked on things like the game’s audio and scripting the transition between day and night. To begin this work, thought I’d get elbow deep into scripting the lighting changes. To begin this, I needed to start by adding triggers to my level for when and where the light should change. I added 5 triggers in total, creating 6 separate spaces, 5 of which will have light changes and the sixth just simply turning off the final particle emitter, each trigger was tagged respectively. After I did this I went on to create the script for the triggers,  so that I could have checks for when the player left the sections. I then had to decide which sections would have what lighting, e.g. Day and Night. I decided to have the game begin on Day, and alternate between Day and Night until the final sunrise/sunset. Finally, after the prep was done, I began deciding how I’d let the light change with both the directional lights and the skyboxes. At first I wanted to see if the concept would work, so I just simply had one directional light turn off and another turn on, while also changing the skybox. This did work, but was really jittery because it was an instant change, so I eventually came back to this and made the light levels smoothly change between each other. I was not able, however, to change the way the skybox changed, but due to the way the level commonly fills the majority of the players view when the skybox changes. Next up was to have the trigger deactivate the particle emitter. To do this I realised I could not just set its active to false, but I had to turn off the particle emission first then drop the intensity of the light i added to make the particles appear to glow, and then I could turn off the particle. Here’s what my code looked like after doing this:


Fading stuff (requires update rather than collision)


Sudden changes

So with the day and night transitioning nicely… enough. I decided I would sit and determine what sound would go where and what they would… sound like? I already had a good idea of what I wanted, footsteps and things, ambient bird sounds for both day and night, and music to accompany it all and tie it all together.

Here is a list of sounds that I found and then cut down and edited to fit my needs:

And here are the two music tracks that I just couldn’t pick between, so I used both and had the game randomly choose one:



I feel that the music excellently portrays the emotion of the space the player is walking in. It’s a somber and steady sound that encourages the calm slow footsteps that the player takes. The ambient sounds are very fitting and when I was implementing them I repeatedly forgot that the sounds were in fact coming from the game rather than outside my window. I feel the footsteps also help the player feel connected to the garden, rather than walking on stone or concrete like the standard sounds, having the gravel footsteps really helps.

The final audio thing I added was a sound for when the time changes, I’m not particularly happy with what I chose and I feel there could be better ones out there. I wanted a sort of cymbal shimmer sound, but I could only find the fade sound in the playlist above. It works well enough and does make the time transition feel a little better than it initially felt.

Here’s how it turned out:

There was a few more things I did yesterday to do with solving some lighting issues that took much too long, but that’s all for an other day.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s