Unity 2D Platformer for Complete Beginners - #11 AUDIO

  Рет қаралды 44,802

Pandemonium

Pandemonium

Күн бұрын

In episode 11 I'll show you how to easily add sounds and music to our platformer game. We'll also talk about audio listeners, audio sources and audio clips and how they work in Unity.
➤ All audio files used in the video: www.mediafire.com/file/wszdta...
➤ Music by: patrickdearteaga.com/
➤ More websites with free music and SFX:
freesound.org/
opengameart.org/
www.zapsplat.com/
itch.io/
assetstore.unity.com/audio?ca...
➤ Starting Project: github.com/nickbota/Unity-Pla...
➤ Complete Project: github.com/nickbota/Unity-Pla...
Consider supporting the channel on Patreon:
➤ Patreon: / pandemonium_games
➤ Discord : / discord
➤ Itch: nickbota.itch.io/​
➤ Instagram: / pandemonium_games
➤ Twitter: / pandemoniumnick​
#pandemonium​ #unity2dplatformer​ #unitybeginner​
Tags: unity 2d platformer for complete beginners,platformer for complete beginners,unity 2d platformer episode 11,Unity 2D Platformer for Complete Beginners - #11 HOW TO ADD SOUNDS AND MUSIC,unity how to add sounds and music,unity sounds and music,unity how to add sounds,unity sound effects,unity audio listener,unity audio clip,unity how to add audio,unity audio,unity sound manager,unity 2d audio,unity2d audio,unity 2d sounds,unity 2d sountrack,unity 2d,unity2d,c#
0:00​ Intro
0:11 Audio Listener
1:00 Audio Source
2:50 2D vs 3D Sounds
3:48 Audio Clips
4:00 Creating a Sound Manager
5:46 Fireball SFX
7:10 Melee Attack SFX
7:55 Hurt and Death SFX
9:59 Jump SFX
11:40 Trap Sound Effects
13:55 Health Collectible SFX
14:35 Background Music
19:19 Outro & Free Sound Resources

