Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411276 Posts in 69323 Topics- by 58380 Members - Latest Member: bob1029

March 28, 2024, 12:24:25 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsHabit Puzzles - unlock a gallery of jigsaw puzzles by making healthy choices
Pages: [1]
Print
Author Topic: Habit Puzzles - unlock a gallery of jigsaw puzzles by making healthy choices  (Read 1722 times)
nathy after dark
Level 8
***


Open Sourceress


View Profile WWW
« on: August 15, 2022, 05:16:34 PM »

Habit Puzzles (working title?)

Gifs





(Sorry some of the GIFs shrank. I'm slowly replacing them with better ones.)

Concept

Time to put on my promotional hat and talk about a side project I'm almost ready to release.

It's a habit tracking game inspired by Habitica, which really helped me get healthy years ago, but I find doesn't work anymore because I'm not invested in the game mechanics. I want a gamified habit/to-do list app, where the game is more engaging to my personal taste, because artifical points and XP sometimes don't do the trick. I knew I would find a habit reward system more compelling if it revealed original content, but that you can't just chop most fun content into tiny pieces that are each a small reward. My family is ride-or-die for jigsaw puzzles, which are something you can engage in for short amounts of time without feeling deprived if you don't finish in one sitting.

So anyway--you just put your habits and tasks into it, check them off when you're done, and earn jigsaw pieces to put together. This has been a really fun technical challenge and I've finally got the core jigsaw puzzle features done, the hardest of which was handling piece rotation in groups. It's (almost) all implemented in a custom Lisp I wrote on top of the Haxe programming language. The code of the game itself is also open source but I wouldn't recommend digging through it yet. All of my shameful secrets are in there.

My goal was to make a new way to motivate myself to do important work, which I've known all along is ironic, because I worked on it lots to procrastinate more important work.

Now that you can actually solve a puzzle in it, I feel almost ready to put it out there for a buck or so, in an Early Access stage. If people are interested, I can iterate and take it a lot further. I don't know how big a market there is for this, but I do get some motivation out of it myself, so if no one else cares I think I'll still feel pretty good about it.
« Last Edit: October 01, 2022, 09:45:41 AM by nathy after dark » Logged

nathy after dark
Level 8
***


Open Sourceress


View Profile WWW
« Reply #1 on: August 16, 2022, 06:19:48 PM »

Custom puzzle size

For now, I'm using an open-source jigsaw puzzle generator which outputs puzzle pieces in strict rows and columns.

When I started out, I hard-coded the puzzles to be 6 pieces by 5 pieces, because I was using placeholder images that were landscape-oriented, and I wanted to reward myself with new images after roughly 30 healthy actions. But in my family, 1000-piece puzzles were always our favorite, so I knew if I was going to release this for puzzle enthusiasts, puzzle size would need to be customizable, and also flexible according to the puzzle image's aspect ratio. Now I've implemented that using some silly math that seems to work well enough.

The idea is that an "ideal" puzzle has a square number of pieces, starting at 5x5 = 25. I warp these "ideal dimensions" according to the image's aspect ratio:

Code:
width = 5
height = 5

width *= (image.width / image.height)
height *= (image.height / image.width)

width = ceil(width)
height = ceil(height)
This gives a number of rows and columns that aims close to 25, but stretches so there are more pieces along the puzzle's longer side. Currently I let the player choose every other square number up to 961 for their "ideal" size, so in theory you can generate a 1000 piece puzzle. Of course, I don't want to have to do 1000 healthy things to solve a whole puzzle, so I also allow a configurable number of pieces to be unlocked per "point" earned. I didn't want to let players choose 25 pieces-per-point with a ~25-piece puzzle, so I limit the highest choice according to the chosen size.

1000-piece stress test

So I finally decided to try 1000 pieces at a rate of 32 per point, expecting the game to slow down or crash. It's actually running decently?! But I don't have all 1000 pieces unlocked yet, because I don't want to cheat just for testing purposes.



Zooming in close enough to see piece shapes clearly does make the pixels in the images too big, though.



And I think with 1000 pieces, the puzzles will be more distracting than motivating. Maybe I'll set the limit lower, but for now I just want the code to be in place for arbitrary sizes.

Any website suggestions where I can upload gifs without downscaling?

Logged

nathy after dark
Level 8
***


Open Sourceress


View Profile WWW
« Reply #2 on: August 31, 2022, 10:44:27 AM »

Closed playtesting



I finished implementing a rough but functional UI for creating new habits/tasks of the 5 types I've implemented. (Until recently, I was editing my personal task list directly in Notepad++).

I wanted the UI to be simple and only use buttons, no fancy drop-down menus, in case someday I'm porting this to Android or iOS and my UI choices wouldn't make as much sense on a touch screen. I wanted a dropdown menu, but I found a bug in HaxeFlixel's dropdown menus and it doesn't look like anyone is maintaining the HaxeFlixel ui framework right now. So I had a long UI conversation with a few other gamedevs (thanks especially Dain Saint!) and absorbed the advice that fancy UI frameworks are more of a pitfall than a feature.

UI to create new habits/tasks was the last thing on my list before I was ready to let friends install the current build and play around with it. So today I recorded the above GIF of a pal entering 2 new habits into her list. Can you spot the bug she found? Smiley

Logged

nathy after dark
Level 8
***


Open Sourceress


View Profile WWW
« Reply #3 on: September 06, 2022, 10:38:32 AM »

Can I integrate this thing with Habitica?

I've been a member of a Habitica party of other gamedevs for several years now. The group is mostly inactive these days (maybe we all got a little bored with the JRPG system and moved on to various other habit trackers). But every once in a while I get a snazzy email like this one:



It's an irresistible call to action. It makes me want to dust off the Habitica account and get back into it. Online party multiplayer is far out of scope for Habit Puzzles, but maybe I can add a similar social component with something like a button to share the puzzle you just finished on Twitter or something. (Last I checked the Twitter API had been made harder to work with--and I hate Twitter, but it's probably worth looking into).

