Trisphee

Trisphee (http://www.trisphee.com/forums/index.php)
-   Games & Tech (http://www.trisphee.com/forums/forumdisplay.php?f=43)
-   -   Nonograms! (http://www.trisphee.com/forums/showthread.php?t=23772)

Coda 07-29-2019 10:21 AM

Nonograms!
 
Hey.

Hey Espy.

Hey.

http://xmpps.greenmaw.com/~coda/stuf...am-preview.png

EDIT: ... oops, I missed some squares. XD

Espy 07-29-2019 12:54 PM

You can't just do that and not post a link.

Coda 07-29-2019 12:58 PM

I mean, if you really want it...

file:///Users/coda/nonogram/nonogram.html

But it's not going to work... ;)

EDIT: All right, I'm done enough to actually post something.

http://greenmaw.com/webgames/nonogram/

Espy 07-29-2019 01:46 PM

Ooooh. -grabby hands-

(that's a lie; I've already gone and finished a board)

How difficult is it to code a nonogram seeding program so that the user has enough information from the given numbers to actually complete it?

(also I reverted back to my old plug-into-MS-paint habit because I've been spoiled by a certain mobile app and can't do nonograms without a function to indicate when a square is definitely not blue.)

Coda 07-29-2019 02:01 PM

I'm working on an X marker, but you were giving grabby hands so I put up a "good enough" WIP.

Try 15x15 seed 765212668 btw. I just solved it, but it was a pretty good challenge.

A way to evaluate seeds like that sounds pretty challenging. It's an INTERESTING challenge, to be sure. It ties into the idea of a hint generator I had. But I can't make any guarantees that it's even mathematically tractable.

EDIT: It should be noted that they're always solvable. I assume you actually mean that the solution is UNIQUE.

Espy 07-29-2019 02:19 PM

Hm, I ran into some similar issues w Sudoku a couple days ago, so I suppose what I'm wondering about is a unique solution that doesn't require a guess.

...Actually hmm, does one follow from another...?

Coda 07-29-2019 04:13 PM

If you can solve it without a guess, it follows that the solution is unique. The converse does not hold; a unique solution may still require guessing.

I have no desire to ensure that a puzzle can be solved without guessing. I've solved plenty of puzzles that require guessing. They're harder, to be sure, but I consider that a feature. (It WOULD be nice to heuristically guess at a puzzle's difficulty, though.)

Only once have I managed to get into a state where all of the runs are satisfied but I didn't have the accepted solution. It's possible that other puzzles I've solved in the past could have had similar faux solutions; it's not something I've paid attention to.

EDIT: Ack! Now it's twice, and this time I can't figure out what the other solution is... Okay, this might be more important than I thought. 15x15 seed 842082313.

EDIT 2: Never mind, it was a bug in the board validation. The solution on this one is unique.

Coda 07-29-2019 04:35 PM

Okay, now there's support for putting X in squares. You can use the toggle in the corner, or you can hold shift when clicking.

EDIT: Solved a 20x20 (seed 742247382), so I feel pretty good about the game being pretty stable.

Kitalpha Hart 07-29-2019 06:10 PM

Ooh picross

I've got a couple apps on my phone
And a couple others I've removed cuz I finished them
And a LoZ themed one on my 3ds

Coda 07-29-2019 06:17 PM

@.@ 20x20 seed 234666122 was unexpectedly difficult, but I solved it.

EDIT: Okay, now that I'm pretty sure I've got the kinks worked out, I can get started on some analysis tools.

EDIT 2: Bleh! Okay, that one had at least two ambiguous places in the solution. Maybe I do need some ambiguity avoidance... (Note to self: 15x15 seed 52070975)

Coda 07-30-2019 03:16 PM

Oh wow. Huh.

This analyzer that I'm working on isn't all that smart. It implements exactly the same technique I use when I start a puzzle -- it fills in all of the squares that have to be filled in no matter how you organize the hints for that row/column, then it fills in all of the squares where the edge hints make it unambiguous how far inward you have to go, then it puts in X's at the endpoints of fully-satisfied hints, then it puts in X's on the edges if the hint can't reach it given the rest of the information.

And yet even as simple as it is, I thought I had found a bug in it. It X'ed a few squares that had me scratching my head -- why would it mark THOSE?

A few minutes of debugging later... Oh. That's NOT a bug. That's completely right, and I wouldn't have noticed.

mdom 07-31-2019 08:29 PM

oooh another site to spend the night...
thanks Coda xD

Coda 07-31-2019 08:35 PM

You're welcome. I should put this in my "Games by Coda" thread once I polish it up a bit more. (I want to make the touchscreen controls less awkward.)

Espy 08-04-2019 08:13 PM

Whoops I misread that as, you have the touch controls working, and got super excited.

Coda 08-05-2019 12:20 AM

I mean it probably KIND OF works on a touchscreen. I haven't tried it but it's probably not exactly user-friendly.

Espy 08-05-2019 01:25 AM

Nah, I’m using safari (iPhone... i should really dl ff or somethinng) and I can select a square, but not actually alter it.

Coda 08-05-2019 01:09 PM

It wouldn't make a difference. Firefox on iOS is just a Safari reskin, because ALL browsers on iOS are just Safari reskins due to App Store acceptance policy.

Espy 08-06-2019 02:57 AM

-snort- Ew.

Espy 08-08-2019 01:43 PM

Psst hey Coda, you know what would be a cool feature? If mousing over a square would highlight the entire row and column. (less necessary for like, 10x10, but things can get weird after 20x20)

Coda 08-08-2019 02:13 PM

Hmm... Little bit tricky to do efficiently. But I'll put it on the list.

Espy 08-08-2019 02:36 PM

Yeah I'm trying the 20x20 seed you suggested and it gets a little wonky trying to trace numbers back

Espy 08-08-2019 06:12 PM

Eyy finally finished that seed

took me a while bc I messed up the first time.

Espy 08-12-2019 03:39 PM

Try 20x20 369263794; that one's fun.

Coda 08-12-2019 07:09 PM

*loads it up* Huh. Yeah, looks like it.

EDIT: Yeah, that was a good one. Took me almost an hour because I apparently made a mistake somewhere. I hadn't even made any guesses yet, so it must have been a misclick or something, and I didn't notice until it led to a contradiction with half the board already green.

Coda 08-12-2019 11:41 PM

Upgrade!

Mobile works now. It's not perfect and it really suffers from not being able to hover on stuff, but it's playable.

The row/column highlighting you asked for is implemented.

The keyboard shortcuts have changed. Now pressing shift toggles between mark and X (instead of holding shift temporarily switching) and backspace switches to erase mode.

Espy 08-13-2019 12:41 AM

Oh man that's fancy. Thanks Coda.

Espy 08-13-2019 12:57 AM

20x20 527360857, haven't finished it yet but if you start on the left like I did, you'll likely end up expanding towards the right and it's really cool to see it roll out in one direction like that.

Coda 08-13-2019 11:04 AM

Oh, shoot, I broke the seed input.

EDIT: Think I fixed it but the caching is kinda aggressive.

EDIT: Finished it. ~20 minutes. I ended up starting more towards the top-right, and while the left edge did fill in pretty quickly I didn't really have that sweep like you described.

EDIT: Blah, shift is too finicky of a shortcut. I should bind something else to it as well. Maybe space bar.

EDIT: Okay, cleaned up the keyboard handling some. Bound space in addition to shift, but the adjustment made it more reliable anyway.

Coda 08-14-2019 10:26 PM

Pushed up an upgrade.

New feature: Undo/Redo. The undo state isn't saved in your save file, so if you leave the page and come back you lose your undo history. It also gets blanked out if you take damage in...

New feature: Life mode. In life mode, trying to mark a square that shouldn't be marked deals damage to you. (X'ing a square that should be marked has no penalty.) This gives you a hint about the puzzle solution.

Espy 08-14-2019 11:12 PM

Kind of missing the reclick-to-remove feature; backspace is weird and hard to reach. (There's a weird thing that I do that involves using x to delineate possibilities and where certain blocks end, which means I end up backspacing a lot.)

Coda 08-14-2019 11:44 PM

I use the same technique. Maybe I can hook up right-click as "erase".

Coda 08-15-2019 10:26 AM

Another update. Mostly bugfixes, but I added a couple of noteworthy things.

New feature: Help screen. Should be self-evident.

New feature: Drag cancelling. Press Escape on the keyboard, click the right mouse button while mouse dragging, or tap another finger on the screen while touch dragging to cancel the current drag. (This isn't so important in free mode, especially with undo, but it matters in life mode.)

Update: The Z key switches to erase mode in addition to backspace now.

EDIT: Huh. Life mode makes for an interesting challenge. My wife thinks it's actually easier, but as someone used to free mode, having to be more careful about where I mark things is proving to be intriguing. I just solved a 15x15 with no damage -- that is, I never made a mistake.

EDIT: Ack, fixing the page sizing bug introduces a different one -- if the board doesn't fit on the screen, then you can't scroll to see the rest. It's not a problem on mobile because it'll just zoom out, but on desktop... Fixed.

EDIT: Cleared a 20x20 taking 3 damage. One was unavoidable. The other two were mistakes, though one of them MIGHT have been unavoidable in the long run.

EDIT: Next feature I should add: endgame hints. If you've gotten the whole board green, but it hasn't marked it as a win, then it should highlight which rows aren't in the correct final form so you can shuffle around your answers to fix it. Only worth anything in Free mode, I suppose.

Gallagher 08-19-2019 02:35 AM

i cant believe i betrayed myself in looking at this thread, why would i do this to me, coda why have you enabled this

Espy 08-19-2019 03:10 AM

one of us
one of us

Coda 08-19-2019 09:30 AM

Quote:

Originally Posted by Gallagher (Post 1902570)
i cant believe i betrayed myself in looking at this thread, why would i do this to me, coda why have you enabled this

I have enabled this specifically because I wanted to enable this. Why else would I create a thing?

Coda 08-19-2019 10:35 AM

Small update.

New feature: Ambiguous solution hints. In free mode, if you've turned the whole board green but it doesn't match the intended solution, the hints will turn red to indicate what needs fixed.

New feature: Touch-mode measurements. With the mouse you can see how long a line is by hovering over it, but you can't do that with touch. Now, the measurement numbers will remain on the screen after you release a touch, making it usable in touch mode as well. (Try tapping an existing line!)

Also fixed some bugs pertaining to the undo functionality and some formatting issues with hovering.

Espy 08-19-2019 04:52 PM

Hrm, mobile still doesn’t work for me. Might be something wonky on my end.

Coda 08-19-2019 05:13 PM

What do you mean by "doesn't work"? Details, man, details! XD Also what device and what browser?

Coda 08-20-2019 09:29 AM

Next feature I'm going to implement is custom boards instead of seeded ones. This is a prerequisite for what I was ORIGINALLY wanting to do when I started on this project: create a generator that can convert image files into interesting nonograms.

This is harder than it sounds. It's trivially easy with a black-and-white image, but you don't want to just convert an image to 1-bit color because that loses most of the detail in the image and probably isn't going to make an interesting pattern. You can play around with brightness and contrast filters and get a little bit better, but that's still not going to make a puzzle that's anywhere close to what a hand-crafted grid would be like.

But I've got plans. I'm not 100% sure they're all going to work, and I'm not sure I necessarily even know how to do everything I have in mind. But that's what makes being a programmer fun! I get to solve puzzles in order to make puzzles!

Espy 08-20-2019 11:56 AM

iOS, Safari; tapping a square only hovers and doesn’t actually click


All times are GMT -4. The time now is 10:44 PM.

Powered by vBulletin®