Crossword and Sudoku with Inkscape

Discussion about writing code for Inkscape.
desmovalvo
Posts: 8
Joined: Sun Jan 06, 2013 2:27 am
Location: Italy (Bologna/Lecce)

Crossword and Sudoku with Inkscape

Postby desmovalvo » Tue Jan 08, 2013 6:19 pm

Hello *,
I wrote two little python extensions for Inkscape to create grids for crossword and sudoku.

At the moment crossword allows to create free schema crosswords, no schema crosswords, syllabic crosswords. It can also choose randomly which cells must be black if the user does not specify his preferences. The user can also specify help letters that will be inserted into the grid. You can find it here

The sudoku extension supports: - Sudoku - Mini Sudoku - Sudoku X - Hyper Sudoku - Sudoku Samurai. You can find it here.

On the italian forum these extensions received positive feedbacks; thanks to the users' advices the plugin are now much better than the first draft.
Their source code is still ugly and messy, I'll clean it as soon as possible, however at the moment they work quite well (I think). They are released under GPL v3. I hope you'll like them and I hope this is the right section to post about them. Feel free to suggest me improvements! ;)

Best regards,
Fabio

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Crossword and Sudoku with Inkscape

Postby brynn » Wed Jan 09, 2013 3:28 am

Hi Fabio,
I look forward to trying these out! I'm a little unclear about the state of development. It sounds like they might be ready to use now, even though you plan to "clean them" later. But when I follow the links, I don't see any files to download. Do we have to compile, or something like that? Or could you provide instructions for adding the extensions to our current copies of Inkscape?

If it's still under development, this subforum is a good place to have this posted. But once they are finished, you should put a topic in Inkscape Resources subforum. I can move this one, if you like.

desmovalvo
Posts: 8
Joined: Sun Jan 06, 2013 2:27 am
Location: Italy (Bologna/Lecce)

Re: Crossword and Sudoku with Inkscape

Postby desmovalvo » Wed Jan 09, 2013 4:28 am

Hi brynn! They are ready to use. You only have to go the the google code projects, click on the source tab, then click on browse and download them. They are composed by two files: an .inx file and a .py file. Simply copy those files into the extensions folder and you're ready to try them!

If you need other informations don't esitate to contact me ;)

Thank you,
best regards,
Fabio!

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Crossword and Sudoku with Inkscape

Postby brynn » Wed Jan 09, 2013 6:50 am

By "copy the files" do you mean where it says Download: zip? Because I don't have any Copy options for the files. Or do you mean copy all the code?

And then do I put in Inkscape/share/extensions? Or Inkscape/plugins?

Oh wait, I think I've got them...

Edit
Nope, false alarm.. I do show the files in Inkscape/share/extensions. But they don't show up in Inkscape window. Maybe I should restart the computer?

desmovalvo
Posts: 8
Joined: Sun Jan 06, 2013 2:27 am
Location: Italy (Bologna/Lecce)

Re: Crossword and Sudoku with Inkscape

Postby desmovalvo » Wed Jan 09, 2013 7:58 am

Procedure for the installation of inkscape-sudoku:
- go to google code page
- you'll see the bar with "project home", "downloads", "wiki" etc.. Go to "Source", click then on the "Browse" button below
- click on "download zip"
- once the download is completed, you have to open the zip file, and copy the .inx and .py in your extensions directory. ONLY the .ink and .py, NOT the folder of those two files.

The same procedure should be followed for inkscape-crossword.

Let me know if it works. Maybe you copied the whole folder instead of the two files. However tomorrow I'll manage the google code pages to put the files in the "Download" section. At the moment you are downloading the extensions from "Source"->"Browse" and this is the "git" section, the section dedicated to the developers.

If you need more help, ask me any time! ;)
Fabio

User avatar
flamingolady
Posts: 687
Joined: Wed Jun 10, 2009 1:40 pm

Re: Crossword and Sudoku with Inkscape

Postby flamingolady » Wed Jan 09, 2013 2:28 pm

First, good idea!
I also had tried (after reading only the first post) too, and couldn't find the place to download. It'd be so much easier to put a link to the direct page that contains the file to download. Haven't had the time to go back and try again, however, I have no idea on how to mess with installing .inx or .py files, so would need step by step directions (and I have a feeling I'm not the only one who doesn't get it).
So, if you have the time to post step by step directions, that'd be great. I'd love to upload the crossword puzzle maker especially- I love this idea! I'm an avid crossword puzzle do'er.
thanks.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Crossword and Sudoku with Inkscape

Postby brynn » Wed Jan 09, 2013 5:00 pm

Using Firefox (if it matters) I clicked on Download zip. They go into Firefox's download folder. Then I extracted to Inkscape/share/extensions. Shouldn't that work? I haven't tried restarting yet.

