Gino D's GIMP Scripts: https://sites.google.com/site/ginodonig/gimp-scripts
Overview
This script creates an image filled with a texture that represents a crossword grid featuring a random distribution of shaded cells.
It provides several options to define the characteristics of the pattern, making it possible to obtain styles and variants of crosswords that break with tradition, in the sense that the generated grids can be colorful, not symmetrical, oblong and so on.
Activating the script
Once installed, you can access this script in the image window menu through
"File -> Create -> Patterns -> Crossword Grid...".
Options
- Number of columns, Number of rows
-
Specify the horizontal and vertical size of the crossword grid as a number of cells in the corresponding direction.
Values can range from 8 to 32.
- Cell width, Cell height
-
Define the width and the height (in pixels) of every cell.
Values can range from 16 to 64.
- Color of lights
-
Sets the background color of the cells where the letters are to be written.
- Color of blocks
-
Sets the color of the shaded cells which separate the answers.
- Color of borders
-
Sets the color of the borders of cells and grid.
- Cell border thickness
-
Defines the thickness (in pixels) of the inner border of every cell.
Values can range from 0 to 4.
- Grid border thickness
-
Defines the thickness (in pixels) of the outer border of the whole grid.
Values can range from 0 to 16.
- Block margins
-
Controls the distance (in pixels) between the cell border and the edges of any block.
Values vary within a range of 0 to 16.
- Maximum answer length
-
Specifies the maximum allowed length for the answers.
Values can range from 8 to 32.
- Ensure 180-degree rotational symmetry
-
Checking this box will cause the crossword grid to appear the same if turned upside down.
- Add clue numbers
-
When activated, this checkbox causes the numbering of the cells in which the answers begin.
- Size of digit
-
As for the clue numbers, here you can specify the size of a single digit as a percentage of the cell height.
Values vary within a range of 25 to 50.
- Text color
-
Sets the color of the clue numbers.
- Font
-
Lets you select the font for rendering the clue numbers.
- Random behavior
-
With these options, you can influence the haphazard way the pattern will be generated, by selecting the method through which to obtain the random seed, that is the integer number which determines the randomness of the arrangement of the shaded cells in the crossword grid that is to be created. In general, different random seeds lead to different grids.
- Generate random seed automatically:
the random seed will be automatically and randomly generated.
- Retrieve last random seed used:
the random seed will remain the same as the last pattern created (namely the grid generated in the most recent execution of the script), so as to produce the same or a similar result in terms of distribution of the shaded cells.
- Specify random seed explicitly:
the random seed will have to be entered manually with the special slider and input box below.
- Specific random seed
-
Enables you to choose a specific random seed for the crossword grid to create, as long as "Random behavior" is set to the pertinent option.
Values vary within a range of 1 to 2147483646.
- Keep layers separate
-
By checking this box, you will obtain a multi-layer image, where each layer depicts a different element of the crossword grid (Background, Blocks, Clue Numbers, Cell Borders, Grid Border). This separation will give you the possibility to modify the content of any of such layers at a later time, by optionally filling them with a different color or even with a texture or a gradient.
The script also records a summary of the crossword grid's characteristics into the image comment of the generated pattern, where the script settings will be listed side by side with the corresponding specified values, as shown in the illustration below. Several file formats (XCF, PNG, JPEG, etc.) can save this information, on which it is handy to draw up when you want to reproduce all or some of the listed features on subsequent grids.
You can access the image comment from the image menubar through "Image -> Image Properties" by selecting the "Comments" tab.
Comments
Crossword Grid: version 1.02 available
RELEASE NOTES
grid numbering
hi gino
i am running windows vista and and 7 and have gimp 2.8 installed
i am trying to find a simple script that applies a small consective number to the top left hand corner in each cell in a gimp grid
can this script be used for that purpose? i noticed a limitation of 32 cells
this is too small for my application, which is to created a canvas grid that that can be used for stitch painting, that is to say, to show how to paint/stitch a given needlepoint design
many many thx for any feedback on this!!!!
Crossword Grid: version 1.01 available
_RELEASE NOTES_
Nice script!
Might make a nice addition to a website or web-magazine game area. :)
Hot Potato software used to make a puzzle creator like this that would add the clues.
Now that would be a nice addition to the script!
Thanks for your comment, Rod
Adding such functionality would be great, but at the same time I think it is something too difficult to implement through a script written in the Script-Fu language.
As you can imagine, indeed, if from the one hand it is relatively easy to update the script so as to optionally fill the empty cells (the lights) with random letters, from the other hand the task of arranging for those letters to form reasonable words has every appearance of being a much more advanced feature, since it would require a quite large thesaurus of available words as well as an algorythm to perfectly cross them each other within from time to time different grids.
Anyway, thanks for your comment and for recommending such a nice application, Hot potatoes, that I didn't know before now!
i don't think fill with
i don't think fill with random letters will be easy:
problem is the randomness, for computer seems not simple do something really random
In my opinion it is feasible
Tiny-Fu actually provides some functions (such as "random", "rand" and "random-next") aimed to generate random integer numbers, which can be used as indices for selecting individual letters stored inside a vector or a string containing the 26 letters of the latin alphabet.
Hence, I mean something like this:
(set! s "ABCDEFGHIJKLMNOPQRSTUVWXYZ")
(set! k (random 26))
(set! L (substring s k (+ k 1)))
where L will always return a random letter.