Пікірлер: 118
@PandemoniumGameDev
@PandemoniumGameDev 2 жыл бұрын
For everyone who's looking to make their own music and sound effects check out these free tools 👇 Music: boscaceoil.net/ SFX: labbed.net/software/labchirp/
@abhisavale5231
@abhisavale5231 2 жыл бұрын
you are the big part of my gameDev journey thank you so much for making these amazing videos
@LittleGilmour
@LittleGilmour 2 жыл бұрын
Goddamn. I don't even know how to thank you for your amazing work. I think you found the perfect pace-depth ratio: deep enough to understand the code and learn along the way, and quick enough not to bore our every-day-shorter attention span brains. Thank you for the obvious effort you put into this series, I hope you keep making more of these and you get the recognition you deserve. Congratulations!
@SSMLivingPictures
@SSMLivingPictures 2 жыл бұрын
Ive been trying to complete a simple Unity game on and off for years, I pick it up, try to remember what Ive learned and make a little progress. Ive watched a ton of tutorials and I can genuinely say yours is my favorite. You really nailed many concepts home for me and solidified my understanding
@snowsetdeer6192
@snowsetdeer6192 Жыл бұрын
Never been as excited about coding as I am when following your videos, very excited for the eventual level loading video too Fantastic work!
@minecraft555able
@minecraft555able 2 жыл бұрын
Im loving these tutorials!! Thank you so much, please don't stop making these videos, Im sure that a lot of people are looking videos like this. Greetings from Colombia!
@AliDouiyek
@AliDouiyek 2 жыл бұрын
Damn you type fast ! Thank you so much for the whole series, it's awesome.
@xandru7449
@xandru7449 2 жыл бұрын
Thank you so much! Can't wait for the 12th part!
@hamzahhassan7520
@hamzahhassan7520 2 жыл бұрын
This is the greatest channel. You can become the next Brackeys Easily. Keep it up.
@cleangaminganalysis8651
@cleangaminganalysis8651 2 жыл бұрын
Nice work man, im on #5 but thank you for the continue of the series
@PandemoniumGameDev
@PandemoniumGameDev 2 жыл бұрын
My pleasure, good luck with it
@milanagrozic670
@milanagrozic670 2 жыл бұрын
I've watched this whole series and I just wanted to let you know that it is amazing. Thank you so much and keep making these videos because they are the best tutorials i've ever found!
@PandemoniumGameDev
@PandemoniumGameDev 2 жыл бұрын
Thanks a ton! It's always heartwarming to read these kind of comments. I'll continue making tutorials for sure, stay tuned!
@alexcrush99
@alexcrush99 2 жыл бұрын
Thanks for the video man, i'm learning a lot thanks to you!
@ajispratama6945
@ajispratama6945 Жыл бұрын
Thank You so much for making these video tutorial. you are awesome
@danieltai6494
@danieltai6494 21 күн бұрын
If your audio is restarting when moving from scene 1 to 2, make sure you put the soundmanager right under the scene (Level1) under the hierarchy then it should work. All my code was working just had to do this.
@playanoapps
@playanoapps Жыл бұрын
Amazing Tutorial.Thx a lot!
@StigDesign
@StigDesign 2 жыл бұрын
I hope you make more Videos on the Selection system :D maby like add customisation and how to start the scene with all the settings applied :D
@Harpic1
@Harpic1 2 жыл бұрын
Awesome stuff keep it up! These tutorials have been helping me a lot, to top it off maybe add a main menu? Thanks!
@PandemoniumGameDev
@PandemoniumGameDev 2 жыл бұрын
Yep, we'll add that in the next videos.
@Feendor
@Feendor 2 жыл бұрын
When will the next video be out? I love your tutorials and they have helped me a lot in learning unity and C#
@faizhenri759
@faizhenri759 2 жыл бұрын
actually im an project my first game and my preferences from your videos , so thanks
@PandemoniumGameDev
@PandemoniumGameDev 2 жыл бұрын
Good luck with your first game!
@chapstic593
@chapstic593 2 жыл бұрын
I wanted to say you have been an invaluable tool in learning unity and c# in general.
@simaugaming6909
@simaugaming6909 2 жыл бұрын
First of all thank you for this series of videos. I am really enjoying it. Will you upload more videos for example building a level, making a menu, respawning when the player dies or a new level? If so, can you already say a little more precisely what kind of videos will come and when? Thank you very much :)
@PandemoniumGameDev
@PandemoniumGameDev 2 жыл бұрын
Yes, these will definitely come in the next weeks. I'll probably release 1 episode every 1-2 weeks and we got like 4-5 left to finish the game.
@nimishbansal4752
@nimishbansal4752 2 жыл бұрын
@@PandemoniumGameDev When will the next episode come bro??Its been two weeks!!!
@simaugaming6909
@simaugaming6909 2 жыл бұрын
@@nimishbansal4752 i am waiting too, but chill bro and be thankful for his videos.
@PandemoniumGameDev
@PandemoniumGameDev 2 жыл бұрын
@@nimishbansal4752 Probably at the end of this week.
@fleshandblood5392
@fleshandblood5392 2 жыл бұрын
@@nimishbansal4752 I am also anxious, but we must be patient. Our bro here is doing something great for us and we must understand that takes some time.
@ushas3349
@ushas3349 4 ай бұрын
Thank you once again for the wonderful video. The sound when played by going to the audio clip and when running in unity differs very much. Dont know why? Any suggestion?
@PianoGreenGaming
@PianoGreenGaming 2 жыл бұрын
I know these video take ages to make, but is there going to be a new one soon, it's been 3 months and the other episodes were in increments of about 1 month.
@christinedelire3974
@christinedelire3974 2 жыл бұрын
Thank's for this tutorial ! I just have 1 question : how do I teleport the player to the beginning of a room when the player dies ?
@hstibbon4753
@hstibbon4753 2 жыл бұрын
Could You Do one on multiple Levels and a Title Screen/Level Select
@aarnekukkonen41
@aarnekukkonen41 Жыл бұрын
Is it possible to adjust volume of individual audio files with this method? For example if i have too loud sound effect for a hurt animation?
@IntraFPS
@IntraFPS 2 жыл бұрын
when will the next episode be thanks for the work on this series?
@PandemoniumGameDev
@PandemoniumGameDev 2 жыл бұрын
Working on it, it's almost done.
@rohandeshpande7097
@rohandeshpande7097 Жыл бұрын
Hey! How do I add a randomizer so for playoneshot as it will sound monotonous to play the same clip over and over again?
@moakey_7106
@moakey_7106 2 жыл бұрын
question can you make a start menu options controls tutrotal
@ow5622
@ow5622 2 жыл бұрын
Thank you very much for this tutorial series! You're an awesome teacher. And the game is just a perfect idea and execution! BTW, is this the last episode?
@PandemoniumGameDev
@PandemoniumGameDev 2 жыл бұрын
Thanks a lot! Nope, 12 is coming this week.
@PianoGreenGaming
@PianoGreenGaming 2 жыл бұрын
@@PandemoniumGameDev Yey
@jothelol6496
@jothelol6496 2 жыл бұрын
I copied the code accordingly in the video but somehow when i go back into unity the sound layer wont appear and i can't add the sfx in but there's no error with the code (copy pasted the code for player movement from ur github it can finally add sfx but it takes away my run animation
@Gokun1102
@Gokun1102 2 жыл бұрын
i hope u make a menu and pause game to finish tutorial
@MrMikhaelJackson
@MrMikhaelJackson Жыл бұрын
After copying the code the wall jumping didn't work can you pls help also this is the best 2d game series ive seen.
@jackpelon9852
@jackpelon9852 Жыл бұрын
Hello friend @Pandemonium , thank you for your very good teachings, your tutorials... I was trying to put sound when my character walks but I was unsuccessful, could you make a video tutorial explaining how to put sound of walking or running to the character please. See you and I send you a cordial greeting friend... and I wish you a great day...♥♥
@henryw.3331
@henryw.3331 2 жыл бұрын
HI! Sorry if you have already heard me say this on your website, but just wondering: Can I use your code in a commercial game?
@PandemoniumGameDev
@PandemoniumGameDev 2 жыл бұрын
Yeah, completely fine. Make sure to show me the game after you finish it :D
@henryw.3331
@henryw.3331 2 жыл бұрын
@@PandemoniumGameDev thank you so much!
@simaugaming6909
@simaugaming6909 2 жыл бұрын
Hello @Pandemonium. I have a problem with the ArrowTrap. My ArrowTrap starts shooting Arrows before I enter the room where the ArrowTrap is. Because of that, the sound of the ArrowTrap plays instance when I start the game. Do you have a solution for that problem? The ArrowTrap should only shoot arrows when I enter the room, right? Thank you :)
@PandemoniumGameDev
@PandemoniumGameDev 2 жыл бұрын
In this case you should make sure you got the Room script right. It should deactivate any enemies/trap that are not in your current room, which sounds like the issue here.
@simaugaming6909
@simaugaming6909 2 жыл бұрын
@@PandemoniumGameDev I checked your Room Script with my Room Script and its identical. I dont know anymore what i can do. What is the previous room of my room 1? I have to assign this in unity from the script door What is the next room of my last room? I have to assign this in unity from the script door The ArrowTrap has 3 Elements: Sprite, Firepoint and ArrowHolder(with the Arrows) What layers do these components have? I have them on default. Is that right? Only the Arrows have the Layer Enemy
@jeffhodgson2582
@jeffhodgson2582 2 жыл бұрын
I am not sure where i messed up, but it could've been on the past video too. but my players idle, walk, die and attack animations are not working, same with my melee and ranged die animations when i play the game. Any suggestions on how to fix this??
@simaugaming6909
@simaugaming6909 2 жыл бұрын
The problem here is "Has Exit Time". Change the values and then deactivate "Has Exit Time"
@PandemoniumGameDev
@PandemoniumGameDev 2 жыл бұрын
First check if all the trigger names match, then check the settings and the Has Exit Time option as Eins suggested.
@pavell.7439
@pavell.7439 2 жыл бұрын
Please continue the 12th video. Thanks
@raihanahnabilahtsany6368
@raihanahnabilahtsany6368 2 жыл бұрын
I'm sorry that i asked in this episode, I want to ask about the shoting, my fireball doesn't have explode when it hits an object, my collider is already triggered, can you provide any solution? Thank you
@PandemoniumGameDev
@PandemoniumGameDev 2 жыл бұрын
Hey there, DM me on discord.
@raihanahnabilahtsany6368
@raihanahnabilahtsany6368 2 жыл бұрын
@@PandemoniumGameDev Thanks, I have DM you
@simaugaming6909
@simaugaming6909 2 жыл бұрын
Hello @Pandemonium. I have the following problem: my spikehead follows me across all rooms. I would like the Spikehead to only track me in the room in which it is at the beginning. Can you help me? Thank You :)
@PandemoniumGameDev
@PandemoniumGameDev 2 жыл бұрын
Did you add the code that disables the traps once you exit the room? And did you add the spikehead to the array or enemies in the room object?
@simaugaming6909
@simaugaming6909 2 жыл бұрын
@@PandemoniumGameDev thanks it worked
@narsower
@narsower 2 жыл бұрын
please can you show how to make a joystick for this game
@muhammadazizhassan8960
@muhammadazizhassan8960 2 жыл бұрын
Please answer, the audio which you provided are free to use ?
@simaugaming6909
@simaugaming6909 2 жыл бұрын
yes
@PandemoniumGameDev
@PandemoniumGameDev 2 жыл бұрын
Yes, the sound effects are free to use with no attribution. The soundtrack requires that you credit the author and link his website
@muhammadazizhassan8960
@muhammadazizhassan8960 2 жыл бұрын
Thank you, bro, you are doing great work. I was really inspired by you. God bless you. Heartly thanks to you bro.
@vkcreations7907
@vkcreations7907 2 жыл бұрын
Hi bro, I have a error in Unity, In Playet Attack script, It shows " error CS0122: 'Projectile.SetDirection(float)' is inaccessible due to its protection level" Please help me to fix this error. And also in Unity, In Player attack script ,the Fire Point option not showing.
@draccuzer
@draccuzer Жыл бұрын
In the SoundManager.cs script, Change "private void PlaySound(AudioClip _sound)" To "public void PlaySound(AudioClip _sound)" Sorry for the late
@hyperk1035
@hyperk1035 Жыл бұрын
I am just trying to drag the audio files in and its not putting it in. Does anyone have a solution
@HiHoeMan69
@HiHoeMan69 2 жыл бұрын
Thank you for the continual great videos! They have been helping a lot! I am having an issue where if I add the don't destroy on load logic, my background music never begins to play, any ideas? using UnityEngine; public class SoundManager : MonoBehaviour { public static SoundManager instance { get; private set; } private AudioSource source; private void Awake() { source = GetComponent(); //Keep alive between levels if (instance == null) { instance = this; DontDestroyOnLoad(gameObject); } //Destroy duplicate else if (instance != null && instance != this) Destroy(gameObject); } public void PlaySound(AudioClip _sound) { source.PlayOneShot(_sound); } }
@PandemoniumGameDev
@PandemoniumGameDev 2 жыл бұрын
Did you check the Play On Awake option on the MusicSource? Also make sure that the MusicSource object is a child of the SoundManager object.
@HiHoeMan69
@HiHoeMan69 2 жыл бұрын
@@PandemoniumGameDev Yeah they are both set like yours, if I comment out some of the logic the bm plays but then destroys on level change (which is to be expected). Can't figure out why it will not play at the beginning with the logic to destroy. using UnityEngine; public class SoundManager : MonoBehaviour { public static SoundManager instance { get; private set; } private AudioSource source; private void Awake() { source = GetComponent(); instance = this; //Keep this object even when we go to new scene //if (instance == null) //{ // instance = this; // DontDestroyOnLoad(gameObject); //} ////Destroy duplicate gameobjects //else if (instance != null && instance != this) // Destroy(gameObject); } public void PlaySound(AudioClip _sound) { source.PlayOneShot(_sound); } }
@HiHoeMan69
@HiHoeMan69 2 жыл бұрын
@@PandemoniumGameDev Figured it out, I had the soundmanager script set on both the SoundManager and MusicSource objects. I removed the script from the MusicSource and it is now working as intended! Thank you for the reply :)
@PandemoniumGameDev
@PandemoniumGameDev 2 жыл бұрын
@@HiHoeMan69 Good that you found the issue, happy to help.
@hamzahhassan7520
@hamzahhassan7520 2 жыл бұрын
When is the Next Video coming?
@qlzzcl
@qlzzcl 2 жыл бұрын
make a level and xp system please :D
@Feendor
@Feendor 2 жыл бұрын
how can i add more levels?
@khangvohoang9948
@khangvohoang9948 Жыл бұрын
First thank you for this tutorial But I have a problem when I long press on space the jump sound just activated 1 time them off so how can i fix it ? can you show me, thanks
@PandemoniumGameDev
@PandemoniumGameDev Жыл бұрын
I'm not exactly sure about this, but I think this is going to be fixed in the next episode since we change the jumping from Input.GetKey to Input.GetKeyDown. Try it out and let me know if it works.
@the1sanash
@the1sanash 2 жыл бұрын
soon i think you should make the main menu
@PandemoniumGameDev
@PandemoniumGameDev 2 жыл бұрын
Yep, that's coming
@PROVIDE45143
@PROVIDE45143 2 жыл бұрын
Hello @Pandemonium Games can you do an elevator tutorial for the Player please it would be nice. And we need an trigger that does an Jumscare for my horror game please thak you.
@PandemoniumGameDev
@PandemoniumGameDev 2 жыл бұрын
Elevator is doable but the trigger for the jumpscare is not really suited for this game. As a suggestion for your game just put a trigger collider that does a certain action, like makes the enemy appear rapidly.
@gudumfredom048
@gudumfredom048 Жыл бұрын
NullReferenceException: Object reference not set to an instance of an object hi does anyone else get this problem? i dont know why at first it was all working find until all of a sudden the audio just doesnt play anymore
@kingpikachuyt3630
@kingpikachuyt3630 Жыл бұрын
i also have this problem when trying to make the player shoot fireballs and play the sound so when ever i click to shoot nothing happens and i get this error
@jamieparkin7054
@jamieparkin7054 Жыл бұрын
@@kingpikachuyt3630 im having the same problem did you manage to fix it?
@kingpikachuyt3630
@kingpikachuyt3630 Жыл бұрын
@@jamieparkin7054 think so can't remember
@jamieparkin7054
@jamieparkin7054 Жыл бұрын
i got it working now i forgot to add the sound manager script to the sound manager
@nourmheich4710
@nourmheich4710 2 жыл бұрын
bro was that the last episode , it have been more than 3 months
@PandemoniumGameDev
@PandemoniumGameDev 2 жыл бұрын
Nope, episode 12 is coming soon, check discord for updates and announcements.
@jd8906
@jd8906 2 жыл бұрын
Hey, can you show us how to make a save system.
@PandemoniumGameDev
@PandemoniumGameDev 2 жыл бұрын
I made this video a while ago: kzbin.info/www/bejne/i4uamGt7rqxpgJI&ab_channel=Pandemonium Is this what you're looking for or you want something specific for this game?
@LagGamers143
@LagGamers143 4 ай бұрын
After the enemy got died he still moves why?
@pivodaseladi557
@pivodaseladi557 2 жыл бұрын
i did player movement, i did damage and health i did respawn, i did main menu but i cant duplicate my scene can you help me?
@PandemoniumGameDev
@PandemoniumGameDev 2 жыл бұрын
Find it in the Assets folder, right click it and choose duplicate
@pivodaseladi557
@pivodaseladi557 2 жыл бұрын
@@PandemoniumGameDev i did evrything how you said and when i do right click on scene there is not duplicate option
@PandemoniumGameDev
@PandemoniumGameDev 2 жыл бұрын
@@pivodaseladi557 ​ does Ctrl+D or Cmd+D work?
@pivodaseladi557
@pivodaseladi557 2 жыл бұрын
@@PandemoniumGameDev oh thank you,its working
@johnsmiths3934
@johnsmiths3934 2 жыл бұрын
please sir how can we play it on android
@Fresmr
@Fresmr Жыл бұрын
You good man
@reactive1033
@reactive1033 2 жыл бұрын
Make a tutorial how to turn this 2d platformer into a mobile game :D
@skyherald7390
@skyherald7390 9 ай бұрын
I AM DONE! I was renaming my Scene name then this message popped up saying some things in the scene have been changed then there were two buttons Reload or Cancel I clicked reload cuz idk what it meant everything since my last save is gone now the player is not even shooting fireballs the scripts which had the audio function worked greatly before but now THEY DONT WORK I am HOPING that someone tells me how to fix this as soon as possible or I AM NEVER gonna complete this Tutorial!
@skyherald7390
@skyherald7390 9 ай бұрын
If fix is not possible then can someone send me their project if possible PLEASE I also need help like the rest of you!
@PandemoniumGameDev
@PandemoniumGameDev 9 ай бұрын
That sucks. The best option here is to grab the project from GitHub, I posted a link for each episode in the description, you can just download the project from there.
@skyherald7390
@skyherald7390 9 ай бұрын
I did go to the Github page but how do I add all the stuff in to unity hub@@PandemoniumGameDev
@skyherald7390
@skyherald7390 9 ай бұрын
Is it possible for you to send me your whole project in unity?@@PandemoniumGameDev
@PandemoniumGameDev
@PandemoniumGameDev 9 ай бұрын
@@skyherald7390 the entire project is here: github.com/nickbota/Unity-Platformer-Episode-11 The link was always in the description :)
@v.mebannangsanshabong6051
@v.mebannangsanshabong6051 2 жыл бұрын
Can you make a video about how our player can melee attack
@vkcreations7907
@vkcreations7907 2 жыл бұрын
Is this a android game or a PC games?🤔
@PandemoniumGameDev
@PandemoniumGameDev 2 жыл бұрын
We're building it as a PC game, but with Unity you can easily switch the platform.
@vkcreations7907
@vkcreations7907 2 жыл бұрын
@@PandemoniumGameDev Thanks bro✌️
@simaugaming6909
@simaugaming6909 2 жыл бұрын
Hello @Pandemonium. The ArrowTrap sound plays right at the beginning when I start the game. I would like the sound to only start when I walk into a room that has an ArrowTrap in it and the music to stop when I leave the room. Can you help me? Thank you :)
@PandemoniumGameDev
@PandemoniumGameDev 2 жыл бұрын
You probably assigned the ArrowTrap sound to your SoundManager audio source and left Play On Awake enabled. Remove the sound and disable play on awake.
@simaugaming6909
@simaugaming6909 2 жыл бұрын
@@PandemoniumGameDev I compared my code from the ArrowTrap and SoundManager scripts to your code and the code is identical. In Unity, when I click on SoundManager, play on Awake is disabled and it also has no audio clip. Do you have another solution?
@simaugaming6909
@simaugaming6909 2 жыл бұрын
@@PandemoniumGameDev I can also send you my project if you want and you have a look at it :)
@scorpiusjones5436
@scorpiusjones5436 Жыл бұрын
@@simaugaming6909 Sounds like it might be an issue of having the details plugged into the Room game object. Once that's set and it working correctly, all the traps in certain rooms only turn on when the player is in there
Unity 2D Platformer for Complete Beginners - #12 ADVANCED JUMPING
14:48
Unity 2D Platformer for Complete Beginners - #10 ENEMIES
52:05
Pandemonium
Рет қаралды 144 М.
$10,000 Every Day You Survive In The Wilderness
26:44
MrBeast
Рет қаралды 94 МЛН
Make me the happiest man on earth... 🎁🥹
00:34
A4
Рет қаралды 7 МЛН
Заметили?
00:11
Double Bubble
Рет қаралды 3,3 МЛН
How To Add Sound Effects the RIGHT Way | Unity Tutorial
15:21
Sasquatch B Studios
Рет қаралды 20 М.
Unity AUDIO MANAGER Tutorial
8:21
Rehope Games
Рет қаралды 51 М.
MAKING RUN, IDLE & JUMP 2D GAME ANIMATIONS - UNITY TUTORIAL
15:30
Blackthornprod
Рет қаралды 507 М.
A Better Way To Manage Collision in Unity (For Beginners)
6:17
Lost Relic Games
Рет қаралды 59 М.
This Godot 4 Scene Manager Does it ALL
28:50
Bacon and Games
Рет қаралды 18 М.
skibidi toilet 74
7:02
DaFuq!?Boom!
Рет қаралды 27 МЛН
ЖИЗНЬ ЮТУБЕРА СПУСТЯ 4 ГОДА!
22:39
EdisonPts
Рет қаралды 1,5 МЛН