The REAL way I build Videogames | Unity3D | GameDev

Поделиться
HTML-код
  • Опубликовано: 15 ноя 2024

Комментарии • 104

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

    Very cool Jason. It is easy to find a tutorial for a specific problem but a video on the development process is a rare gem. I love how you shared your thinking process and I even learned a few small things I didn't know I could do in Unity. Thanks for this gem 😀

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

    There are many tutorials on specific facets of development but seeing someone's whole process is rare as gold in the free vid space. Thanks.

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

    Been using Unity for a few years now and didn't know about Animator Override Controllers or Animation Events. Great video as always Jason!

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

      Likewise! First time I've heard of Animation Events. It's crazy the number of things out there that can streamline the process that fly under the radar.

  • @MaskedImposter
    @MaskedImposter 2 года назад +9

    This is similar to how I'm doing things in my game. I'm also including networking, so some animation events will play for everyone (like playing a particle effect), and some will be host only (doing damage or launching a projectile). Fun thing I learned is that while an animation may be playing on a client, it might be culled from the host. So attaching a projectile spawn point to a weapon may have it aiming at the ground when the client shows it aiming properly. Solution is to either set the animator controller to not cull, or have the projectile spawn point always be in position rather than a child of the weapon model.

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

      I'm having a problem with this, Im working on something similar. I have my projectile firing from the main character, it is making contact with the target. Yet the target refuses to be destroyed. Im using "OnColliderEnter" to register the hit. The projectile and the target both have their colliders on and they are the right size. I have it set to "Set.Active(gameObject). false. If the hit happens. Ive been stuck on this part for weeks. The Game runs in play mode, I can build and run. My projectile is a prefab, I don't think that is the problem though.

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

      @@vfwarlordforever9589 could be any number of things. Usually you'll want to make sure there's a rigid body with at least one of the colliders. It could be the projectile is going so fast that it essentially warps past the target. You could try changing from discrete collision to continuous collision. It could be a code problem. Are you calling the destruction event on the collider hit, or on the projectile itself? If you want to discuss further join my discord (link in my recent videos). Post screenshots of the collider and rigid body setups. And of the collider code.

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

    For any newbie watching this I'd recommend making your scripts in a modular fashion so you can re-use them between games, things like health and character stuff can all be re-used as almost all the time you end up coding same thing over and over. So be resourceful and shave years of your efforts

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

    Thank you so much for sharing this format. I really appreciate how straightforward all of your videos are, but this in particular is certainly an antidote to over-analysis-paralysis.

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

    I love your face lol when you did that big eyed look, to funny.
    Oh, and nice workflow too.

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

    Thank you, Jason. This video helped me a lot.

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

    Looks good to me! That summary comment will save tons of pain later. It also helps point you at which animation is using it!

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

    GOAT behavior as always! Thank you!

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

    7:07 Well that's a handy tip I didn't know. I could imagine finding this out by accident and getting very confused. 😅

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

    It's basically a good advice to take your Projekt and split the features up in small issues that U have to solve think like that Projekt/idea>features>for each feature splitt up in issue components to solve>research and solve problem move to next issue, that's how I am doing things it's pretty helpful to write down things and do a little brainstorming befor coding. Of course you guys will need to little practice but Things will get easier 💪👌

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

    D-Tier Game Dev: Learn Coding, Networking (socially and server-side), Art, Design, Sell 20 Units at Launch (thanks mom!)
    S-Tier Game Dev: Buy UnitZ, Change Title, $$$ (and GOTY)

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

      They key really comes down to the game and how fun it is. The hard part is that coding is fun too, so it gets easy to mix up the fun if coding with the fun of the game. Of course a well coded game is great, but the players only care about the end result. Lots of games with amazing code and architecture go completely unplayed because they're not fun.

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

    You should continue to build on this ... (maybe) leading up to something like the Sunday Morning Battler. Nobody ever seems to continually work on a project. Personally, I think it would be a great addition to the already phenominal services you give.

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

    This was really helpful. Not too different from my process, but I picked up a few great tips.

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

    Wow i like the new style of explanation with graphics. Very very good

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

    I used to over design my systems for games and would spend weeks implementing feature that could be easily done (especially as a lot of "intermediate" unity tutorials goes into best practices and implement things using more complex ways). It ended up really slowing my development and often the initial design didn't really work either and made debugging a nightmare.
    So lately I've been trying to force myself into "make it work first, then refractor later" mindset. It definitely helped speed up development early on, but it does get slower later on. However I do find that the refractor are a lot more concise and much less wasted efforts

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

    Great video! animations events and the delay on destroy will be super useful!

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

    What are you using that shows the fancy visuals on your methods like "Event function" and "Frequently called"? I need it! Also, I appreciate your iterative approach -- it's been hard not over-engineering our Proofs of Concept.

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

      Jetbrains rider! We give out a free 1yr license every Sunday on the show btw

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

      @@Unity3dCollege Thanks for the quick reply! We'll definitely be checking it out. I love the visual organization it brings.

  • @owenhey3187
    @owenhey3187 2 года назад +21

    I'm a little confused about what the "secret trick" was... Is the point that you prefer to implement working things in the short term rather than spend too much time planning out for the future? What happens when the codebase becomes larger and changing the way things are setup takes a really long time?

    • @kartman146
      @kartman146 2 года назад +7

      i guess the "secret trick" is just years of experience lol

    • @Pluto-ek3mh
      @Pluto-ek3mh 2 года назад +2

      You kinda look like Space Man Elon

    • @GallowsofGhent
      @GallowsofGhent 2 года назад +12

      To answer your second question, we have to re-emphasise this process. It's really a process of iteration, and is outlined in Clean Code by Bobby boy Martin.
      The process is to quickly prototype a working solution, verify it works, and then go back in and re-make it. You break the feature, clean up parts of the code until it works again, and then verify (preferrably via tests). Then you go back and do the same thing. And again until you're happy with the code and how it fits into your architecture. This process of iteration means you get results fast, but leaves the cleanup up to you.
      This is essentially refactoring, which is just a fancy word that means "making again." The reason this process works well is because you can never know everything you need to account for ahead of time. If you spend too much time planning, you might not reach any workable prototype in good time, if at all. Worse still, you might commit to a certain design and or implementation that doesn't make a lot of sense. If you just focus on the smallest possible feature to implement, and do it quickly before doing it right, you get to make real progress fast and you end up saving a lot of time. It's up to you to use that time afterwards to clean up your work and make it scale.

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

      @@GallowsofGhent That’s helpful, thanks

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

      @@GallowsofGhent thanks your message was better than the entire video

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

    Why are you caching in OnValidate, as opposed to Awake?

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

    Really interesting! just because you mentioned that, how to make a decent health bar, maybe with the new UI Toolkit would be really awesome, really few tutorials about that sadly

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

      Like how to make the health going down look more smooth, rather than chunks getting taken out at a time!

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

    Great Video Obi Tu Weimann!

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

    What are you method of making an inventory system that remembers amounts of character's items?

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

      Scriptable objects. The system saves the quantities of each scriptable object . They are easier to keep track of.

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

    Awesome video as always. I love seeing how experienced developers handle stuff, to see if my approaches are clean or not.
    I was a little disappointed not to see how you handle hit detection. Because as this video stands these characters will cause damage regardless of where they stand.
    I know that’s something that would have been addressed later, but I just wanted to see your approach lol

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

      Ideally you place a trigger collider, like a capsule, on each monster and it act as a hitbox. Then you place trigger colliders on the monsters hands. A script on the hitbox will detect when another collider enters the hitbox. Ideally you use a dedicated physics layer for the hurtbox and hitbox so they dont collide with the world, only between themselves. When there is a hit, you make sure you are not hitting yourself, then you send an event to a combat manager or something like that that will process the attack. You need a way to send all the info needed : type of attack, damage, buff or anything you need. The combat manager will then apply the damage to the attacked and play effects, particles or stuff related to the combat. Dont put all these things on the characters, it will get ugly fast.

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

      @@jonathansaindon788 I think you may have cracked my problem . Ive been stumped on hit detection for weeks on my project. I think its because I put the collider script on my target's Prefab in general, but not on it's collider specifically. Thank you so much if this works when I go home and try it!1 This list the last part Ive been stuck on! After this I can go forward and start making different stages for variety and adding sound effects.

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

    @3:36 if you use OnValidate() in this way, you should probably add a [RequireComponent] attribute to the class. But either way, I find that when I try to code shortcuts like this to set the reference, it usually ends up that I forget to set up the component instance anyway, heh. I'm sure, like me, you've gone through several iterations of this. 😄

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

    How hard it is to transitioning from Unreal to unity? Let's say i have experience in Unreal Engine and C++ Could i like find a job as a Unity developer?

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

      Lol of course but why would you want that?

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

    animation events was a new thing for me, thanks though, I always used another collider on the weapon or the hand wrist bone to get the collision for attack, im such a bot lol.

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

    Chad's make these kinds of videos 📹

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

    Hey, that's the enemy pack I'm using for my game! lol

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

    Very interesting strategy, but what are you thinking, that if you will making partially complex game can on final stage meet with problem that your design are based that you was realize the simple tasks which lied on surface on step by step will be not optimal when you arrive to the finish.
    Or you will be must after finish the creation of that prototype begin the process of re-engineering of our design (by use the abstract class, inheritance, polymorphism and interfaces).
    Or from your Great experience the most part of good Games in Unity (80%, Pareto principle) was created without this complex constructions and based on the main paradigms of Unity "Simplicity win the Efficiency which raise complexity but don't give a many profits" (not become a slave of the "OOP lamp/light").

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

    Hey jason, can you guide me about hyper casual game? Or what is the future of hyper casual game? in game industry

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

    When i need inspiration and ideas i use software like Nvidia Canvas to brainstorm and it shows me some amazing AI generated pictures that help me get an idea where i want to go.

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

    A bit confused of how it's possible to get access to another instance "private" property from the same class. What's it supposed to be made for? I mean by language developers. You're blessed! )

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

    Great advice!

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

    Game dever’s block. It’s a thing. It’s happening to me right now too 😅. This was very helpful thank you 😊

  • @sheldonjanzen3483
    @sheldonjanzen3483 2 года назад +9

    Hey im curious do you have ANY official games out that you made that i could try? Ive seen a thousand tutorials, but never a finished product.

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

      I agree... I don't think this guy has ever finished a game...

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

      Does his battler for the giveaway count?

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

      I was watching tutorials and trying to self learn but im getting a new impression. Unity is just pounding out assets trying to make money just like microtransactions in games off the asset store. Steam is flooded with thousands of these stupid unfinished games. Its really killing the gaming industry. I think jason makes more from his unity paycheque, and facebook, than any game developer does. Your really giving a lot of false hope to aspiring home devs. Why not put out a real tutorial on how to make a game. Menus, goals, events, scene management, snimations,scoring systems..etc thats what home devs really want. These asset store promotions are enough to make me unsubscribe. Jason doesnt even reply to comments unless your a paid subscriber. Go ahead and prove me wrong.. I'm going back to the codemonkey.

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

      Most RUclipsrs don't know what they are doing, they are a good starting point that's all. Brackeys was the biggest example of this. Being a tutor doesn't mean you are good. Not defending anyone, I agree with you but I'm glad these RUclipsrs exist for beginners but please drop them when you grow as a developer.

    • @max.playsgames
      @max.playsgames 2 года назад

      hes not an indie dev so i doubt he has any small indie games he has made himself, hes been doing this for like 30 years in actual companies, its not just a person uploading random tutorials

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

    this OnValidate is an editor-only function, the callback happens every time you change a value in the inspector, so you are not "caching" the animator there, you are getting its component every time you interact with values in the inspector...

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

      It's caching at build time so it doesn't have to do the search at runtime. Of course doing it in awake is fine too as long as you don't get it repeatedly at runtime or kill editor performance

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

      @@Unity3dCollege building the project using OnValidate() it won't cache it, this is an editor only function as soon as you build your game it will ignore it and not cache it, this is often used if you are building custom editor tools, to make sure you keep your data within a range on inspector.

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

      @@unityecsdev the value get serialized into the scene so it's there in a build.

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

      @@Unity3dCollege of course, let's just serialize everything, instead of doing good practices. good stuff! 👍

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

      @@unityecsdev half the devs I know would argue that serializing it is the good practice, closer to dependency injection, the other half prefer it all searched at runtime. To me it doesn't matter either way until it's a performance or workflow issue.

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

    Hi, A general question : what code editor are you using and how do you get all these extra helpers around the code ? Thanks ;)

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

      Hes using Rider, but you can really use anything. Wordpad would work lol but on a serious note, the default is fine enough, if you are interested in a free replacement get Visual Studio Code. I believe rider costs money, but its highly reccomended. For noobs tho im sure most people would reccomend not spending money if you dont have to.

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

      @@Meithighs Hi, thanks for this answer.
      I'm already using Visual Studio (not Code), and it lacks many of the little extras I see here. I'll try Rider ;)

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

      @@alexxkrehmen772 i use VS code, its nicer. Definately give either one a shot

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

    Exactly my process.
    ....
    My game never really finished...

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

    I got stuck while making a game for android, because my phone is too weak to run it at 60 fps and my physics breaks. Would you recommend just not having physics in Android games?

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

      Focus more on efficient code and performance in general. You're probably doing something wrong.
      Try to look under the hood, what your methods really do. Try to cache commonly used components, instead of using GetComponent frequently. Setup all the necessary states on the start of the app so it does not load stuff during the runtime. There is a lot of stuff to cover and it's hard to say, what exactly you do wrong. On the other hand, it wouldn't bad to look for some tutorials how to properly write code and how to optimize the game, how to use memory profiler and how to debug stuff like this so you are aware of what is exactly happening on the background. Good luck :)

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

      It's probably graphics, the first thing I used to on android is mess with graphic settings until it was 60fps in a basic scene. Unless your game is literally Ball Pit Simulator it should be good

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

      I released my game Glider Sim on Quest which is practically a mobile phone and it runs 90fps a second and has plenty of physics. Use mobile shaders, as the standard lit shaders are horrid in mobile. No realtime lights. And reduce draw calls by combining meshes.

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

      Have you tried profiling it on the device already? It could be something as simple as making some colliders static or toggling when they're used, or could be some other bit of code you didn't realize was running slow.

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

    Is there a specific reason why an underscore is used before the variables? Is it just to make it easier to read? :)

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

      Just to denote private fields with as little ceremony as possible. All the _ ones are private and the public ones are PascCase, while parameters and locals use camelCase. Mostly just preference though :)

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

      @@Unity3dCollege thanks for the informative response :D

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

    for the initial character class for the attack method I would likely rename the parameter to Character targetCharacter to denote a seperation between the current character and another, for example if the attack method also provided a leach like heal or provided a party buff, having to refactor the names is just an uneeded extra step

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

    very click bait tittle and I see this channel is all about making those marketing $$$
    just buy this $150 unity pack from description link haha
    and always start making a game with fully polished assets and animations. Practical advice right there

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

    Starting a game/ prototype is easy... its finishing and releasing a game that's hard. Do you have any games you have released? It's like another dev I interacted the other day claiming to have made hundreds of games. But then asked where I can download and play them. Silence lol.

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

      Lots, been a few years though, so I plan to finish this one up ive been working on and release it soon:)

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

    just learn sth about the animation event

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

    I do largely like your videos, but I'm not a fan of the click baity title and the like and subscribe requests, is there another way you can grow the channel that's a lil more human/authentic? (I'm still hitting like of course, I enjoyed watching you break down a problem, I would like to see this in long form )

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

      Unfortunately the normal thumbnails do terrible and ruin the videos performance. There are so many good videos that get destroyed by a normal thumbnail. It's my least favorite part of the process, but matter more than almost anything else when it comes to the algorithm

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

      @@Unity3dCollege i appreciate the honest response its a strange landscape to navigate :)

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

      It literally doesn't effect you. Stop crying

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

      @@BobrLovr i have empathy and want him to do well. Why you mad?

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

    I used to love your videos and passion, but this kind of clickbait just makes me sad, and frustrated that I've wasted another 15 minutes on a basics video. What GAME DEV SECRET STEPS are we witnessing here? Seriously, "Basic character animation and damage setup" would have been a more honest title.

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

    I got tired of you showing us the fake way you built video games in past videos.

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

    first

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

      lol remember when everyone used to do this?

    • @Unity3dCollege
      @Unity3dCollege  2 года назад +7

      yea now it's impossible to beat the spam bots to the first comment :)