I’ve been thinking about how to do random encounters as part of Get Thee To The Bunker. Ideally, and in the grand tradition, different areas have different monsters and some will happen more often than others. I was trying to figure out how to do this and I think I came up with a half assed solution.
I prefer Ruby for quickly testing out ideas. So that’s what I did.
I’m sure this is sloppy as hell, but it certainly gets the job done. There are some other considerations, but this solves the primary problem of weighted random selection.
After doing this I found this in the Unity documentation. I guess I’ll look into that as I go forward.