Page 1 of 2 12 LastLast
Results 1 to 40 of 60

Thread: [RESOLVED] Crossword Generator?

  1. #1

    Thread Starter
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,143

    Resolved [RESOLVED] Crossword Generator?

    Anyone know of a crossword generator written in VB6? Ya know, given a list of words, create the puzzle?
    Sam I am (as well as Confused at times).

  2. #2
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Crossword Generator?

    Isn't the hard part devising clever descriptions that don't give the word away too easily?

  3. #3

    Thread Starter
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,143

    Re: Crossword Generator?

    Hee Hee....yeah, but that's MY part. No, the HARD part is to write the algorithms to decide where to put words into the crossword type configuration/display. IOW, if I were to 'steal/borrow' someone else's code for generating the puzzle (plenty of on-line sites do this (as I am sure you know)), then I can write the 'rest' of the program including a database of words and 'clues'.

    I guess there used to be one at PSC, but as that site is down, not sure who might have captured that program in years past.

    I guess also that if I were to THINK long enough (already in twilight years, so don't know if I have enough time!!!!), I could probably design my own.

    Sam
    Sam I am (as well as Confused at times).

  4. #4
    Fanatic Member
    Join Date
    Jun 2019
    Posts
    557

    Re: Crossword Generator?

    PSC submissions repositories on GitHub:
    https://github.com/Planet-Source-Code

    Search returned following repo:
    https://github.com/Planet-Source-Cod...ogram__1-52500

  5. #5

    Thread Starter
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,143

    Re: Crossword Generator?

    Thx Pete....that submission is fine, but it is still 'manual' (I can easily do something similar), but what I am looking for is an 'automatic', per se, routine which will take a list of words and generate the puzzle.

    Probably doesn't exist, so will probably continue as I am doing, making my own 'manually edited' puzzles.
    Sam I am (as well as Confused at times).

  6. #6
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    5,871

    Re: Crossword Generator?

    Maybe this can give you an head start:
    https://stackoverflow.com/questions/...te-a-crossword

  7. #7
    Fanatic Member
    Join Date
    Jun 2019
    Posts
    557

    Re: Crossword Generator?

    I only did a search on the PSC repos on GitHub and haven't checked what it does.

    Long time ago some friends were trying to create automatic generator where few words are set on specific positions (initial state) and the generator fills the rest, but don't have any memories if they finished or not.

    There are some crossword generator repos on GitHub but are written in other languages:
    https://github.com/search?q=crossword

  8. #8

    Thread Starter
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,143

    Re: Crossword Generator?

    Quote Originally Posted by Arnoutdv View Post
    Maybe this can give you an head start:
    https://stackoverflow.com/questions/...te-a-crossword
    Argh....my mind now hurts!

    I suppose those suggestions do work (for the younger crowd)...may give some more consideration to their responses after my head stops swirling!

    Thx Arnoutdv
    Sam I am (as well as Confused at times).

  9. #9
    New Member jeremiahquellette's Avatar
    Join Date
    Jan 2022
    Posts
    1

    Re: Crossword Generator?

    Do you need a crossword puzzle generator for some quest? Once upon a time, I was one of the organizers of holiday quests, and I often had to come up with crossword puzzles with complex questions and draw them on giant posters. People were often surprised by my questions. Now I don't work there, but I continue to do crossword puzzles. It relaxes me, but it also keeps me from getting dumbed down.
    Last edited by Shaggy Hiker; Jan 10th, 2022 at 01:43 PM. Reason: Removed broken link.

  10. #10
    Lively Member
    Join Date
    Mar 2015
    Posts
    104

    Re: Crossword Generator?

    The Delphi for Fun Website has a good Wordsearch/Crossword Program with sourcecode and executable.
    Would be nice to convert it to VB6.

    You supply the words and then it automatically places the words.

    It's here: http://delphiforfun.org/programs/crosswordgen0.htm

  11. #11
    Lively Member vbLewis's Avatar
    Join Date
    Feb 2009
    Location
    USA
    Posts
    126

    Re: Crossword Generator?

    Here is a little something I threw together for fun. It generates puzzles, crappy puzzles, but useable. Maybe you can fiddle with it and make it better.

    some notes:

    1) results are skewed towards Down, havent figured out yet why.

    2) Interface is basic because I didnt want to add any dependencies

    3) not all words are usually solved, could be improved

    4) sometimes you get results like R|O|B|I|N|U|T|H|A|T|C|H which is probably not desirable

    5) Interface doesnt spring to puzzle size if it expands past 15 rows, to lazy to add the code

    6) the framework for harder puzzles is laid but only across and down are fully implemented

    7) check and reveal arent done

    any questions just ask

    regards, Lewis

    Name:  ss.jpg
