Next part on HashSets! kzbin.info/www/bejne/p5-vgod7ptiLqc0
@Pontypants3 жыл бұрын
Awesome series! :) Great for people like me who code as follows: ctrl+c, ctrl+v
@AnnisVeryGoodGames3 жыл бұрын
Thanks Ponty! :) I guess we're all living that pro coder life, no compromises!!
@vergilrose8514 ай бұрын
3 Years late but this helped me alot, thank you, very easy to understand
@SomeKrnDude2 жыл бұрын
As somebody with very little coding experience, this guide made it really easy to digest the definitions and usages. Thank you so much!
@ari1237310 ай бұрын
Very good video, the rookie programmer feels that he has learned very much, thank you for sharing and giving your time!
@tPlayerioT Жыл бұрын
i like how you skipped the cientific part (0:50) to tell us in a better way with visuals, very nice video!
@Karl_082 жыл бұрын
Wow, this is the best tutorial I have seen in this topic! Thank you so much!
@AnnisVeryGoodGames2 жыл бұрын
Thanks, great to hear!!
@AndrewGiacomoPinnical2 жыл бұрын
gosh this is an amazing tutorial, thank you so much for making this!
@bluecarrotrm2 жыл бұрын
This is an excellent video for beginners in data structures. Thank you very much for making it. A year is too late for praise but have a heap of it anyway.
@AnnisVeryGoodGames2 жыл бұрын
I'll take it anytime, thanks! :D Glad it helped you out.
@NamidaSai3 жыл бұрын
Great masterclass, you’ve got the perfect mix of edutainment going here. Good work!
@AnnisVeryGoodGames3 жыл бұрын
Thanks Sai! :)
@kayPlayz.2 жыл бұрын
happy to come on your channel
@mehmeh88833 жыл бұрын
Amazing stuff Anni!
@Aye_Sid2 жыл бұрын
Thanks for the awesome series Anni. U got a subscriber. 😀👍🏻
@paypercutts3 жыл бұрын
Nice and helpful for my own endeavors. Thank you. Also, very smart creating content to educate, which brings lots of new traffic and also incorporate your own game in there too. Keen for more!
@AnnisVeryGoodGames3 жыл бұрын
Great to hear! Yep, I didn’t really find a series like this, so why not try something new and make one! :)
2 жыл бұрын
Thanks for the tutorial Anni!
@lora69382 ай бұрын
I need to click on the button and create a public list that will be displayed in the inspector. Please help me!🙏🙏🙏
@bigofbig48842 жыл бұрын
thanks for simple explaining i think we need more of these :D
@Skeffles3 жыл бұрын
Brilliantly explained! I rarely find myself using arrays these days
@AnnisVeryGoodGames3 жыл бұрын
Thanks! Yes, chances are we're just wasting our time on unnecessary optimizations... ;P
@danielgalli67603 жыл бұрын
exactly what i was looking for thanks!!
@TREXYT2 жыл бұрын
Hey Anni, nice video, thanks for sharing. I want to know how can i get the layer order value of the last element in a List ? Thanks 😊
@stellarr1 Жыл бұрын
Love the Dark Souls references ;)
@SGUDevs Жыл бұрын
which method can allow you to create categorization and be customizable?
@kayPlayz.2 жыл бұрын
i need help , i have a situation that i am creating different lvls in same scene, that is i disable lvl 1 object from the hierarchy and enable in same position second lvl, and player after player collide with finish line it came back to starting position in lvl 2 . but i cant disable and enable objects after collison except 2 lvls and 3 lvl is not opening , i tired with loop and arrays but not working.
@David18basso2 жыл бұрын
Thank you for the class.
@happytofu53 жыл бұрын
Thank you! Very understandable and entertaining!
@TurderaTommy4332 жыл бұрын
hey htere how to use list , gameobect list of any type which derivates from an abstrac class? is it possible.
@AnnisVeryGoodGames2 жыл бұрын
Yes, if you want a list of GameObjects: List goList; Or if you want a list of items that all derive from the same (abstract) base class: List anotherList;
@TheHonestLee2 жыл бұрын
could someone explain this to me regarding Arrays: if we are making an array of type int, which is called highscores, why dont we start listing the content of the array after the "="? what's the point of writing "int[] highscores = new int[3]"? Are we making a new array? Can't we just do "int[] highscores = 3,5,7"?
@Aye_Sid2 жыл бұрын
In C# we have to write new keyword to declare an array.
@nacs3 жыл бұрын
Nicely presented 👍
@AnnisVeryGoodGames3 жыл бұрын
Cheers! :)
@zigglyDev3 жыл бұрын
Yo you are great teacher. But I'm little dumb for programming. Great video. 👍
@doombruh47753 жыл бұрын
Love your video awesome content;!
@DanceDarkCore3 жыл бұрын
Hello .. from now i will follow your video because it is awesome Love from India🇮🇳🇮🇳
@WhiteNorthStar1 Жыл бұрын
LOL... so useful (and funny!)
@Soulzjd23 жыл бұрын
@0:48 I actually kind of like the idea of an autobook for computer books. Then again I'm a nerd who dislikes reading.
@watercat12482 жыл бұрын
is eny Data Structures that contain more the one verble for each off the elements the have im tried to create an inventory system and I want data for each off my elements for example if use array or list the contains only one type off elements for each type for example i array with game objects each off my Data Structures need to have more the one Data for example to include name off the ,item, text,icon etc otherwise if ther is no way to do that i will need to follow one off thos method 1. use the same code multiple times that contained all the verbles in public 2. use 2 array or more and to makes sure that in the code the Mach both element for both arrays that both of those methods is kind off tedious
@AnnisVeryGoodGames2 жыл бұрын
Check out my video on dictionaries, it's part 3 of this series and should have what you need. :)
@CyberAngel673 жыл бұрын
Posting my comment here because you only make mention of it here, and not in the Dictionary Video. At the 35 sec mark, you have stated that a Dictionary lookup is O(1), which is farthest from the truth that you think. Under the hood, a dictionary uses a for loop and other things to look this key up. The fact that it loops over the dictionary data, makes it an O(n) lookup. And FYI, if you actually do a two-dimensional array with the first being the key and the second being the value, and do a for loop over both arrays. To get to the last item in both scenarios, the two dimensional Array is faster by a significant amount than what a dictionary is to get the last item out of the dictionary. Sorry, as much as I love your videos, this small bit of information is important!
@AnnisVeryGoodGames3 жыл бұрын
Hi! Thanks for your comment! However, you're wrong. :) A dictionary lookup is not O(n). For a lookup, a hash code is computed from the lookup key using a so-called hash function. The resulting hash represents the address of the Dictionary entry, so no looping is required. I have a suspicion that you may have looked at the internal implementation (which is a great idea in general!) but are confusing something. As you can see, a loop is still necessary. However, it loops over all the items in the _bucket_ (not in the Dict overall!) that the computed hash points to. Such a bucket may contain multiple Dictionary entries in case of hash collisions. A hash collision occurs when multiple Dictionary keys result in the same hash code when used as input for the hash function. A decent Dictionary implementation will try to minimize such hash collisions (it's a space vs. runtime tradeoff), avoiding buckets that hold many entries. By the way, this is also why there is no "last item" in a Dictionary; it is not an ordered data structure. Another option is that you're misunderstanding Big-O notation: A loop does not automatically make something a linear-time O(n) computation. The runtime of the for loop has to increase linearly with the number of items in the data structure, which is not the case in the C# Dictionary implementation. Also check out the Microsoft documentation for Dictionary lookups. It says: "This method approaches an O(1) operation." That said, in some scenarios, arrays or lists MAY still provide faster real world lookup speeds than Dictionaries or HashSets. There are many determining parameters: Size of your collection, access patterns in code, your hardware (cache size), effects from cache locality, computation speed of the hash function, etc. (I think I mention this somewhere in Part 4 of the series.) If you truly need to optimize runtimes at this level of your code, the best way to go about it is typically to run benchmarks for your exact use case. Performance optimization is hard. Lastly, while a two-dimensional array may work as you suggest (I haven't checked), I believe it's typically going to be a bad idea to prefer such a home-baked construct over library data structures, especially for beginners, who this video series is directed at. I mention the reasons somewhere in the videos: better readability, fewer bugs, more time to spend on what you're actually trying to do, and, importantly, a beginner likely (and luckily, haha) has absolutely no need to optimize at this level (yet). Phew, long response. Happy new year and let me know if I missed something!
@CyberAngel673 жыл бұрын
@@AnnisVeryGoodGames Then I suggest you time it, and grab a value from various positions and see what the difference is. If it is O(1) the time it takes to grab the value based on the ky should be the same. Or, you simply could go to the source code for a Dictionary and see exactly where they do a for loop to grab the value based on a key! That by definition makes it O(n)
@bhanukadasanayaka34573 жыл бұрын
How to access list in another Script and store it? Like, If I store Transforms of houses in list in one script. And other script, i want to access only one house in that list and store it transform to new variable in this script
@AnnisVeryGoodGames3 жыл бұрын
The best way to do it might depend on your exact use case, but if the script with the list is attached to a game object called "go", and if the class in that script is called "HouseList", to access the list "houseTransforms" within: go.GetComponent().houseTransforms; Good luck!