Suggestions on how to create a card layout generator?

Started by
1 comment, last by LorenzoGatti 4 years, 4 months ago

Hello! Can anyone point me out how to generate a card position layout like the picture?
As you can see, the layouts follow a pattern.
From my side, I'm currently generating random values between a min and a max limit that give a non-uniform result.
I'm wondering if there is a better approach.

Thanks!

SGH E11 _ 15 = Harvesting Wheat. _D (Solitaire Grand Harvest) 1-51 screenshot (1).png

Advertisement

If you create a mockup in a vector graphics editor you can extract all relevant positions, sizes, offsets, rotations, scaling factors etc. from SVG files to reproduce the same layout in code.

For example, for the layout in the top right of the picture you need the height and width of one card (they're all identical), the horizontal and vertical spacing between card rows and columns, and the vertical and horizontal margins between the enclosing space and the cards (probably the position of the "first" card).

Omae Wa Mou Shindeiru

This topic is closed to new replies.

Advertisement