Designing Luck | How Loot Distributions Work

Поделиться
HTML-код
  • Опубликовано: 28 июн 2024
  • Getting an ultra rare, overpowered piece of loot in a video game is a super rewarding feeling that I'm sure most of you are familiar with. What even is a loot distribution? This video is the second "abstract" game devlog video, and goes over the mathematical underpinnings of weighted discrete probability distributions, and shows a surprisingly simple running sum based algorithm to implement it in code.
    Games shown, in order:
    Apex Legends - Playing on the Firing Range and with randoms in Season 6. Also opens with a loot tick unboxing.
    Risk of Rain - Shows random treasure being found, which uses a system like this
    A text version of this will be up on my website in a day or two, with other tutorials, game devlogs and interesting blog posts, at wintermutedigital.com
    What do you think of this video style? It's lots of motion graphics and abstract game design. Do you want to see more of this, or more focused devlog style things?
    Timestamps:
    0:00 - Intro
    0:35 - Video Overview
    0:54 - The Loot Pool, Tiers
    1:42 - The Loot Selection Mechanism
    2:08 - Absolute and Relative Probabilities
    3:45 - Hard Code Overview
    4:08 - Encoding Tiers
    4:19 - A Better Algorithm
    5:27 - Possible Extensions
    #gamedev #maths
  • КиноКино

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

  • @Sephta
    @Sephta 3 года назад +11

    This video is "should be convincing people to subscribe to the channel" levels of quality. Thank you!

  • @stealcase
    @stealcase 3 года назад +5

    I love the format, and I think it's the kind of content more serious indie devs are looking for, broken Down in a manageable way.
    It's a different niche than something like Brackeys, which I think will work in your favor over time.

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

    This video was super helpful and imformative! I would love more videos like these.

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

    Great video! Your explanations were easy to follow, I'd love to see more like this! :D

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

    This was insanely helpful! Thank you so much! Subscribed!

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

    Why is this video so good?!

  • @BOT-gx6qq
    @BOT-gx6qq 3 года назад

    really enjoying your videos

  • @RugbugRedfern
    @RugbugRedfern 3 года назад +17

    If you're using Unity, it would make more sense to use Enums instead of ints.

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

      That's true, enums would actually be a way better solution. I didn't think of that, thank you!

  • @hailelam4112
    @hailelam4112 10 месяцев назад

    Thank you so much

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

    For a text writeup of this tutorial, check out wintermutedigital.com/post/probcdf/, where you can find many other tutorials on Blender and Unity.

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

    "theres no need to optimize"
    tbh with the way computing power has gotten, you right XD

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

    Power level Over 9000! :D

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

    Nice video :D

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

    Nice vid. Would be great to see more math heavy videos!

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

      I'd love to do them but I think I'm not a very good math teacher haha - these videos get very little interest and take a lot of time, so it's hard to say. There's some more things I'd like to do, like a shuffling algorithm and some shader stuff, but again, it's a lot of work with little payoff. If you have any ideas as to how to make this more engaging, I'd love to hear them :)

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

      Yeah, math is not fency topic I know but really, really needed once people move past the simplest topics in Game Dev. Videos likes this hopefully makes them realize how important it is.
      Nowdays shadergraph is all the rage but tutorial videos coming out are mostly... I don't know what's the word - but plug this there, this here and watch magic happen is not very informative in the long run. I mean, yeah, I can get glow effect but would be better to know how and why I am getting this effect. Nobody explains what is happening. Since you clearly know your way around the shaders in depth video series about shaders, how they work, what they do and so forth would be very interesting to ride that shadergraph wave

  • @eddex.
    @eddex. 3 года назад +1

    I really like the animated text and graphs in this video, especially the point where you turned the pie chart into a line. What tool do you use to create such animations?

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

      Thank you! I use Blender to create these animations, and I have a pretty comprehensive set of tutorials on my RUclips channel regarding motion graphics in Blender, building on fundamentals to explain pretty much all the techniques used in this video. There are several small videos, but I made a 4 part series called the "Elements of Motion Graphics" which covers pretty much everything I know about motion graphics in Blender. Specifically, the pie chart to line animation is done using a simple shape key morph.

    • @eddex.
      @eddex. 3 года назад

      @@WintermuteDigital Thanks for the quick reply! I found your channel recently and haven't gone through your old content, will definitely check it out :)

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

      @@eddex. Sounds good :) I hope you find it useful!

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

      @@WintermuteDigital Your video is amazing! How did you render it?

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

    nice video

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

    In the method at 5:15, it seems to me that if p=8 you will return nothing, maybe use p

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

      Actually, I just thought about it and remembered, Unity's Random.Range(min,max) function calculates in a range of [min,max) / exclusive of max, inclusive of min, which I think is designed so that you can do Element = ArrayOfElements[0, ArrayOfElements.Length] without risking an out of bounds error, so it will never generate p=8.

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

      @@WintermuteDigital You're right about that if you were using INT type. The overload for FLOAT is inclusive of both min and max.
      Unity: docs.unity3d.com/ScriptReference/Random.Range.html
      Return a random float number between min [inclusive] and max [inclusive] (Read Only).

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

    hi