Anyways, it's hard for me to jump in and help with a Habitica quest because all of my habits and TODO list are stored in Habit Puzzles, not Habitica. I'd have to re-enter some stuff and check things off in two different apps (Habitica on my iPhone, Habit Puzzles on my laptop because a mobile app is off the table for the foreseeable future). But what if my Habitica task and habits could be displayed and scored from inside Habit Puzzles, and my Habit puzzles habits/tasks also earned Habitica experience? That's a clearly defined and well-scoped integration that would make my game better and appeal to the target audience of gamified productivity nerds. And let me do my part for the party, without maintaining two separate habit tracker states.

Here comes the problem: Haxe's HTTP API support is outdated enough to only support the GET and POST request methods. Janky, and a huge limiting factor for Habit Puzzles, which needs to compile into C++ for performance reasons. There is no supported alternative in the Haxe ecosystem for making HTTP requests from C++. When I first discovered this limitation a couple years ago, I made an issue on GitHub and found out that better HTTP support is in the works (and two years later, it still is). I owe so much to the volunteer labor of Haxe maintainers, that I can't quite be mad that it's not ready yet. I'm gonna see if there's any way I can contribute to the implementation, even if it's just buying a coffee for whoever's working on it.

In the meantime I find myself going through the Habitica API docs checking if I would even need to make a request other than GET or POST for my use-case. It's kind of sketchy, but maybe I can just work around the issue. Tongue

I decided to let myself do this bit of research today, but if I'm being honest with myself, I ought not to take on the task right now. It was never on my rough Early Access roadmap, and playtesting turned up more bugs than I was expecting. We will see if I stay strong and hold off on the whim of this new feature.
Logged

nathy after dark
Level 8
***


Open Sourceress


View Profile WWW
« Reply #4 on: September 11, 2022, 07:53:40 AM »

Why make Habit Puzzles? To solve my problem with unfinished projects

In Fall of 2016 I released a visual novel, The Whisperer in Darkness, on Steam. That was my first semester of college, and a turning point in my creative career. My life got busy enough, and my interests eclectic enough, that it became way harder/less appealing to pick one well-scoped, commercially viable project idea and stick to it. Between 2016-2020 I got some short creative writing professionally published, which was a big milestone and lifelong dream. I made a few zines and sold them at festivals, which was also very fun. But when it came to programming/gamedev, I didn't finish shit. I bounced around wildly, never exercising scope control or time management to make another project with the scale and polish of The Whisperer in Darkness. Now in 2022, I carry a big lack of fulfillment in that regard. I want to make big, notable projects, not just little & obscure stuff (not to diss on those small projects that I do love and am proud of).

I've been making my own mind mapping tool (definitely a symptom of my side project mania) which I've been able to use to visualize  and reason about important sectors of my life. My most recent mind map represents my current entire creative pipeline which spans 5 mediums (Zines, Flash Fiction, Playwriting, Screenwriting, and Games). I wanted to visually correlate my unfinished projects with honest assessments of where they're at and what comes next. To start finishing projects and un-jamming the pipeline, I need to pick projects that are closest to being done, and make them priority #1. Then rinse and repeat.






Top-priority habits

Habit Puzzles is a top priority right now because it's both close to release-ready, AND it creates a useful motivation/organization system that contributes to every other project in the pipeline. But just knowing something is a top priority, isn't enough to make me work at it consistently. I realized I was getting all of my points in Habit Puzzles from good but not-good-enough habits like doing the dishes, journalling, etc. and my habits related to my real priorities accumulate almost no points. So I coded up a feature where any habit can be marked as a Top Priority, and whenever a Top Priority needs to be completed, all other habits are hidden. I'm testing this on myself to see if it helps direct my energy better.

For now to make a habit top-priority I have to edit my habits.txt file and put an exclamation point prefix on it.

Code:
mind map color component for text |
! Top-priority habits and tasks |
no volume updown keys |

Now I need to make that feature available in the actual UI.

Logged

nathy after dark
Level 8
***


Open Sourceress


View Profile WWW
« Reply #5 on: September 24, 2022, 10:22:53 AM »

