Page 1 of 1

Shuffling unmovable components

Posted: Sat Mar 12, 2016 11:46 am
by bowieb
Is it a bug that I can select a bunch of unmovable components and shuffle, stack, or stagger them?

I would expect to see an error message if there are any unmovable components in the selection when I give those commands. The other possibility would be to automatically de-select any unmovable components before doing the shuffle/stack/stagger operation -- although this would be a bit less transparent to the user.

One useful optimization may be to automatically do a "Shuffle Locations" operation instead of "Stack & Shuffle" for <Shift>-S if all the components in the selection are unmovable.

My preference for the <Shift>-S hotkey (and "Stack & Shuffle" menu option) would be this:

1) If all components are movable, do a Stack & Shuffle.
2) If all components are unmovable, do a Shuffle Locations.
3) If there are movable and unmovable components in the selection, give an error message.

Not a big deal. I just happened to come across this by accident (well, more of an "I wonder what would happen if...") and thought I would mention it.

Re: Shuffling unmovable components

Posted: Sat Mar 12, 2016 5:01 pm
by heruca
bowieb wrote:Is it a bug that I can select a bunch of unmovable components and shuffle, stack, or stagger them?
Not so much a bug as the fact that I forgot to add code to handle those situations. I'd have to give some thought as to how it should be handled. Just because something is not meant to be moved doesn't mean it's not intended to be shuffled. Might be a good way to handle a chit-pull mechanic where the chits are immediately returned to the chit pool.

Some of the things you propose sound a bit counter-intuitive. For shuffle locations, I'd rather add a means to easily select the entire group of cards to be shuffled ("Save Selection" and "Load Selection"?).

Re: Shuffling unmovable components

Posted: Sat Mar 12, 2016 6:19 pm
by bowieb
I'm not quite sure how that would work as a chit-pull. You would have to select multiple chits and the stack command (as I understand it) would stack them on the location of the bottom-most chit. Since it is not always immediately obvious which of the scattered chits would be on bottom, this would result in a somewhat random location for the stack. It seems like this would work better with a new "Return to Home" mechanism. Define a home location for a set of objects and then you can return them back to that location with a single command. (Assuming I am correctly understanding what you mean by "chit-pull")

I don't see what is counter-intuitive about my suggestion. If you select a bunch of things that are not supposed to move and tell them to shuffle, it makes perfect sense to me that they would do a shuffle locations instead of stacking up.

Re: Shuffling unmovable components

Posted: Sat Mar 12, 2016 7:44 pm
by heruca
I meant that if you had an already stacked pile of chits, the shuffle feature could bring a random one to the top (the chosen chit). The location of the stack is static, not random.

Re: Shuffling unmovable components

Posted: Sun Mar 13, 2016 8:50 am
by bowieb
Right, but that's just the standard shuffle routine. It's irrelevant whether they are unmovable. The stack and shuffle or the shuffle locations would produce the same result (depending on the implementation).

Re: Shuffling unmovable components

Posted: Tue Mar 15, 2016 10:02 pm
by heruca
bowieb wrote:My preference for the <Shift>-S hotkey (and "Stack & Shuffle" menu option) would be this:

1) If all components are movable, do a Stack & Shuffle.
2) If all components are unmovable, do a Shuffle Locations.
3) If there are movable and unmovable components in the selection, give an error message.
Implemented for the next release of BGE.