GAMEPLAY - How to make a Video Game in Unity (E06)

Поделиться
HTML-код
  • Опубликовано: 4 мар 2017
  • Alright enough messing around... Let's turn this into a game!
    ● Download the Project Files: devassets.com/assets/how-to-ma...
    ● Brackeys Forum: forum.brackeys.com/
    ❤️ Donate: www.paypal.com/donate/?hosted...
    ····················································································
    This video is part of a mini-series on making your first game in Unity.
    ····················································································
    ► Join Discord: / discord
    ♥ Subscribe: bit.ly/1kMekJV
    ● Website: brackeys.com/
    ● Facebook: / brackeys
    ● Twitter: / brackeystweet
    ········································­­·······································­·­····
    ► All content by Brackeys is 100% free. I believe that education should be available for everyone. Any support is truly appreciated so I can keep on making the content free of charge.
    ········································­­·······································­·­····
    ♪ Baby Plays Electro Games
    teknoaxe.com/cgi-bin/link_code...

Комментарии • 1,9 тыс.

  • @lathryx
    @lathryx 3 года назад +1096

    If you're are watching this in 2020, the fog setting can be found under Environment, rather than Scene. I hope I can save others the time that I lost trying to figure this out lol.

  • @bazzel1059
    @bazzel1059 4 года назад +654

    I just beat my own game... And it was more frustrating than Dark Souls

    • @karkoyeet8062
      @karkoyeet8062 3 года назад +6

      lmao

    • @PinPinkaka
      @PinPinkaka 3 года назад +9

      Can relate tho

    • @namelessyakult.
      @namelessyakult. 3 года назад +9

      Same Goes With Me . Tho gg on completing your game👏

    • @pangisang513
      @pangisang513 3 года назад +1

      can you help me because the apply button isn't under inspector and when I change something like at the beginning of the video, only one object is affected

    • @MustafaAbbasi
      @MustafaAbbasi 3 года назад

      @@pangisang513 It applies automatically I'm pretty sure that's what happened to me

  • @jerkyline5244
    @jerkyline5244 2 года назад +80

    If you need help with the Fog in 2021 its in window > Rendering > Lighting > Environment. Your welcome hope you have fun in Unity!

  • @DannyDaDino
    @DannyDaDino Год назад +265

    For anyone who can't figure out where snap to grid is, click the little magnet thing next to the hashtag looking thing, over the scene panel where you see your game. If you can't click it, click the globe icon with a little circle in the bottom right to the left of it and set it to global.

    • @The_Snailman
      @The_Snailman Год назад +3

      tysm

    • @juss1642
      @juss1642 Год назад

      Thanks man

    • @senco445
      @senco445 Год назад +3

      I set it to global, but I still can't click it weirdly

    • @enook
      @enook Год назад +3

      @@senco445 restart unity

    • @senco445
      @senco445 Год назад +1

      @@enook It worked, thanks!

  • @nothaalo
    @nothaalo 4 года назад +164

    "much better"
    *Almost falls out of the map*

  • @TheOfficialStal
    @TheOfficialStal 7 лет назад +746

    I used a trash can model for my player, and did some texture work on the ground to make it like a street, I then added paths on each side. For my obstacles I added debris and cars and stuff, I also imported a custom skybox. It's really fun using these tutorials as a basis and experimenting with your own themes and ideas. I've still got allot to learn though.

  • @xtrnl999
    @xtrnl999 3 года назад +177

    I love how Brackeys is always so cheeful. It leads me to believe that being an indie game developer leads to a very fulfilling life.

    • @vic_710
      @vic_710 2 года назад +25

      Fulfilling maybe but tiring yes

    • @luckythelucklesswolf1419
      @luckythelucklesswolf1419 2 года назад +8

      sure, but you have to go through hell to get the fulfillment /hj

    • @reno82
      @reno82 2 года назад +2

      I'm pretty sure he made a lot more with his RUclips channel than developing games.

    • @beef1043
      @beef1043 2 года назад +4

      @@reno82 thats definitely true
      his videogames are free but his youtube vids are monitized

    • @bananian
      @bananian 2 года назад +1

      @@reno82
      Well shirt, I was hoping to make it big with a blockbuster game lol.

  • @matthias5913
    @matthias5913 4 года назад +661

    Now put your forward force at mabye... 4000
    Me: 4000? Thats a bit to much but ok ill try it...
    *presses play*
    Me: WEEEEEEEEEEEEEEEEEEEEEEE

    • @zoeazalkonyszelleme2487
      @zoeazalkonyszelleme2487 4 года назад +5

      I have the same problem how to solve that?

    • @adrianshephard9194
      @adrianshephard9194 4 года назад +6

      @@zoeazalkonyszelleme2487 change the force to something less maybe ? maybe at 3000 or such

    • @LOL-us9nn
      @LOL-us9nn 4 года назад

      :)

    • @realprisec
      @realprisec 4 года назад +2

      @@zoeazalkonyszelleme2487 bruh just lower the force

    • @cookiestudios2565
      @cookiestudios2565 4 года назад

      @@zoeazalkonyszelleme2487 either lower the force or up the mass

  • @jawad9757
    @jawad9757 5 лет назад +330

    This is one of the best and easiest to follow tutorial series I have ever watched.
    Wow: almost 200 likes, I forgot about this

  • @geeboo4381
    @geeboo4381 4 года назад +308

    When life hits you hard with corona, you resort to Brackeys tutorials...

    • @ProGamer-ho7lz
      @ProGamer-ho7lz 4 года назад +2

      @Geeboo lol

    • @ziad1030
      @ziad1030 4 года назад

      Indeed

    • @corniscsapat1489
      @corniscsapat1489 4 года назад

      same

    • @michaaell.8105
      @michaaell.8105 3 года назад

      agreed

    • @vikrantsinghbhadouriya4367
      @vikrantsinghbhadouriya4367 3 года назад

      Brothers please help me after I did all the steps that brackeys told in the video when I hit play my character didn't move guys please help me I checked my code it was correct please tell why my character is not moving

  • @finnixcooper7212
    @finnixcooper7212 2 года назад +79

    For anyone confused with the snap settings in 2021, it's called Grid and Snap settings. Also be careful that you don't set the X,Y and Z of the world grid to 2, but look for the X,Y and Z under the Increment Snap.
    If you did accidentally changed the world grid, you can reset it when clicking on the cogwheel.
    Hope this helps cuz I got confused there for a sec.

    • @blazer6972
      @blazer6972 2 года назад

      Uhm I actually need help with my player. Unlike his when ever my game starts my player movement script disables itself. As if it's touching the obstacle before the game even strts.

    • @unityza4052
      @unityza4052 2 года назад

      Thank You

    • @eldrazazonacdon7746
      @eldrazazonacdon7746 2 года назад +1

      @@blazer6972 don't know if this is too late because its been two months but I had the same problem. Just check the placement of your semicolons and don't have one after the if (collisionInfo.collider.name == "Obstacle") and instead place the semicolon after the movement.enabled = false;
      hope this helps if you didn't already figure it out

    • @JimmyLundberg
      @JimmyLundberg 2 года назад

      thanks Finnix!

    • @plutoisarealplanet7407
      @plutoisarealplanet7407 Год назад +5

      for anyone in 2022 its the little picture of a grid and a magnet above the scene view!

  • @navjay5870
    @navjay5870 3 года назад +68

    "it already feels much more responsive"
    *proceeds to jump off the platform with full velocity

  • @134t7
    @134t7 4 года назад +111

    I have given the player a “break” button so they can stop themselves, I also added bridges that branch off to different lanes

    • @counterscam6547
      @counterscam6547 4 года назад +1

      cool

    • @fuzzybrickstudios2315
      @fuzzybrickstudios2315 3 года назад +1

      i will take that as a suggestion that is a great idea!

    • @adityasalunkhe1288
      @adityasalunkhe1288 3 года назад +2

      @Rahul Joshi Just add a keyword "s" and do the same you did with sidewaysforce except do it in opposite direction of forward force

    • @lionzzz5
      @lionzzz5 3 года назад

      Can you copy paste the code here pls

    • @raoufbensalem3417
      @raoufbensalem3417 2 года назад

      @@lionzzz5 it will be too long maybe on github

  • @ayaan4982
    @ayaan4982 4 года назад +1338

    who else is doing this during quarintine

  • @willpetillo1189
    @willpetillo1189 3 года назад +168

    For
    those using this as a reference or wanting to review specific parts of the lesson, here are some time-stamps of interest:
    0:42: Creating a prefab
    2:14: Changing view direction, switching between perspective and isometric
    2:46: Adding a layer and making it non-selectable
    3:13: Moving an object on a plane
    3:20: Moving an object on a grid
    4:36: Setting ForceMode to make left/right movement more responsive
    5:40: Increasing drag to improve game feel
    6:32: Adding fog

    • @MightyOwl_01
      @MightyOwl_01 2 года назад +2

      this should be top/second comment ngl, timestamps are so damn helpful in tutorials

    • @themineballoner3652
      @themineballoner3652 2 года назад +1

      Still doing gods work, hope you did it through the whole series

    • @youinbotheyamez4950
      @youinbotheyamez4950 2 года назад

      The force mode setting is make me way to fast can I have some help

    • @willpetillo1189
      @willpetillo1189 2 года назад

      @@youinbotheyamez4950 Did you remember to multiply by Time.deltaTime?

    • @youinbotheyamez4950
      @youinbotheyamez4950 2 года назад

      @@willpetillo1189 yes

  • @charlesmoss7914
    @charlesmoss7914 6 лет назад +20

    I'm currently a web developer and I've been wanting to branch out into game development for quite a while. Recently, I started looking around for some simple Unity/C# tutorials and this series is by far the best thing I've found so far. Time has flown by so fast while following this tutorial. I can't wait to finish it! Thanks a million for the free resource links and tutorials. They've been super useful and insightful! Hopefully after this, there will be some gradually more advanced videos coming out.

  • @luizcastro5246
    @luizcastro5246 2 года назад +15

    for those looking for snap settings, the latest 2021 version has them somewhere else, right above the screen where you are visualy editing the game there is a magnet near a hash looking thing, that is your snap setting.

  • @gamertron1064
    @gamertron1064 3 года назад +222

    Me: Does the forcemode thing and doesn't change values
    Also Me: d
    The cube: *Adios*
    Edit: Thanks for the likes! No one ever really notices my comments.

  • @TheNefari
    @TheNefari 7 лет назад +1

    That fog made the game look so much better in just a simple click - just amazing

  • @eduardvoinea1370
    @eduardvoinea1370 3 года назад

    your videos are fantastic. unlike many other unity tutorials out there, you actually take the time to explain each little thing, which is just great.

  • @brflame90
    @brflame90 2 года назад +3

    This series is so much fun, after only a few videos I already wanted to add a new feature(jumping) so I took a break from watching the videos to get jumping figured out then I wanted the player to reset when they died instead of just stopping so I did that and then I wanted it to wait to reset and all of this took me like 30 minutes but it was worth every second and I am already loving game development

  • @Markus-uu3gs
    @Markus-uu3gs 4 года назад +17

    To anyone having a problem with obstacles from prefab being put at y -0.5 of the y of the ground (or just half in the ground):
    In the top left corner where you have tools like Hand Tool, Move Tool, Rotate Tool, on the right there are two options. In the tutorial he has it set at the "center" and "local", I had it set to "pivot" and "local". Changing the first setting to "center" resolved the problem to me.

    • @kingderpygoat
      @kingderpygoat 4 года назад

      T H A N K Y O U !

    • @MaxParasite
      @MaxParasite 4 года назад +1

      Had to dig too deep to find this. Thanks a lot.

    • @Markus-uu3gs
      @Markus-uu3gs 4 года назад

      @@MaxParasite No problem :)

    • @cdubb9355
      @cdubb9355 4 года назад

      markus u my friend are what we call in life an absolute legend

    • @inept6986
      @inept6986 3 года назад

      you are an absolute lifesaver thankyou!

  • @mazharnadeem8358
    @mazharnadeem8358 4 года назад

    You have clear all of my concept ...
    Now, i am able to watch your E06. Thanks for providing such a great channel.

  • @fakefriend1671
    @fakefriend1671 5 лет назад

    GOD I LOVE IT. i am INHALING your guides right now. I am studing "Multi Media Production" and i am in the 4th Semester and all i am thinking is "Meeeh... this is ok i guess". But now i am so god damn exited about Unity. Thank you so much. I have watched a lot of tutorials out there and i have to say, you are definitly the best one when it comes to understanding and learning.

  • @Muftaay
    @Muftaay 6 лет назад +16

    I already found myself spending way too much time editing the level design, I'm having a lot of fun with this. Thanks for these tutorials man!!!!!
    It also blows my mind that games like "the impossible game" are basically so easy to make using unity. Of course it requires a lot of fine tuning when it comes to the level design but the impossible game is not much more than your tutorial in 2D, or am I wrong?

  • @DavidPalayathar
    @DavidPalayathar 11 месяцев назад +5

    If you need to find the Lighting its in, Window --> Rendering --> Lighting (then within lighting go to environment)
    hope it helped :)

  • @ItsMeAndru
    @ItsMeAndru 5 лет назад +1

    I'm so glad to have found these vídeos. They are amazing.

  • @acidgaming399
    @acidgaming399 3 года назад +1

    Brackeys actually the smartest programmer I've ever met. Even my teacher lets me make this game as a school project in quarantine.

  • @ThatOneRobloxDev
    @ThatOneRobloxDev Год назад +3

    For anyone wondering where snap settings is (Version 2021.3+), its the "Audio Visualiser" looking icon next to "Toggle Grid Snapping".

  • @happarohapparo7265
    @happarohapparo7265 7 лет назад +20

    The best and pleasant tutorials I have ever seen. I have some idea, can I use Your videos and translate them to Russian in future maybe (of course with source link )? ;)

    • @chickeninabox
      @chickeninabox 4 года назад

      Can you teach me cyrillic?

    • @happarohapparo7265
      @happarohapparo7265 4 года назад

      @@chickeninabox без проблем, чувак:D

    • @programmingtacticalcode7968
      @programmingtacticalcode7968 3 года назад

      Happaro Happaro : why you watching this and i am smaller hacker ;) link:ruclips.net/video/NbOy-raaaNA/видео.html
      Regards from serbia

  • @abdullahjuma9169
    @abdullahjuma9169 2 года назад

    This guy just makes game programming fun. I am always looking forward to more episodes ahaha

  • @ronakpunase80
    @ronakpunase80 6 лет назад

    This is so brilliant, especially the fog thing. Thank you for this tutorial

  • @nikhiljagtap1669
    @nikhiljagtap1669 3 года назад +15

    I coded "L" to levitate so that when the player goes off the ground, you can bring the player back to the platform by press "L" basically means no gravity with forces.

    • @gregomano2220
      @gregomano2220 3 года назад +3

      thats something i kind of wanted to add. And maybe a screen vibration when it happens as well as a low humming effect.

    • @michaaell.8105
      @michaaell.8105 3 года назад

      SEND CODE PLSSSSS HAHA

    • @shado5491
      @shado5491 3 года назад

      Simple but really cool! I've always wanted to mess around with gravity. I'll try that too!

  • @HemantR.20930
    @HemantR.20930 Год назад +8

    If you are watching in 2022, the lighting can be found under Window > Rendering > Lighting. I hope this helped people!

    • @HabibaBinteRahman
      @HabibaBinteRahman 19 дней назад +1

      I almost gonna stuck for like a long time if i hadnt see this tnx for that

    • @HemantR.20930
      @HemantR.20930 19 дней назад +1

      @@HabibaBinteRahman lol after 1 year I am still here!!! No problem!! =:)

  • @rafiachowdhury5519
    @rafiachowdhury5519 3 года назад

    Your videos are the only educational videos that truly emphasizes that learning is fun! Greetings from Bangladesh.

  • @KingKaymor
    @KingKaymor 6 лет назад

    Thank you so much for this! You have a really good way of explaining stuff, and I'm finding myself learning a lot.

  • @nielvelez7395
    @nielvelez7395 6 лет назад +106

    Can someone help I cant play the game in full screen. I can run it but it wont let me control the player

    • @Situide
      @Situide 6 лет назад +47

      as soon as you click play, click the square

    • @1_HighDuke
      @1_HighDuke 6 лет назад

      Thanks, worked.

    • @inceptional
      @inceptional 5 лет назад +8

      OK, that works--but why do we have to do that? Why doesn't the game view just run normally and show us the game playing as it does when not zoomed? :-o

    • @CaptainMobius0
      @CaptainMobius0 5 лет назад

      I have the same question, why is that? Are we missing some command that sets the player as the default focus point?

    • @jeffjupiter9475
      @jeffjupiter9475 5 лет назад

      @Vali I also have the same issue and still no answers -_-

  • @StevenLoprese
    @StevenLoprese Год назад +5

    If you are doing this in unity 2019 or later, you may run into the issue where your prefabs being dragged into the scene are always dropped halfway inside your ground object. To fix this, in the top left of the scene window is a drop down that looks like a box with a red dot in it, click the arrow and change it to from 'Pivot' to 'Center'. Thats it! Should be fixed now! 😄

  • @KhalidBhat-fs9uc
    @KhalidBhat-fs9uc Год назад +1

    He is one of the best programing teachers on youtube. Keep it up.

  • @barax9462
    @barax9462 6 лет назад

    Man this is helpful, i mean there are some simple techniques yet IMPORTANT that are easily to miss. Thank you alot.

  • @shaneblanton2808
    @shaneblanton2808 5 лет назад +19

    Dude, I love these videos and I'm learning a lot, but you go so, damn, fast! I have to pause and replay several times for just one modification.

    • @williamrobb5945
      @williamrobb5945 4 года назад

      Agreed. I wonder why he bothers editing out all of his pauses because we are constantly pausing his video to keep up. He can save himself a lot of time in editing by just leaving the natural pauses in his speaking voice in the video. However this is a trend with most RUclips videos that every video must be edited to be as short as possible.

    • @kieranwashburn419
      @kieranwashburn419 3 года назад +1

      Yeah agreed, I've been changing the playback speed in the settings to .75, .50% speed. Makes life a lot easier.

  • @turtleANDhare1
    @turtleANDhare1 7 лет назад +3

    I'm done with it! Thank you very much! I have questions: after i'm done with it, How to make it as .exe file, how to restart level after you touched obstacle, how to make Menu and how to make the end with checkpoint?

  • @kristianthaler6525
    @kristianthaler6525 3 года назад +2

    Making it this far means you are in the top 50%. Feel proud.

  • @visitanteusa
    @visitanteusa 4 года назад +1

    I'm loving this, since 14 i wonder to develop some simple game and i got to thank you for helping me with that dream, and yes, i'm doing this during quarantine.

  • @NafenX
    @NafenX 4 года назад +4

    For anybody having issues with your Prefab being in the ground when you click and drag to create it, or any other object: Make sure at the top left where all the tool buttons are, the button after the tools should say "Center", not "Pivot" :D

    • @farban6200
      @farban6200 3 года назад +1

      there would have been no way i would figure that out if it wasnt for this comment, thank you so much

    • @michelol8288
      @michelol8288 4 месяца назад

      this saved me a lot of headache. thanks man

  • @rv90splittergaming6
    @rv90splittergaming6 6 лет назад +8

    for those who got confused about finding the lighting window... you should select : Menu => Window => Lighting => Settings
    Hope I helped someone :)

  • @MegaWombatGaming
    @MegaWombatGaming 7 лет назад

    best youtuber for simple game making I love this series

  • @studentcarloslorenzozuniga3914
    @studentcarloslorenzozuniga3914 5 лет назад

    Thank you for helping me start to program in unity,you have made me love programing

  • @ath.bar.7671
    @ath.bar.7671 2 года назад +3

    In newer versions, you can open the Lighting tab by pressing Window > Rendering > Lighting Settings. I found this randomly after a long time.

    • @xeum401
      @xeum401 2 года назад

      Thanks a lot man you saved me a lot of time

    • @Heatmizer42
      @Heatmizer42 8 месяцев назад

      Thanks! Was just looking for a comment that would help with this haha.

  • @joshuabrewer5397
    @joshuabrewer5397 Год назад +3

    July 2022 Snap Menu.
    Above your scene view in the top left corner there will be a few buttons.
    The button that looks like a graph with a Y in it toggles the grid on/off
    The button with a graph and magnet icon turns snapping mode on/off
    The button with vertical bars lets you adjust the snap settings. The X Y Z you see at the top are the "Move X" "Move Y" "Move Z" options you see in the video. You can set the XYZ to each have a different value by hitting the (-) button left of the x.

  • @thompsonpaulus5450
    @thompsonpaulus5450 5 лет назад

    Im not a programmer, yet I'm glad I keep on continuing until this episode.

  • @kellyrodgers9326
    @kellyrodgers9326 3 года назад

    Dude, your tutorials are amazing. So helpful. Keep up the greatness!

  • @jwsjacobs
    @jwsjacobs 4 года назад +13

    I disable use gravity for the player when he collides, so when you get in an accident you are send into orbit :p

    • @umadkek
      @umadkek 3 года назад +1

      do you mind if I use that idea?

    • @b.g._.3828
      @b.g._.3828 3 года назад

      how did code that

    • @jwsjacobs
      @jwsjacobs 3 года назад +1

      @@b.g._.3828 it's just a setting for the rigidbody

    • @ali_m_
      @ali_m_ 2 года назад

      @@b.g._.3828 Let me help.
      In the PlayerCollision script declare a public varible like this
      public Rigidbody stolenRigBod;
      then save and go into unity on the player, drag the rigid body to the public variable you just declare then go back into the ide (probably visual studio) then put something like this
      stolenRigBod.useGravity = false;
      but change stolenRigBod to what you named the varible.
      You're Welcome!

  • @Michael-sc8if
    @Michael-sc8if 3 года назад +7

    The menus have changed with the newest version of Unity, under windows there is no lighting, it is under rendering.

  • @ark2307
    @ark2307 4 года назад +2

    I am doing this during quarintine
    but I always had been interested in it

  • @jesssilver4244
    @jesssilver4244 3 года назад +1

    This is so much better than those £200 udemy courses! Thanks so much! I'm learning so much more than I did from the courses.

  • @TimM-kz1vl
    @TimM-kz1vl 4 года назад +10

    Here's my notes so you don't have to rewatch the video. video 6: Gameplay. Prefabs: Drag a game object into your assets. This allows you to spawn items of the exact same type. If you change the properties of the item in your assets, it changes it for each duplicate of that item you use. Top right in the scene view, will allow you to change the axis you’re viewing it from.
    To work in gridsnap mode, go to Edit>snap settings.
    Player movement can sometimes feel sluggish, as your controls slowly build up momentum. We change this by ForceMode. Go to your playermovement script and go to where the controls are. In the X Y and Z area, add in ForceMode.VelocityChange. Example:
    If (Input.GetKey(“d”))
    {
    rb.AddForce(sidewaysForce * Time.deltaTime, 0, 0, Forcemode.VelocityChange);
    //This can feel better. You’ll also need to change the force numbers to be smaller.
    To improve it even further, you can increase the drag. Higher drag, means things stop faster. This option is under RigidBody. Because you’re fighting against drag, you will need to increase the force you move at.
    To change how far you can see, you can change your lighting. Go to Window>Lighting and dock it where you want.
    Enable fog and it will allow you to change the color and view distance.

  • @theultimateprogrammer6932
    @theultimateprogrammer6932 7 лет назад +191

    if (Input.GetKey(KeyCode.Space)) {
    rr.AddForce(0,50,0);
    }
    I BELIEVE I CAN FLY
    I BELIEVE I CAN TOUCH THE SKY

    • @ammarali8692
      @ammarali8692 7 лет назад +28

      you can use :-
      if(Input.GetKey(KeyCode.Space) && transform.position.y == 1){
      //your jumping code
      // this will make your player jump only when he is on ground...
      }
      i guess this was your problem...

    • @johnmoose9350
      @johnmoose9350 6 лет назад +14

      try this
      bool isGrounded = false;
      void OnCollisionEnter(collision col){
      If(col.gameobject.tag == ""terrain"){
      isGrounded = true
      }
      void OnCollisionExit(collision col){
      If(col.gameobject.tag == ""terrain"){
      isGrounded = false
      if(Input.GetKey(KeyCodw.Space)&&isGrounded == true){
      //JUMP CODE :)
      }
      }

    • @shagnikpaul2295
      @shagnikpaul2295 6 лет назад +1

      NICE xD

    • @zeli3776
      @zeli3776 6 лет назад +1

      where do i insert this code?

    • @KiemPlant
      @KiemPlant 5 лет назад +2

      @@ammarali8692 I think it'd be better to check if it collides with ground, but ok.

  • @TheWizard991
    @TheWizard991 Год назад

    I've made Jumpy Cube game with the help of Brackeys videos. Such a nice guy to share all his skills with us.

  • @Jon-tz9ru
    @Jon-tz9ru 5 лет назад

    Hey I managed to follow the tutorial up till here and I made it two players thanks for all the help I will continue with the series

  • @n0_l0gic
    @n0_l0gic 5 лет назад +17

    So I made and infinite level type thing with help from the code in your dodge the block game. And in that code the random generation of blocks works like this:
    using UnityEngine;
    public class BlockSpawner : MonoBehaviour
    {
    public Transform[] spawnPoints;
    public GameObject blockPrefab;
    public float timeBetweenWaves = 1f;
    private float timeToSpawn = 1.75f;
    void Update()
    {
    if (Time.time >= timeToSpawn)
    {
    SpawnBlocks();
    timeToSpawn = Time.time + timeBetweenWaves;
    }
    }
    void SpawnBlocks()
    {
    int randomIndex = Random.Range(0, spawnPoints.Length);
    if (randomIndex == 6)
    {
    FindObjectOfType().SpawnJumpPad();
    }
    for (int i = 0; i < spawnPoints.Length; i++)
    {
    if (randomIndex != i)
    {
    Instantiate(blockPrefab, spawnPoints[i].position, Quaternion.identity);
    }
    }
    }
    }
    So I had an idea to add jumpppads to the game. So what I did was that i changed so that the blocks can spawn over the whole ground (by changing the 0 in randomIndex to -1). And I want to make it so that the jumppads spawn in when the blocks are over the whole ground (so when all spawnpoints generate a block). And I have figured out all the code for spawning the jumppads, but I'm stuck at fixing, when, the blocks spawn, so like when all the spawnpoints generate a block.
    Does anyone have a solution for this?

    • @n0_l0gic
      @n0_l0gic 4 года назад

      @Papyrus the great39 Search for "CUBERUSH" on itch.io. I completed the game...well sort of. (Not done)

    • @n0_l0gic
      @n0_l0gic 4 года назад

      @Papyrus the great39 Commented this a year ago...

    • @SunilNmb
      @SunilNmb 3 года назад

      @@n0_l0gic can you help me?
      When i duplicating cube as instructed in the vid and starts the game all cubes except the orginal one jumps. Can anyone help me?

  • @caden4861
    @caden4861 2 года назад +11

    How to add fog for newer versions. Top Right-ish. Window→Rendering→Lighting→(From Scene) Environment→Other Settings→Fog.

  • @veryveryold
    @veryveryold 6 лет назад

    I've been using this engine for a while now, but you JUST NOW taught me that there are snap settings. Brackeys...I could kiss you I'm so happy.

  • @Narriz
    @Narriz 3 года назад

    Thanks for the tutorials. Been following from start of the episodes. Great content!

  • @47Mortuus
    @47Mortuus 4 года назад +121

    "There's plenty of oport-unity"

    • @theanachronism5919
      @theanachronism5919 4 года назад +11

      Get out

    • @47Mortuus
      @47Mortuus 4 года назад +27

      @@theanachronism5919 Why so aggressive towards the comm-unity?

    • @dallerdyr1029
      @dallerdyr1029 4 года назад +2

      @@47Mortuus Haha very funny

    • @NafenX
      @NafenX 4 года назад +1

      @@47Mortuus Enough with the puns, or there'll be a ...mu..tiny?
      Am I doing it right?

    • @user-bk4dm4vy4i
      @user-bk4dm4vy4i 4 года назад +1

      @@NafenX m-unity.

  • @teemomcnuggets9513
    @teemomcnuggets9513 7 лет назад +8

    Hey brackeys, I would want to ask you would recommend me to watch your playlists, so which playlist first and second etc. Would be cool if you answer it! THank you! :)

  • @monkeytheory4718
    @monkeytheory4718 Год назад

    I just started learning unity and I am currently following this video.

  • @NugrohoPangestu08122002
    @NugrohoPangestu08122002 6 лет назад

    this series is so simple and awesome!! :D

  • @---zl8iy
    @---zl8iy 7 лет назад +10

    Brackeys, My player sideways movement doesn't work in fullscreen but it works when i try it in the edit mode thing. There is no console errors.

    • @CHEESER7
      @CHEESER7 6 лет назад +1

      same problem

    • @MrSuperTeenGohan
      @MrSuperTeenGohan 6 лет назад +7

      That's ptobably because your player window is inactive. The play button is outside the player window, so when you hit play, the window with the play button becomes the active one. To fix it, simply click the game window again after hitting play.

    • @leesameredith1375
      @leesameredith1375 6 лет назад +1

      Thanks Klausiboy Kristensen that works for me!!

    • @TheHoodedWalrus
      @TheHoodedWalrus 4 года назад

      i know its been two years but thank you from the bottom of my heart ive been raging a lot

  • @duckguy1386
    @duckguy1386 5 лет назад +13

    If you don't have a mouse to zoom in or out
    Press Alt+right click

    • @pat9986
      @pat9986 5 лет назад +1

      Bless your soul.

    • @duckguy1386
      @duckguy1386 5 лет назад

      @@pat9986 np

    • @calamitas3454
      @calamitas3454 4 года назад

      If you dont have a Mouse to zoom in or out
      Wait what if YOU dont have a Mouse just go away from unity

    • @bob69927
      @bob69927 4 года назад

      ctrl alt del

    • @Samikako
      @Samikako 3 года назад

      Just press Alt+F4 lol ;-;

  • @Neonyoom
    @Neonyoom 7 лет назад

    Great tutorials as always! Keep it up and thank you!

  • @erikkudryavtsev4606
    @erikkudryavtsev4606 7 лет назад

    Thank you for this video man ! :)) Im really happy to see those turorials :)

  • @JustSomeDevKid
    @JustSomeDevKid 3 года назад +3

    "it now feels much more responsive"
    *Falls*

  • @ammarramli9256
    @ammarramli9256 5 лет назад +10

    When I drag my prefab (the obstacle) on the ground, it automatically changed its Y position to 0.5 from the initial set 1. Couldn't figure out what the problem is.
    edit: Tried googling about it and the only solution that I found is to drag the prefab into the hierarchy pane. And I can't drag it into the scene like in this video did.

    • @jannekallio5047
      @jannekallio5047 5 лет назад

      Same problem, thanks for the tip!

    • @TaruzaGaming
      @TaruzaGaming 4 года назад

      got exactly the same problem. have you already found a better solution?

    • @StrakkeTjakke
      @StrakkeTjakke 4 года назад +3

      @@TaruzaGaming Try setting the Toggle tool handle position (in the toolbar) to center. This worked for me.

    • @NafenX
      @NafenX 4 года назад +1

      @@StrakkeTjakke cheers! i was messing with settings way back in one of the first tutorial videos and must have toggled this, not knowing what it did xD

  • @kennethmundt
    @kennethmundt 4 года назад

    These Ninja sized tutorials are the best. Thx a lot.

  • @onuralpardc5017
    @onuralpardc5017 7 лет назад

    man you are the only youtuber that teaches unity that I understand thank you

    • @NepNepYT
      @NepNepYT 3 года назад

      my camera turns when i hit stuff..

  • @scooterman9230
    @scooterman9230 7 лет назад +10

    You called this episode 5... last episode was episode 5....
    Tho..... amazing tutorials :D
    Thanks :D

  • @Yukimurasanada29
    @Yukimurasanada29 7 лет назад +5

    i have a problem moving the player, A and D wont work when in fullscreen which is shift + space, any ideas ?

    • @fearguspowers238
      @fearguspowers238 5 лет назад

      I still have that issue when i go fullscreen, any ways to solve this?

    • @CraftedGenius
      @CraftedGenius 5 лет назад

      @@fearguspowers238 Maybe you're using caps lock?

  • @user-rf5jb4go9i
    @user-rf5jb4go9i 2 года назад

    this guy gives so much amazing information within 8 damn minutes

  • @rhcarlosweb
    @rhcarlosweb 6 лет назад

    I'm learning a lot, thanks for the videos!

  • @xen5278
    @xen5278 4 года назад +20

    5:50
    just so I know where I left off

    • @bob69927
      @bob69927 4 года назад +4

      ecksdee

    • @CasualWatcher279
      @CasualWatcher279 4 года назад +2

      You had better have come back dammit!

    • @chickeninabox
      @chickeninabox 4 года назад

      @@hevsuit5142 Why are you so NEGATIVE?

    • @69bruh
      @69bruh 4 года назад +1

      Nintendo Stuff 2 lol u think thats negative? straight away, you probably are a negative person yourself lol

    • @chickeninabox
      @chickeninabox 4 года назад

      @@watizdat89 Why did the bully laugh?

  • @imconfused6955
    @imconfused6955 7 лет назад +30

    You put E05 in the title, its the sixth episode

    • @thecannonman7712
      @thecannonman7712 6 лет назад +4

      +Mohammed Barwani Lol that was 3 months ago bro
      See what I did there?

    • @SmitefulGaming
      @SmitefulGaming 6 лет назад +3

      no please dont bring that cringe ass shit on this side of youtube

    • @thecannonman7712
      @thecannonman7712 6 лет назад

      +Smiteful Gaming Who?

    • @Salmanul_
      @Salmanul_ 6 лет назад +2

      Your name perfectly matches with this comment xD

  • @mohanedbenmansour5927
    @mohanedbenmansour5927 5 лет назад

    best thing in youtube yet

  • @ChadBroughton
    @ChadBroughton 3 года назад +1

    Super fun. Game reminds me of a classic I played a long time ago called Marble Blast.

  • @lucaswolynec1658
    @lucaswolynec1658 4 года назад +15

    5:27
    ForceMode shows as error.
    HELP!
    EDIT: I just forgot to add a comma ahhahahha lol

  • @VircaGames
    @VircaGames 4 года назад +3

    If you have that problem, please watch the next video. "When I hit the Obstacle in the game, it passes through the Obstacle and then stops."

  • @sidney7180
    @sidney7180 5 лет назад

    Does he say generally or january? That's been buging me since I started watching these series ;) But I find it really great how easy you explain all this, way better than any other tutorials or courses I've seen!

  • @yesubabu2880
    @yesubabu2880 5 лет назад

    from time 2:10 to 4.00 i have seen it like 10 times. Toomuch info in too short time no dragging words like aaa heee uuu. thanks!!

  • @RexArtTv
    @RexArtTv 5 лет назад +3

    When I try to increase my forward force to like 20,000. My player box goes very slow and stays the same

    • @hpfan1516
      @hpfan1516 4 года назад

      Double check the forward force's value in the Inspector Window under the "Player Movement" script. There's a weird thing with Unity where if you make a variable public in the code and adjust the variable's value IN the code, it doesn't always sync with the Unity window. So it might be best to always double check values from the inspector window.

  • @geanohecho4727
    @geanohecho4727 5 лет назад +4

    I do not have any ideas how to move the player during the game,is there any instruction I missed?

    • @geanohecho4727
      @geanohecho4727 5 лет назад +4

      Hah, I forgot about the Playermovement script......

    • @deatharmy2637
      @deatharmy2637 4 года назад +2

      Even I am having the same problem.

  • @CaptainAwesomeVlog
    @CaptainAwesomeVlog 2 года назад

    Got a working mini game in one short afternoon. Thanks. :)

  • @kirawesh
    @kirawesh 3 года назад +1

    you such awesome instructor!!
    at 2020 your guide is very relevant. thank you :)

  • @philippst.8543
    @philippst.8543 7 лет назад +10

    Makes a Great Tutorial gets Shit on for naming it wrong
    Could you please make the next Episode about Level Management/menu

    • @leonlaci9162
      @leonlaci9162 7 лет назад +2

      Philipp St. Check out his tower defense game, he covered that.

  • @domdumm3885
    @domdumm3885 7 лет назад +6

    Can you show us how to respawn the Player?

    • @LiamHeron
      @LiamHeron 7 лет назад

      I could tell you how you can just restart the game once you hit a obstacle if that's what you mean?

  • @baconbrian2909
    @baconbrian2909 4 года назад

    This guy is way too exited to be doing this. But theses videos are the best Unity tutorials I've seen. better than the official ones

  • @ussardor
    @ussardor 5 лет назад

    I am watching ads and clicking on them so you can get paid. You deserve it. Thanks.

  • @rishwanthmyanapuri1301
    @rishwanthmyanapuri1301 4 года назад +5

    Please solve this problem :
    When I press shift +space to view the game, the controls are not working i.e a and d, but they are working before.

    • @goodsoup6989
      @goodsoup6989 4 года назад +5

      It happened to my too what should I do??
      Fond a the problem! After you press shift + space you need to press the screen. It is that easy don't know why it took me a day to finally get it.

    • @Chytry123
      @Chytry123 4 года назад +3

      same problem
      Edit: Found the solution. Start game with ctrl + P, it works for me.

    • @alinajafi461
      @alinajafi461 3 года назад +2

      hey bro ....don't use shift+space , Instead of that in "game "window(that one the camera shows u now, the right one) in top of that u can see (display1 , free aspects , etc)......find "maximize on play" and click or toggle it on. now click on play and the screen will be large and u can use control keys

    • @oliverhoad5838
      @oliverhoad5838 3 года назад

      @@goodsoup6989 Ah thank you!

  • @rayknn
    @rayknn 7 лет назад +14

    I know everyone says it but pls change title to EO6 your previoius episode was EO5

    • @samuelchen8545
      @samuelchen8545 6 лет назад

      no the first one was a tutorial thing
      and had a number sooo

    • @Kj-zw3sz
      @Kj-zw3sz 5 лет назад

      he did

  • @chrisgaming9567
    @chrisgaming9567 2 года назад +2

    As of November 2021 this still works, although some stuff isn't in the same place

  • @anthonysylva991
    @anthonysylva991 5 лет назад

    Dude thank you.. You're a very good teacher