Day 7. Post processing. Audio effects. Build and Run. Enemy Lasers.

Dmitry Gordeev
2 min readNov 21, 2020

--

So, if you feel like your game will succeed more with some glam, here are post-processing tools for you in Unity. With the “Bloom” effect you able to increase intensity for the whole scene. “Color grading” you can play with temperature and tint. It is like Photoshop for 3D scenes.

Background music was an easy part. The hard part was explosion sounds that should play after a laser hit an enemy. Because the enemy object becomes destroyed faster the music clip length, you hear no sound. A good programmer can delay object destructor by simply passing length as a parameter _audioSource.Play(); Destroy(this.gameObject, 2.4f);

Best programmers using a special method called “PlayClipAtPoint”, so you do not have to worry about object destruction before the music stops. “This function creates an audio source but automatically disposes of it once the clip has finished playing.” -https://docs.unity3d.com/ScriptReference/AudioSource.PlayClipAtPoint.html very handy.

I also learn how to build executables in Unity. Compiled one for mac and another for WebGL. Looking for hosting to publish the last one. The game plays very smoothly after you run a build. Looks like it is ready to be shipped to an end-user.

Last but not least, I worked on extras. Fixed a bug that let a damaging player twice if hit by one enemy. Added laser for enemies, yes they learned how to shoot. The last thing was programming quitting the game by hitting the Escape key. My last line in bash git add . && git commit -m "safe and sound" && git push“, and we are all set.

That is all for today. See you next time!

--

--

Dmitry Gordeev
Dmitry Gordeev

No responses yet