desmovalvo
Posts: 8
Joined: Sun Jan 06, 2013 2:27 am
Location: Italy (Bologna/Lecce)

Re: Crossword and Sudoku with Inkscape

Postby desmovalvo » Wed Jan 09, 2013 11:38 pm

Now I updated the google code pages. You can find the files in the download sections. However these are the direct links:
* inkscape-sudoku-0.1.zip
* inkscape-crossword-0.1.zip

Hope this helps.
Fabio

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Crossword and Sudoku with Inkscape

Postby brynn » Thu Jan 10, 2013 1:41 pm

I've restarted now. And I can confirm that only the .inx and .py files are there. Technically, it's like this Inkscape/share/extensions/inkscape-suduko-a5aa299751ef/suduko-grid.inx and same path for sudoku-grid.py. But it's not showing up anywhere in the Extensions menu. I'm on Windows 7, 64-bit, and now with Inkscape 0.48.4.

desmovalvo
Posts: 8
Joined: Sun Jan 06, 2013 2:27 am
Location: Italy (Bologna/Lecce)

Re: Crossword and Sudoku with Inkscape

Postby desmovalvo » Fri Jan 25, 2013 6:51 pm

Ehi guys... Did you tried it? :)

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Crossword and Sudoku with Inkscape

Postby brynn » Sun Jan 27, 2013 9:20 am

Yes, I finally got it working -- only to realize the extension only creates the grids. It doesn't give you games that are ready to play, which is what I thought it would be. It there some place you can go, to get the numbers (or icons or colors, or whatever you want to use) that will actually work for a realistic game? I mean, you can't just place numbers in there randomly. You have to have a set or configuration of numbers that will work.

Like for example, if I wanted to make games to put on my website, for visitors to play, I would need the right numbers to go in the right cells. And I would need some kind of script to automate the game.

And of course, it wouldn't be any fun playing a game in which I had personally configured the numbers, because I might remember where they are, and it would be like cheating. Couldn't an Inkscape extension be made which would program the correct configuration of numbers, and generate random games, that are ready to play?

My only suggestion for the sudoku grids, is that they be combined and/or grouped, so they are a whole unit that you can move around. Although since I don't understand exactly how the next step happens, the programming of the numbers, and the automation of the game board, I guess it's possible that it might be better to have the cells separate for that process.

I guess I have more to learn, if I want to make games that are ready to play :D

desmovalvo
Posts: 8
Joined: Sun Jan 06, 2013 2:27 am
Location: Italy (Bologna/Lecce)

Re: Crossword and Sudoku with Inkscape

Postby desmovalvo » Sun Jan 27, 2013 6:47 pm

Ok, I'll keep in mind your suggestion. As soon as possible I'll work on the code to improve it ;) I created an extension to build grids because I needed it :D But if you need it also to generate the numbers... I'll try to implement this feature :D

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Crossword and Sudoku with Inkscape

Postby brynn » Mon Jan 28, 2013 1:19 am

Well, that would be great! However, I would hate for you to go to all that trouble, if there already exists ways of providing the configuration of numbers that make the puzzle work. I'm still very early in learning how to make websites. And making an interactive game, is way beyond my understanding at the moment. Well, I understand the general idea, but I don't understand the specifics. I mean, it's one thing to have a set of numbers which I could pre-program into the grid. But then there's the thing of making it interactive -- you know....I think it's something like "onmouseover" or "onclick" like in a script.

Ok, in other words, if I wanted to put a suduko (ACK -- and I can spell it right more often than I can say it right!) game on my website for visitors to play, or to just produce a game that I could play myself, how do I use the grids that Inkscape creates, to reach those goals. Same with the crosswords. I've always wondered how crossword puzzles are made. But there must be scripts that can spit them out. Then newspapers or websites just have to print the grid and the definitions.

Sorry, I guess I've been on a marathon internet session :shock: :lol: . Here's the clear question: How do I get from your grids to a game that's ready to play?

And the clear qualifying comment: If there already exists some way to use your grids and attach scripts or whatever else is needed to make it a game ready to play; then I wouldn't want you to waste your time "reinventing the wheel" as they say. Unless you're just interested in the learning process. But if there is some way to do it already, could you tell me how?

Thanks :D

nacind
Posts: 1
Joined: Fri Aug 09, 2013 1:51 am

Re: Crossword and Sudoku with Inkscape

Postby nacind » Fri Aug 09, 2013 1:58 am

I'm having the opposite issue as brynn. I have tons of puzzles I've created on paper, I just need to learn the computer stuff so that I can make them on the computer using inkscape. I think I saved your files in the right extension folder: inkscape/share/extensions but what do I do when I boot up inkscape? I'm guessing to go to the extensions tab to start, but there wasn't any option there to access your program and create a sudoku grid. I love puzzle writing, but my computer skills are not so great.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 5 guests