prototype for a shuffled jigsaw puzzles frontend
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
km0 e5c238afbc puzzles inventory 2 years ago
.vscode init, homepage and puzzle page 2 years ago
chaospuzzles prefix for the soupboat 2 years ago
.gitignore cluster generation, readme and basic template 2 years ago
MANIFEST.in init, homepage and puzzle page 2 years ago
README.md updated readme 2 years ago
inv.md puzzles inventory 2 years ago
setup.py test split to pieces 2 years ago

README.md

Prototype for a chaotic evil jigsaw puzzles system

This is a rough prototype for generating ready-to-print jigsaw puzzles as well as a way to track their completion in a shared platform. The idea is to have several puzzles and mix their pieces, in a way that invites the players to collaborate in order to solve them.

This prototype covers two aspects of the process: the first is to split an image into pieces, tracking every piece with an ID and store the relation between adjacent tiles. The second concerns the online platform, and it is a Flask application that permits to upload cluster of pieces in order to share them with the other players and unlocking the full puzzle.

To install the project:

  1. Clone the repo
  2. Create a virtual environment
    $ python3 -m venv venv
    
  3. Activate the virtual environment
    $ . venv/bin/activate
    
  4. Install the dependencies
    $ pip install -e .
    
  5. Set the environmental variables for flask
    $ export FLASK_APP=flaskr
    $ export FLASK_ENV=development
    $ flask run
    
  6. The Flask application will be accessible on your browser at localhost:5000. If you try to navigate there you will see a blank page. This is because we need to generate some puzzles to display.

Generating the contents

The first thing to do then is to run the split.py script:

python3 chaospuzzles/split.py

This will take the Katamari demo picture from static/img and will split it in tiles. The tiles will be used to compose the clusters when a player upload it online. In this way we can be super flexible in the randomization / distribuition of the pieces.

You can tweak the parameters at the end of the split.py file. This is temporary, later on it would be nice to have an interface to prepare the puzzle.

Completing the puzzles

If you reload the website, you will see a link pointing to the Katamari page. Here we will find an empty frame, and a form to insert new pieces.

Try it! You can find the IDs for the pieces in the chaospuzzles/puzzles/katamari/katamari_retro.png image. This is the picture generated in order to be printed behind the puzzle and let every piece to have a unique ID.

By design an valid cluster is a group of adjacent pieces.

Keep in mind that this is a wip and rough prototype so everything need to be polished a lot. We count on your imagination to fill the lack of design, UI and UX here. Imagination is the best modern feature of 2022!

Thanks and see you sun ☀️