Views: 1166
Size:  56.0 KB
    Last edited by vbLewis; Jan 30th, 2022 at 09:42 AM. Reason: deleted old code see new update below

  12. #12
    Lively Member vbLewis's Avatar
    Join Date
    Feb 2009
    Location
    USA
    Posts
    126

    Re: Crossword Generator?

    Ive done a lot more work on this Puzzle Generator and im fairly happy with the puzzles it now produces. Results are spread more evenly Across and Down.

    1) added resizing code, form now springs/resizes to the puzzle size
    2) you can now scroll manually though generated puzzles
    3) added a print preview form to nicely print the puzzle to paper
    4) generating engine is alot smarter and does a pretty good job
    5) fixed several bugs
    6) finished all the code needed to reveal and check letters, words, puzzle
    7) you can now see what percent of the puzzle you have solved and it informs you when you have completed
    8) added highlighting code for when you click on a clue or puzzle text box
    9) the only thing left to do is finish code for harder difficulties (only across and down currently)

    Im considering submitting this to the codebank and would love some feed back

    Name:  ss2.jpg
Views: 1107
Size:  65.2 KB
    Name:  ss3.jpg
Views: 1091
Size:  93.1 KB
    Last edited by vbLewis; Jan 30th, 2022 at 09:41 AM.

  13. #13

    Thread Starter
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,143

    Re: Crossword Generator?

    Not bad work...(and it seems like quite a bit)...thanks for posting it.

    BUT, it does lack 'true' crossword rules...like, in your example, after you put in 1 Down, and then 2 Across...you have on the top row, the first letter of 1 Down right next to the first letter of 2 Across. This is repeated several times in your puzzle. A true crossword puzzle would have an unused square to the right of square 1, and 2 Across would start on the third square....OR, there would be a 1 Across as well as a 1 Down.

    Also, your two lists should be sorted numerically.

    But, like a said...good job (so far). I'd wait a bit to put in codebank (as a finished product anyway), until it more resembles a true crossword puzzle.

    Sammi
    Sam I am (as well as Confused at times).

  14. #14
    Lively Member vbLewis's Avatar
    Join Date
    Feb 2009
    Location
    USA
    Posts
    126

    Re: Crossword Generator?

    Thanks for your feedback, Sam.

    If you cant tell, I am a total newb when it comes to crossword puzzles, so even though ive done a little research the exact rules on what makes a good crossword puzzle are unknown to me.

    Do you have any more ideas or suggestions on what can make it better?

    I have added complete word highlighting now when you select a starting point of a word, clue lists are sorted, and a few more puzzles.

    I will have to do a little more work on the rule you mentioned.

    Edit: Does this seem like the correct rule?
    For a vertical word, a horizontal word cannot start anywhere above or to the right of its starting point,
    a vertical word cannot start below it...
    For a horizontal word a vertical word cannot start below or behind it, a horizontal word cannot start after it


    Thanks
    Lewis

    Name:  ss4.jpg
Views: 1210
Size:  49.9 KB
    Last edited by vbLewis; Jan 24th, 2022 at 05:18 AM.

  15. #15

    Thread Starter
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,143

    Re: Crossword Generator?

    Well, let's see if I can answer your questions.

    First, here is an example of a puzzle I am used to...

    Name:  xwordpuzzleex.JPG
