New (?) feature -- shuffling a 2D array

General discussion about ZunTzu in English.

Moderators: Ichibrothers, Cambronne

Post Reply
jwarrend
Posts: 12
Joined: 11 Feb 2008, 01:01
Location: USA

New (?) feature -- shuffling a 2D array

Post by jwarrend »

I don't know whether ZunTzu can already do this or not, but I haven't been able to figure it out yet so I'm assuming it can't -- please let me know if I'm wrong!

In some games (especially Euros), the board is made up with a grid of tiles (the most famous example is Settlers of Catan, but others include Lowenherz/Domaine, Tempus, and Attika). These are randomly placed at the start of the game, and therefore, the arrangement of tiles is different each time the game is played. To achieve this effect in Zun Tzu as it currently exists, you would have to place the tiles into a stack, shuffle them, and then manually place them into a grid arrangement. This is of course more or less how this is done in real life, and is not terribly tedious.

But, it would be really neat if you could instead place all the tiles in the arrangement you want them to have, and then "shuffle them in place", so that the tiles are rearranged but the overall pattern of tiles remains the same. (Probably, this would go hand-in-hand with "shift-clicking" to be able to select multiple objects simultaneously, which would also be a neat feature, by the way).

This might also be useful for a wargame in which the different territories have some property that is given by a randomly placed counter or chit.

I have no idea whether this would be easy or hard to implement, but I imagine it might work something like this:

-- Having selected the group of tiles, ZunTzu would know (a) which tiles are included in the arrangement and (b) a list of the all coordinates at which a tile should be placed.

-- Treat the selected tiles as a "virtual" stack, and shuffle them using the ordinary shuffling algorithm

-- Go down the list of coordinates and at each, place a tile from the "virtual" tile stack

This would give a nice way to expedite setup of games that include some sort of spatially randomized element.

-Jeff
User avatar
Jerome
Site Admin
Posts: 974
Joined: 22 Jun 2006, 21:31
Location: France
Contact:

Post by Jerome »

It's a good idea. On the other hand it is so smart that I'm not sure players will expect the feature to exist in the first place. :?
I've added the feature to the roadmap.
Jerome, ZunTzu developer.
jwarrend
Posts: 12
Joined: 11 Feb 2008, 01:01
Location: USA

Post by jwarrend »

As I thought about it more, it occurs to me that since you're essentially only modifying the counterID that goes with each set of coordinates, one could create a program independent of ZunTzu that would simply manipulate the text of the .ztg or .zts file directly; it would find the list of components you want to have randomly arranged, and then just shuffle around the counterIDs of the items in that list. You could thereby create multiple permutations of a given setup configuration without even opening ZunTzu. If the number of components to be rearranged is small, you could really even do this by hand.

If this was handled in ZunTzu directly, of course that would be even easier, but it's definitely a strength of the program that the game-box and .zts files are so easy to modify. That's one of the aspects that I really like, as it makes the program very user-friendly for new users. Again, I'm impressed by how well-thought-out the program is!

-Jeff
Post Reply