Advanced RANDOM functions/techniques

BlitzMax Forums/BlitzMax Beginners Area/Advanced RANDOM functions/techniques

I like your solution to #1, and actually thought about something like this after my original post - was remembering how I did my shuffle cards function years ago, and that the same logic could apply here (shuffle deck of cards, then select the first 3 - same effect that I'm looking for now).

With #2, I basically don't want any restrictions - boxes COULD be all in one corner of the screen, COULD be in logical "rows", or COULD be spaced evenly around the screen - just that they cannot overlap... I was toying around with the idea that after each box is added to the screen, the pixels it covers are no longer "available" (thusly I would have needed to previously create a array of available pixels) - then when I go to create a new box I simply check to see if it intends on consuming any unavailable pixels. If so, re-randomize. This prevents the need to enumerate the checks amongst all previously created objects, but still could end in an infinite loop - I guess to tackle this I could simply count the number of attempts - if over 100 then break and consider the fact that we cannot create any further boxes... seems like a viable compromise...