Views: 1200
Size:  45.6 KB

    At the end of every word, either across or down, an EMPTY (black) square must appear.
    There can be no non-word created by adjacent (side-to-side nor up-and-down)...in other words, every set of letters (2 or more) MUST be a word itself.

    I think that may be the 'rules' that make sense.

    PS-when I did a new 'clu file (copied your Birds one and made up my own clues), several words did not fit, meaning that some words started in the middle of another word, and was not the correct letter, causing the first word to be incorrect.

    If you can actually do a puzzle like the one attached, I think that WOULD be a GREAT Code-Bank entry!!!!!

    Thank you for the time you are devoting to this challenge.

    Sam
    Sam I am (as well as Confused at times).

  16. #16

    Thread Starter
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,143

    Re: Crossword Generator?

    Okay....I just 'solved' that crossword puzzle above (all except one 13-letter word (14 Across)----maybe someone else can finish this (also check my other 'answers')).

    I hope this explains the 'rules' a bit better.

    Sam
    Attached Images Attached Images  
    Sam I am (as well as Confused at times).

  17. #17

    Thread Starter
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,143

    Re: Crossword Generator?

    Also notice how each clue has the length of the word in parentheses. Helpful.
    Sam I am (as well as Confused at times).

  18. #18
    PowerPoster Zvoni's Avatar
    Join Date
    Sep 2012
    Location
    To the moon and then left
    Posts
    4,414

    Re: Crossword Generator?

    14 across: "Brainstorming"
    :-)

    12 Down: wth is "Racketing"?? (For "Translation, a performance") --> would have tried "Rendition"
    Last edited by Zvoni; Jan 24th, 2022 at 08:11 AM.
    Last edited by Zvoni; Tomorrow at 31:69 PM.
    ----------------------------------------------------------------------------------------

    One System to rule them all, One Code to find them,
    One IDE to bring them all, and to the Framework bind them,
    in the Land of Redmond, where the Windows lie
    ---------------------------------------------------------------------------------
    People call me crazy because i'm jumping out of perfectly fine airplanes.
    ---------------------------------------------------------------------------------
    Code is like a joke: If you have to explain it, it's bad

  19. #19

    Thread Starter
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,143

    Re: Crossword Generator?

    AHHHH!!!...Thx Z!!!!

    EIDT: Hmmm...then what are 18 and 24 across...will not fit with RENDITION for 12 Down?
    Sam I am (as well as Confused at times).

  20. #20

    Thread Starter
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,143

    Re: Crossword Generator?

    Got it...instead of REDITION...RENDERING...it fits right!

    Thx for Brainstorming!
    Sam I am (as well as Confused at times).

  21. #21
    PowerPoster Zvoni's Avatar
    Join Date
    Sep 2012
    Location
    To the moon and then left
    Posts
    4,414

    Re: Crossword Generator?

    Quote Originally Posted by SamOscarBrown View Post
    AHHHH!!!...Thx Z!!!!

    EIDT: Hmmm...then what are 18 and 24 across...will not fit with RENDITION for 12 Down?
    Yeah, saw those, too, but .... "Racketing"? Seriously?? *lol*

    EDIT: Ahhhh.... "Rendering"... at least i was close... *lol*
    Last edited by Zvoni; Tomorrow at 31:69 PM.
    ----------------------------------------------------------------------------------------

    One System to rule them all, One Code to find them,
    One IDE to bring them all, and to the Framework bind them,
    in the Land of Redmond, where the Windows lie
    ---------------------------------------------------------------------------------
    People call me crazy because i'm jumping out of perfectly fine airplanes.
    ---------------------------------------------------------------------------------
    Code is like a joke: If you have to explain it, it's bad

  22. #22

    Thread Starter
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,143

    Re: Crossword Generator?

    So, Z...can you help vbLewis with some 'rules' guidance...not sure if my explanation and the images say it all for a coder.

    Sammi
    Sam I am (as well as Confused at times).

  23. #23
    PowerPoster Zvoni's Avatar
    Join Date
    Sep 2012
    Location
    To the moon and then left
    Posts
    4,414

    Re: Crossword Generator?

    Quote Originally Posted by SamOscarBrown View Post
    So, Z...can you help vbLewis with some 'rules' guidance...not sure if my explanation and the images say it all for a coder.

    Sammi
    Not really. Never was an avid "Crossworder", so i wouldn't even know the rules implied there.
    Last edited by Zvoni; Tomorrow at 31:69 PM.
    ----------------------------------------------------------------------------------------

    One System to rule them all, One Code to find them,
    One IDE to bring them all, and to the Framework bind them,
    in the Land of Redmond, where the Windows lie
    ---------------------------------------------------------------------------------
    People call me crazy because i'm jumping out of perfectly fine airplanes.
    ---------------------------------------------------------------------------------
    Code is like a joke: If you have to explain it, it's bad

  24. #24

    Thread Starter
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,143

    Re: Crossword Generator?

    Roger! Thx.

    vbL....
    1. Each NUMBER you see represents the start of a new word.
    2. At the end of each word, a blank space (I'll refer to these blackened/darkened squares as 'blank spaces') is required
    3. Blank spaces are required where there are no letters from any words
    4. A number can be the start of an Across word as well as a Down word (see #5 in the puzzle)
    5. Letters from Across words can be a part of Down words where they intersect (Hence the name of these types of games is 'Crosswords')
    6. Include in the clue both the Number as well as the number of words in the clue--like: 8 Skin Mark (4)
    Sam I am (as well as Confused at times).

  25. #25
    Lively Member vbLewis's Avatar
    Join Date
    Feb 2009
    Location
    USA
    Posts
    126

    Re: Crossword Generator?

    Hi Sam,
    This looks like a British style grid, as far as i know there are 2 main styles, American and British. I will try to work on being able to generate both kinds.
    more info here: https://www.edinformatics.com/invent...ord_puzzle.htm

    I have found personally playing with the number of rows allowed and generating larger amounts seems to get better results.
    Also scrolling manually through the generated puzzles allows to pick a better choice than the generator picked.

    Your feedback has been invaluable, and will help me alot. I have posted the latest source below with some new clue files if you wish to play around with it.

    I have added the length of the word to the clues...
    I will post again when i have made more progress.

    Thanks for your feedback
    Last edited by vbLewis; Jan 30th, 2022 at 09:41 AM.

  26. #26
    Lively Member vbLewis's Avatar
    Join Date
    Feb 2009
    Location
    USA
    Posts
    126

    Re: Crossword Generator?

    bro, the puzzle generating is getting better... we aren't there yet but its looking better!

    Name:  225.jpg
Views: 1062
Size:  55.1 KB

  27. #27

    Thread Starter
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,143

    Re: Crossword Generator?

    didn't look at the code yet, but your image shows great progress...however, note the LARGE numbers...they should start at 1, and increment only by 1 for the next clue, i.e., 1, 2 3 ...etc...never should be large numbers like you have (170, 400, etc).

    EDIT...you got code for last iteration?
    Last edited by SamOscarBrown; Jan 25th, 2022 at 07:43 AM.
    Sam I am (as well as Confused at times).

  28. #28
    Lively Member vbLewis's Avatar
    Join Date
    Feb 2009
    Location
    USA
    Posts
    126

    Re: Crossword Generator?

    Quote Originally Posted by SamOscarBrown View Post
    didn't look at the code yet, but your image shows great progress...however, note the LARGE numbers...they should start at 1, and increment only by 1 for the next clue, i.e., 1, 2 3 ...etc...never should be large numbers like you have (170, 400, etc).

    EDIT...you got code for last iteration?
    Im still not happy with the current puzzle generation, there are still occasionally some problem 2 character areas, and I feel the puzzle could be much denser.

    As for the numbering of the clues, they are keyed to thier text box index which makes for easy look up, but the smaller numbering can be done it will just
    take a little more code.

    Im also adding a clue file editor and word/clue file generator using large databases i found online. But its just started.

    So there is still much work to be done, unfortunately i probably wont be able to get back to it till the weekend.

    Heres the latest code if you want to play around with it.

    Regards,
    Lewis
    Last edited by vbLewis; Jan 30th, 2022 at 09:41 AM.

  29. #29
    Lively Member
    Join Date
    Mar 2015
    Posts
    104

    Re: Crossword Generator?

    First of all NICE WORK vbLewis.

    What looks obvious to me is that there are twice as many horizontal words as there are vertical. So perhaps put in some "balancing word direction placement logic" that when a horizontal word is placed then a vertical word needs to be placed next, followed by a horizontal word, etc, Also seems to be that more longer horizontal words are placed than vertical ones. Through playing with other puzzle programs I noticed that increasing the size of the puzzle tends to improve word placement. Almost seems like a Black and Red Balancing Tree is needed.

    Also when printing puzzles, filled black squares tend to use up printer cartridges faster so I tend to change the print fill colour to a grey shade.

    Just a few suggestions. Not meant to be critical but just stating some observations. I am really impressed with your program. Always wanted to see a Vb6 Crossword Puzzle Maker created. On the old PlanetVB board Mr Kenneth Foster made an upgrade to a Vb6 Wordsearch Program before the site got closed down, but I never did see much of a Crossword Puzzle program being created (just an older basic version made years ago). Take care and many thanks vbLewis for the updates.

    Also forgot to mention that there is a nice C# Crossword program at Codeproject called Mr Crossword that seems to have some good logic to place the words in both directions evenly (At "https://www.codeproject.com/Articles/1271730/Mr-Crossworder-Create-Crosswords-in-Seconds"). It might be good to look at the logic that they used. This Crossword puzzle maker is also unicode. The same author made a Wordsearch program that uses a JSON representation of Webster's Unabridged Dictionary which is on GitHub ("https://github.com/adambom/dictionary").

    Name:  mr Crossword.jpg
Views: 973
Size:  63.8 KB
    Last edited by CreativeDreamer; Jan 25th, 2022 at 05:51 PM. Reason: Added info.

  30. #30
    Lively Member vbLewis's Avatar
    Join Date
    Feb 2009
    Location
    USA
    Posts
    126

    Re: Crossword Generator?

    Hi CreativeDreamer, Thankyou much for your input and observations, I've followed some of your links, info and suggestions. Much appreciated.

    I am releasing an updated version with a much improved puzzle generating engine, It now actually follows rules. Other changes have been made and here are some worthy of note:

    1) Added two huge word lists, to source random puzzle generation from. The New York Times historical puzzle database with 650k entries and a English word dictionary with 44k entries. See the readme file for more info.

    2) Added the ability to have non-used puzzle squares be grey (as suggested by creativedreamer)

    3) revamp the print preview to allow 2 pages if puzzle and clues dont fit on a single page.puzzle on page 1, clues on page 2. (needs testing i dont have a printer atm)
    Also puzzles are now resized to fit entirely on the page regardless of grid size.

    4) complete rewrite of the puzzle generating engine, it now follows strict rules when looking for word placement. (as suggested by Sam)

    5) the ability to right-click on a word and remove it from the puzzle (such as a non-intersected word) allowing you to fine-tune a puzzle before printing.

    6) A new option for puzzle generation 'Least Orphaned" meaning it will pick the puzzle with the least amount of non-intersected words as the winner.

    7) Clues are now properly numbered like normal puzzles (also suggested by Sam), and highlighting now switches between across and down of the same number like the Washington Post online puzzle.

    Unfortunately, the data files for the NY Times historical puzzles and the Dictionary are to large to include in the zip file, so I have added the links to download them in the readme and the source code. I also went ahead an made it possible for the program to automatically download the files if the user wishes.

    Name:  ss6.jpg
