Making the Game: Adding Style, Part 2
As promised in my last post, this post will go over how I added sounds and some other cool "effects" and stuff into the game. Let's start with audio, shall we?
Implementing audio isn't the hard part, at least not for me personally. Finding the right sounds is. Fortunately, I have a large library of downloaded sounds at my disposal, most of them from the numerous free #GameAudioGDC Bundles.
Sequences in Unreal Engine are used to create in-game cutscenes. For Robotrooper: Simulation, I didn't really need them for that. However, they can also be used to create a fade-in or fade-out effect. Now that's something I was interested in. I ended up using them this way in two instances:
To trigger the Sequence, I use the Create Level Sequence Player node to create a player first, followed by a Play node which actually triggers this player.
And that's it. That's all there is to sequences... one final thing before you go:
Changing materials can be an effective way to give the player feedback about the world. I've done this for Cube Keys and Cube Slot Buttons in the first Adding Style post. I've since extended this to:
Audio
Throughout its development, Robotrooper: Simulation was completely silent. This isn't good, as games usually can't rely on their visuals alone. Simulation is no exception.
Implementing audio isn't the hard part, at least not for me personally. Finding the right sounds is. Fortunately, I have a large library of downloaded sounds at my disposal, most of them from the numerous free #GameAudioGDC Bundles.
The audio that I ended up using are:
- 17 REVERSE EFFECT from Free Sampler by Bingoshakerz (Free license)
- BASS - C - Sick Neuro Shred from Orgasmic Glitch Hop FREE by Black Octopus Sound (Free license)
- 05 Melody Loop Cmin 140Bpm from Future Chill 10 Free Sounds by Production Master (Free license)
- SpaceShip Engine Large Loop 00 from Sci-Fi Sound Effects Library by LittleRobotSoundFactory
- PM SFM UTILITY MISC 17 from PM SciFi Mechanics 1.7 MINI by PMSFX (EULA)
- Modular UI - Calculations and Text-011 from Modular UI by Soundmorph (Free license)
- Whoosh,Sound Design,Power Down,Groan,Choppy,Very High from Eclectic Whooshes by Airborne Sound (Free license)
- BR Glitched Loop 43 from #GDCAudioBundle (Free license)
- Sounds that come with Starter Content and/or the engine itself. (Free license)
Can you guess which sounds I used for what actions/events in the game? Well, I guess not, since it's not out yet! Anyway...
Implementation
To add sound in, I used the Spawn Sound family of nodes. These are:
- Spawn Sound Attached - I use this when I want the sound to be spatial and coming from a specific object, i.e. the turret firing a projectile from its muzzle.
- Spawn Sound at Location - I only use this once in the game I believe. I'm not going to reveal where though as that's a surprise! ;)
- Spawn Sound 2D - Perfect for UI sounds, so naturally I use this for messages sent to Robotrooper as well as the Environment Scanner. It's also used for music (yes, there's music, because why not?).
Then I went around my blueprints to put these nodes in key places where I wanted sounds to play. That's pretty much it!
The only tricky sound to implement was the Shockwave Gun charging, as I wanted the sound to change over time. Luckily there are nodes for that! I created an event called "Update Charging Sound" in the FirstPersonCharacter Blueprint where, if the sound is currently playing, its volume and pitch are scaled by the current value of the gun's "Charge" variable. This is done using the Set Pitch Multiplier and Set Volume Multiplier nodes. The event is run every tick, of course.
Anyway, audio - done. How about sequences, then?
Sequences
Sequences in Unreal Engine are used to create in-game cutscenes. For Robotrooper: Simulation, I didn't really need them for that. However, they can also be used to create a fade-in or fade-out effect. Now that's something I was interested in. I ended up using them this way in two instances:
- Robotrooper taking damage
- The initial fade in from the splash screen
I created a new folder in the Content Browser for the sequences I was about to create. Then I found the "Add Level Sequence" option in the top menu and... created a new level sequence.
There I added a Fade track, allowing me to fade the screen in or out of a colour. I adjusted the FPS to 60 and set up a keyframe at 0. Then I adjusted the length based on my needs. Changing the colour of the Fade is possible by right-clicking on the track and looking into the Properties tab.
And that's it. That's all there is to sequences... one final thing before you go:
Materials
Changing materials can be an effective way to give the player feedback about the world. I've done this for Cube Keys and Cube Slot Buttons in the first Adding Style post. I've since extended this to:
- The turrets "flashing" white when they are hit. When they shoot projectiles, their muzzle flashes orange as well (pictured above).
- Cube Keys "flashing" red when they come in contact with a Hazard Floor.
Implementation
Achieving this effect was simple - all necessary materials were changed using Set Material nodes. After a short Delay, the materials were changed back to their originals.
The "flashing" materials are instances of my GlowingLight material that I originally made for the lights in the game.
In Other News
- I added a new InputAction for the "Tab" key. Just like in Survival, pressing and holding down Tab will show the player the Controls.
- Another feature I added is "Show Last Message". Whenever the player presses the "M" key, the last shown message will be displayed on the screen again. This is useful in case the user missed the message or needs to see it again.
And that's it. The game is finished, polished and ready to... have its lighting built. In my next game post, I will talk about doing just that.












Comments
Post a Comment