Efficient way of distributing items

General discussion about LÖVE, Lua, game development, puns, and unicorns.
User avatar
Party member
Posts: 3141
Joined: Sun Oct 18, 2015 2:58 pm

Re: Efficient way of distributing items

Post by pgimeno »

It's actually the OP who posted an example that used accumulated weights. I think milon just translated that code so that the same weights came from a table instead of a chain of if's. From that point of view, the choice of wording, "rarity", wasn't too good.
User avatar
Party member
Posts: 909
Joined: Thu Dec 10, 2020 1:57 am

Re: Efficient way of distributing items

Post by Gunroar:Cannon() »

milon wrote: Thu Aug 04, 2022 6:01 pm. That's the general idea behind weighted randoms. Does that help clarify?
Yeah, that makes it clearer.
The risk I took was calculated,
but man, am I bad at math.

-How to be saved and born again :huh:
Post Reply

Who is online

Users browsing this forum: No registered users and 35 guests