devlog and untracked file cleanup into .temp

This commit is contained in:
2022-08-17 02:44:58 +00:00
parent 25464a4e0c
commit 8131258ccc
8 changed files with 41 additions and 1 deletions

View File

@@ -0,0 +1,13 @@
# Habit Puzzles (working title?)
Time to put on my promotional hat and talk about a side project I'm almost ready to release.
Sorry if the GIFs aren't snappy or clear enough--The UX needs work and I have a long way to improve at making GIFs and screenshots for marketing, etc.
It's a habit tracking game inspired by [Habitica](https://habitica.com/), 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](https://github.com/NQNStudios/kisslang) 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 try a rough Early Access stage. 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.

View File

@@ -0,0 +1,26 @@
# Custom puzzle size
For now, I'm using an open-source [jigsaw puzzle generator](https://github.com/nanjizal/JigsawX) 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:
```
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.
Any website suggestions where I can upload gifs without downscaling?

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 328 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 614 KiB

View File

@@ -580,7 +580,7 @@
(set nextPuzzleChoiceGroup.cameras [uiCamera])
(add nextPuzzleChoiceGroup)
(let [x 0 &mut y 0 &mut :FlxButton b null]
// TODO also limit puzzle size by rewardSprite dimensions
// TODO also limit puzzle size by rewardSprite dimensions (which are available in bmd in startPuzzlePackChoice())
(doFor size PUZZLE_SIZE_OPTIONS
(set b (new FlxButton x y "$(* size size)" ->:Void {
(remove nextPuzzleChoiceGroup)