I was able to put off the itch for Habitica integration. Instead, I was able to implement the top-priority habits UI and fix a number of bugs, including the latest bug introduced by the drag-to-select/rotate pieces as a group feature. I've been playing the game for a little while without hitting any breaking bugs! I know some still exist in more complicated features like the keyboard shortcut system, but I avoid them by not using those features.

Here's how the menu looks now, with the new feature buttons added.



The top priorities feature works pretty well in directing my focus to more important things first.

By following my routine of healthy habits, I was able to finish making a new zine, issues #1 and #2! Check it out.
Logged

nathy after dark
Level 8
***


Open Sourceress


View Profile WWW
« Reply #6 on: October 03, 2022, 07:58:03 AM »

Can a digital puzzle be as fun as a physical one?

The big design challenge I've been focused on is: how do I find the fun in solving a digital puzzle, when jigsaw puzzles are such a tactile pleasure?

(The other big design challenge is, how do I make a good habit tracker that increases players' life satisfaction without capitalizing on hyper-productivity as a dangerous addiction? And, how do I make sure relying on the game never causes a player to miss important information, like a project deadline with real-world consequences? This one, I know I can't solve without a testing playerbase.)

As inspiration for the game, I do real jigsaw puzzles when I'm in the mood.



Real jigsaw puzzles actually have some UX problems that my digital interface allowed me to solve!

- When you pour the pieces out of the box, about half of them are upside-down! It's such a drag to spread a heap of pieces out on the table, then systematically turn them all so the image side faces up.
   - This can be even worse when puzzling as a group activity--I'm very particular about not letting pieces overlap and obscure each other, but sometimes people who never learned puzzle etiquette will join in and treat the pieces haphazardly!  WTF Habit Puzzles being single player and having so such concept as a "face-down" puzzle piece, solves both problems.
   - I like to imagine releasing an April Fool's Day update that introduces several of the needless annoyances of a physical puzzle. The wrong pieces getting stuck together, images peeling off the cardboard, pieces getting lost, etc.  Cheesy
- You just can't move a big chunk of puzzle pieces around. As you see in the photo, I've chosen to put pieces together without consulting the full image on the box, and therefore I solved sections of the puzzle which I need to artfully pick up and move into their proper places. Habit Puzzles lets me do that easily, because the pieces snap together and move and rotate as a unit.
- Compulsive "I need to finish the whole puzzle before I do anything else" effect: Since pieces are unlocked by performing tasks, some of which are daily or finite, it's not really possible to do a whole Habit Puzzle in one day without cheating or putting in tasks that are too easy/performed dozens of times in a day. When I stop finding matches with the pieces I have, I close the game.
- It hurts my back, looking down at the table so much and craning my neck around to see all the pieces!
- Jigsaw puzzles are expensive! If you buy them brand-new, it's a fiscally irresponsible hobby. If you buy them from a thrift store, you're more likely to have pieces missing!

Even though there are advantages to a digital puzzle, I can't deny that the physical thing is more fun. That's where the Habit Tracker part of the game is nice--because I understand when playing it, that it's not all fun and games. It's partly about practicing discipline and routine and self-improvement. The goal is to make those things more tolerable, not to make a game that someone marathons over a weekend to unwind.
Logged

nathy after dark
Level 8
***


Open Sourceress


View Profile WWW
« Reply #7 on: October 21, 2022, 12:48:42 PM »

Pulled back in

I was taking a break from this project to establish a daily writing routine for my other project, FLIES FLIES FLIES. The funny thing is that once I got really good at writing every morning, I stopped checking in with Habit Puzzles because I was so absorbed with my good habits.

Today I was pulled back into Habit Puzzles work because a friend of mine had explained the project to some other people who said they wanted to try it. I can't let free marketing go to waste, so I fixed one more known bug and pushed a build to itch.io. Now I've just gotta get the interested people to install it and set up a chat space where they can give me feedback.

After reading the advice for early access developers on Itch here I've decided to start sharing the game to small groups, not releasing it publicly until I know it's in a good place. But if anyone reading this wants to give it a try, here are 3 claimable keys:

https://nqn.itch.io/habit-puzzles/download/tigforum-aPJ3Bx1iWwb5bHzyHZBu88Dfa-7Lx9S9w1ZY7UiJuJouE5RrnZegi
https://nqn.itch.io/habit-puzzles/download/tigforum-5X6g516ovkGLh2BF4ZBu88Dfa-WFFUMQtMVLpA84pedgTRWLCqeG2s
https://nqn.itch.io/habit-puzzles/download/tigforum-LgaEGoXkLMxAWi4eTZBu88Dfa-aW3i23Tnzs59iw6cg9fHCUEQqLD

You'll want to install it with the Itch app (here) so you get automatic updates.
Logged

nathy after dark
Level 8
***


Open Sourceress


View Profile WWW
« Reply #8 on: February 04, 2024, 05:12:46 PM »

I wrote a shader that draws a checkerboard background which makes it harder to get lost when moving and zooming the camera:







I did this more so I could use it with the mind mapping tool that I wrote about earlier--since they share the same libraries, I went ahead and included it in Habit Puzzles.

Project not totally dead.
Logged

Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic