The Path of the Game Dev — Day 4
Saving progress…
— —
The most exciting thing that happened today was that I’ve got most of a 2D space shooter! From animations to the main menu to game over screens, this little game is on its way to release. Granted, there are still a handful of issues I need to fix. It’s not like every game comes out perfect the first time!
Despite this excitement, there were many drawbacks today. I had trouble implementing the audio clips the tutorial provided because I didn’t understand how the Audio Source component compared to attaching the audio clips to the script by providing a game object for it. If I’m understanding it correctly, the audio clip can play at a specific point in the game world and can linger on an empty object. An Audio Source must be attached to an object and so cannot continue playing after the object has been destroyed — thus why the tutorial had us put the explosion sounds on the explosion animation itself instead of the enemy spaceship (which was destroyed and replaced with the explosion).
In the end the bulk of the work went into when I wanted that audio clip to play, how often, whether the object it was attached to was destroyed before playing the audio clip, etc. Essentially it was a whole other level of taking a look at the bigger picture even while focused on a small line of code.
Biggest takeaways from the day: Sometimes closing and reopening the program helps, sometimes it doesn’t. Looking up errors in Unity forums is invaluable in understanding how other people solve the same problem but don’t rely solely on them. You’d be surprised how much you can fix with just a little bit of guidance.
— —
Progress saved!