Views: 1106
Size:  48.6 KB
    Last edited by vbLewis; Feb 11th, 2022 at 08:55 AM. Reason: scroll down for download

  31. #31

    Thread Starter
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,143

    Re: Crossword Generator?

    First of all....this looks (before I even download your project) fantastic! I'm wondering if it IS good enough to add to the CodeBank on this forum (maybe a moderator will download it and check it out for an assessment).

    Secondly, THANK YOU for the hard work...I have been wanting such a puzzle generator for some time, but all MY (feeble) attempts at one have failed.

    Sammi
    Sam I am (as well as Confused at times).

  32. #32
    Lively Member vbLewis's Avatar
    Join Date
    Feb 2009
    Location
    USA
    Posts
    126

    Re: Crossword Generator?

    Quote Originally Posted by SamOscarBrown View Post
    First of all....this looks (before I even download your project) fantastic! I'm wondering if it IS good enough to add to the CodeBank on this forum (maybe a moderator will download it and check it out for an assessment).

    Secondly, THANK YOU for the hard work...I have been wanting such a puzzle generator for some time, but all MY (feeble) attempts at one have failed.

    Sammi
    Thanks Sammi, I hope you like it. Ive been enjoying the puzzles myself.

    That being said there is a nasty bug that slipped by me in the RefreshPuzzlesMenu sub.

    I have fixed it an reuploaded but you can easily fix it yourself if you wish
    In the following code
    Code:
        'unload if needed
        Do While MenuCount > 0
            Unload mnuPuzzles(MenuCount)
            MenuCount = MenuCount + 1
        Loop
    change
    Code:
     MenuCount = MenuCount + 1
    to
    Code:
     MenuCount = MenuCount - 1

  33. #33

    Thread Starter
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,143

    Re: Crossword Generator?

    Very good job...
    I did NOT download/use those two files mentioned in your Readme.txt file (yet). Maybe that is why my puzzle (I created one for a Bible New Testament) had several horizontal words NOT intersecting with any vertical ones...this SHOULD BE a requirement (rule) for a crossword puzzle (not necessarily a 'puzzle', but certainly a CrossWord Puzzle.

    Here's what my complete puzzle (with clues) looks like. Oh, BTW, I know when I PRINT a puzzle, the clues will be readable in their entirety, but if I'm doing it on a computer screen, several longer clues get cut off...maybe those lists should have horizontal scrollbars???

    Name:  xwordpuzzleex3A.jpg
Views: 919
Size:  47.3 KB
    Attached Images Attached Images  
    Sam I am (as well as Confused at times).

  34. #34

    Thread Starter
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,143

    Re: Crossword Generator?

    Also....possible to have the letters CENTERED in each of the squares instead of right-aligned?
    Sam I am (as well as Confused at times).

  35. #35

    Thread Starter
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,143

    Re: Crossword Generator?

    So, I tried your Least Orphaned Words and the suggested puzzle had only 2 (where the one I showed above has 8 or so). Is there a way to have NO Orphaned Words, yet still use the majority of those provided in the clu file? (I've attached my (slightly modified since running the puzzle above) clu file.)

    BTW...this is still a very good (although not perfect) program...

    Sam
    Attached Files Attached Files
    Sam I am (as well as Confused at times).

  36. #36
    Lively Member vbLewis's Avatar
    Join Date
    Feb 2009
    Location
    USA
    Posts
    126

    Re: Crossword Generator?

    Thanks Sam for checking it out. been busy lately so progress has been a bit slower.
    Im currently re-writing the whole word placement engine that i think will get better results and also making so no orphaned words will be left.

    To address some of your suggestions.

    1) horizontal clue list scrolling. This isnt possible with VB6's default list control which is a result of me choosing to stay with basic built in controls. If you click on a clue though in the list or a word in the puzzle, the blue label at the top should display the full clue.

    2) Centered Letters. This can be done easily by changing the justification on the txtPuzzle textbox, however the reason I right-justified them is because the little index number isn't transparent and can cover the corner of some letters which looks weird. This again is a limitation in vb default controls where transparent labels wont Z-order over top of textbox controls and i had to use small textbox's (which are not transparent) to hold the number with the background color the same as the puzzle letter. Ive thought of maybe using a text drawing api to print the number into the corner of the puzzle letter but haven't got to that point yet and not sure if it will even work, but i plan on exploring options sometime in the future.


    Stay tuned for an update!

    regards,
    Lewis

  37. #37

    Thread Starter
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,143

    Re: Crossword Generator?

    Yeah...no problem with the 'narrow' lists (I hadn't paid much attention to the clue being placed in a label---good choice). And as far as centering the letters, I understand...again, no problem (for me) leaving them right aligned.

    Yes, looking forward to 'no orphaned words'!!!! You get THAT done, I'll recommend to the moderators let you post in the CodeBank.
    Sam I am (as well as Confused at times).

  38. #38
    Lively Member vbLewis's Avatar
    Join Date
    Feb 2009
    Location
    USA
    Posts
    126

    Re: Crossword Generator?

    Its come a long way... generates pretty decent puzzles. probably wont be any updates for a while as Im busy with other things.

    updates:

    1) added a high score window to view all puzzles with the same score

    2) removed the 'Remove Word' menu because orphaned words are no longer a thing

    3) fine-tuned the puzzle generator to make denser and more complete puzzles

    4) removed 3 puzzle generating options because they no longer apply, the best puzzle is chosen by default

    5) many optimizations... less puzzles are now generated because the engine is better at producing winners

    6) in the grid view window a list of unresolved words can be viewed

    edit: removed/commented out sub-classing code, no longer needed...

    regards,
    Lewis

    Name:  ss7.jpg
Views: 889
Size:  68.6 KB
    Attached Files Attached Files
    Last edited by vbLewis; Feb 7th, 2022 at 07:33 PM.

  39. #39
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    9,852

    Re: Crossword Generator?

    When you guys are done, you need to turn it into a crossword-solver. Just specify the dimensions and where the black spaces are, and let it crunch. Just forget about the clues. When/If it's done, see if the solution makes sense with the clues.
    Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.

  40. #40
    Lively Member vbLewis's Avatar
    Join Date
    Feb 2009
    Location
    USA
    Posts
    126

    Re: Crossword Generator?

    Quote Originally Posted by Elroy View Post
    When you guys are done, you need to turn it into a crossword-solver. Just specify the dimensions and where the black spaces are, and let it crunch. Just forget about the clues. When/If it's done, see if the solution makes sense with the clues.
    Thats a pretty cool idea, may have to try that. At the moment im kinda cross worded out tbh
    I dont think I am able to get this puzzle generator much better than it currently is, so any new updates will just be finishing support code and adding features.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width