Nonograms (Hanjie) - Printable Version +- QB64 Phoenix Edition (https://staging.qb64phoenix.com) +-- Forum: QB64 Rising (https://staging.qb64phoenix.com/forumdisplay.php?fid=1) +--- Forum: Code and Stuff (https://staging.qb64phoenix.com/forumdisplay.php?fid=3) +---- Forum: Programs (https://staging.qb64phoenix.com/forumdisplay.php?fid=7) +---- Thread: Nonograms (Hanjie) (/showthread.php?tid=1378) |
RE: Nonograms (Hanjie) - bplus - 01-15-2023 Quote:I got that after doing a Google search for Hanjie. According to the rules of the game the finished puzzle should reveal a picture contained in the squares. Does this version not do that? Not yet. I saw that too when I Googled Nonogram but then I saw a ton of variations so maybe some variations don't do pictures? I've never heard or seen Nonograms until RokCoder posted his version. I couldn't get it to work so I made my own version. Just tonight I learned for his, you have to click ALL the squares to Black or White for a solve that is acknowledged. RE: Nonograms (Hanjie) - RokCoder - 01-15-2023 (01-15-2023, 01:27 AM)TerryRitchie Wrote: I updated the tutorial's zip file so the latest version is downloaded. Thanks! (01-15-2023, 04:10 AM)bplus Wrote: Terry has mentioned revealing artwork in his blurb about RokCoder's Game, ??? All I get is a "Congratulations" when puzzle is correctly clicked. Actually, I think I prefer it that way. Traditionally nonograms do form pictures. This program creates nonograms randomly though. That was actually the main challenge - to be able to create nonograms of differing complexities and differing sizes completely randomly. Not all number grids can be solved so the program actually contains my own algorithms for solving nonograms (which I adapted to add the "hint" feature in the latest edition) - if it determines a randomly created nonogram is impossible to solve then it skips it and creates another. It's the first time I've seen your smaller version - I love challenges like that! It's extremely difficult to solve them if you can't distinguish between "don't know yet" and "empty" tiles but that's certainly not an issue when producing games in minimal code. What is an issue though is that the majority of the randomly created puzzles that it creates (especially on larger grids) won't be solvable. Very enjoyable and useful to look through the code though. I have so, so, so much more to learn about QB64pe nuances! (01-15-2023, 04:14 AM)TerryRitchie Wrote: I got that after doing a Google search for Hanjie. According to the rules of the game the finished puzzle should reveal a picture contained in the squares. Does this version not do that? Nope - but it can create an infinite amount of solvable nonograms (01-15-2023, 04:18 AM)bplus Wrote: Not yet. I saw that too when I Googled Nonogram but then I saw a ton of variations so maybe some variations don't do pictures? That was probably the case in the earlier version but it's a lot more polished now. You only need the white blocks to be set for completion. I'm also particularly pleased with the "hint" option. Why not give the new one a whirl? I added error checking this time so it gives a reason why the assets can't be found if the exe is in the wrong folder. I'm learning RE: Nonograms (Hanjie) - bplus - 01-15-2023 Quote:You only need the white blocks to be set for completion. Yep that was what I assumed with your first post, then I started wondering why 2 shades of dark. Glad you made the change, the player can then focus on the runs of white. I've yet to encounter an unsolvable. I suppose with higher numbers it gets much harder to place the smaller runs. But I think if you match all the runs on rows and cols you will have solved the puzzle even if more than one solution exists. The way I set it up, you only have to match all runs in the rows and cols, there is only that pattern saved as solution. I will check your latest out, maybe figure a way to expose a picture? RE: Nonograms (Hanjie) - RokCoder - 01-15-2023 (01-15-2023, 05:39 PM)bplus Wrote:Quote:You only need the white blocks to be set for completion. You make a very valid point. They may well all be solvable (though I don't know for sure). There are a lot that require guesses if you go that route but, hey, why not It's off-topic for this forum but I did my original Nonograms project in Scratch. The BASIC one is much better written and far more optimised but the original has pictures to solve (as well as random creations). You can take it for a spin over at www.rokcoder.com/scratch?766771226 RE: Nonograms (Hanjie) - bplus - 01-15-2023 Just looked at Scratch version, did a 5x5 with not a simple toggle there you click a "white" which is green,"?" tile (never tried third option). Still no picture upon completion but lots of stars coming out of a circular congrats for solving. LOL I have a guess why no pictures for this version, you need to match an exact solution to reveal a picture. If puzzles have more than one solution or ways to do the set of runs in the rows and columns then picture revealing would be impossible. I will Google Nonograms some more maybe find one that does do picture reveals. Update: Oh this is how they make pictures https://www.google.com/search?client=opera&q=nonograms&tbm=isch&source=univ&fir=3Ag5WUvGBCirvM%252Cqf04EPQp5qOCZM%252C_%253BOPvXZEswwOllRM%252CoEoTs31FyYoGNM%252C_%253BpeLA5mLcHPAaKM%252CKnHjVn1iDgu7TM%252C_%253BzGBGYu7kSqEvRM%252CVT2rlSqLMOLlwM%252C_%253B27ra2ldI6hu9MM%252CMv71owpJ4AAsFM%252C_%253B0a9u_c-dFTRk-M%252CToHqcnf2kQZDAM%252C_&usg=AI4_-kRqTwDZy8ukPb43nW7PS63656A5MA&sa=X&ved=2ahUKEwjepbmzo8r8AhUYg4kEHWwrCCIQiR56BAhpEAI&biw=1304&bih=667&dpr=1 Basically pixelate a picture to B&W and you've got your puzzle runs. Oh and you can do multi-colored puzzles like a paint by logic and number using numbers in multi-color inks. RE: Nonograms (Hanjie) - RokCoder - 01-15-2023 (01-15-2023, 01:27 AM)TerryRitchie Wrote:(01-14-2023, 11:56 PM)RokCoder Wrote: I felt the implementation wasn't particularly friendly so I've made some updates - (01-15-2023, 06:47 PM)bplus Wrote: Just looked at Scratch version, did a 5x5 with not a simple toggle there you click a "white" which is green,"?" tile (never tried third option). The Scratch project has 30 pictures in it (and you only have to fill the white blocks - not the empty ones if you don't want). Each of the padlocks is an image nonogram. You start with the '?' one which unlocks the next, etc. I used a similar technique to the one you mention. I get a picture, take it into GIMP, monochrome it and resample it at low resolution, etc. |