Giter VIP home page Giter VIP logo

jkenlooper / puzzle-massive Goto Github PK

View Code? Open in Web Editor NEW
33.0 2.0 5.0 50.71 MB

Massively Multiplayer Online Jigsaw Puzzles

Home Page: https://puzzle.massive.xyz/

License: GNU Affero General Public License v3.0

Makefile 0.98% Python 44.96% Shell 15.04% HTML 3.03% JavaScript 19.14% CSS 4.80% Jinja 8.07% HCL 3.92% Dockerfile 0.07%
jigsaw-puzzle web-game multiplayer side-project browser-game lit-html chill flask

puzzle-massive's Introduction

Puzzle Massive

A Massively Multiplayer Online Jigsaw Puzzle as a web application. Jigsaw puzzles are made from randomly generated classic interlocking pieces and can be 5000+ pieces. Players can collaborate on the same jigsaw puzzle in real time. Other player's piece movements are moderated automatically in order to prevent abusive behavior.

Version 3 the rewrite

Further development of Puzzle Massive version 3 is at https://git.sr.ht/~jkenlooper/puzzle-massive. There are no plans of keeping the version 3 codebase backwards compatible with version 2. Version 3 may be reusing code from version 2 but will have a clean git history.

Version 2

While this version does work and doesn't have too many issues, I am no longer going to actively run a website that is using the version 2 codebase.

Issues for version 2 can be tracked via the projects source code repository https://github.com/jkenlooper/puzzle-massive/issues.


PRs Welcome

code style: prettier code style: black

Local Install Instructions (TL;DR)

Minimal setup to get it running on your local machine at http://localhost:38682/.

cd client-side-public && make && cd -
vagrant up
vagrant provision --provision-with shell-init-dev-local
vagrant provision --provision-with shell-testdata-puzzles-quick

More documentation is available within the docs directory.

Getting Help

Ask questions on:

I try to monitor the Puzzle Massive chat channel on Discord . This project is slightly complex with a few moving pieces (pun intended); that being said, there is a good chance that a piece or two are missing when putting the project together. If you have ran into a problem getting this project working on your own machine; please ask for help. I'm looking to improve the process where I can and am looking for more experience helping others in web development stuff like this.

Change Log and History

This project has been moved to GitHub with a fresher git commit history. The previous git commit history is available upon request. I've chosen to make Puzzle Massive an open source project under the GNU Affero General Public License.

Changelog since 2.0.0

License

Puzzle Massive. An online multiplayer jigsaw puzzle. Copyright (C) Jake Hickenlooper

Only the source code that is used for Puzzle Massive is licensed under the GNU Affero General Public License. Content included in this project is licensed under the Creative Commons Attribution 4.0 International License.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see http://www.gnu.org/licenses/.

DigitalOcean Referral Badge

puzzle-massive's People

Contributors

bp4rker avatar dependabot[bot] avatar jkenlooper avatar phlnx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

puzzle-massive's Issues

Last player standing puzzles

Tournament puzzle that has a set start date.
Has players that are invited in.

Set intervals it drops players out (20 players 2hr session 6 min interval drop out)
puzzle divided in to sections base on how many intervals
Example 2000 piece puzzle, 200 piece section every 6 minutes player is dropped.
reward idea have a ranked system similar to chess each rank up you get a different border around your icon like diamond, gold, bronze, peppermint, wood

Allow separate karma rules for a puzzle

For some puzzles the default rules for when the karma points decrease can be flawed and thus preventing players to move pieces. This is mostly caused when puzzles have irregular shaped puzzle pieces and the threshold with pieces in proximity are too low. For example this puzzle that was rendered with an older version created small piece fragments.

Another case for puzzles that would benefit are larger ones with very similar pieces. For example, a puzzle with a lot of sky pieces may require the player to move the same piece multiple times before joining it to another piece. The threshold for moving the same piece multiple times in this case should be higher on that puzzle.

Having these settings on a puzzle could possibly prevent players from being banned and thus less need for #47.

Maybe the players could adjust the thresholds? It could be another use for dots earned. To adjust the threshold on a puzzle would require using dots. These settings should be permanent to that puzzle.

Speed up render process for puzzles, and allow forking of puzzles

Have the option of creating a new puzzle from an existing. Allow changing the pieces count and other attributes like background color.

In order to do that the render process needs to be optimized.

Have a way to remove extra resources for puzzles when they have been complete and idle for a certain time period.

A site configuration will have options for how players can have of puzzle instances made. These could be based on dots or manually added per player. A future feature could tie into a online store.

Mock up of puzzle instance slots shown to a player. This shows a player with one active puzzle instance and 3 more slots available.
puzzle-instance-slots-in-header-mock-up

Competition Page

The previous competition's scores and jigsaw puzzles.

Maybe also manually enter the date for the next upcoming 'puzzle party' competition.

#1 Related to

Add badges to player profiles

Players could earn different badges depending on various things like completing a 3000+ piece puzzle or being on a puzzle with 10 other players.

Hidden Thursday

Create a new puzzle with no need for attribution. No preview image. Set as Puzzle of the Day.

Allow unlisted (private) puzzles to be created

This was a feature in the past, but was disabled. I think it could easily be brought back since it has value. There will probably be a lot of changes to accommodate this change.
Private puzzles would still need to be moderated the same way as I don't want to have copyrighted images or questionable content hosted on the site. It would allow players to use their own images without making them totally public. The link to the private unlisted puzzle is still shareable. The puzzle would just not show up on any of the puzzle listings.
On the player profile page I think it 'could' show up in their own listing of puzzles that were created by them.
An out of scope feature would be to add the ability to allow players to easily share a private puzzle with other players. This is related to #8.

Update:
Unlisted puzzles are supported when a player creates a new instance of an existing public puzzle.

Also, puzzles that have permission set to public can be updated to be private. This currently requires manually updating the sqlite3 Puzzle table, however. This feature is more specifically allowing a player to create a new puzzle from a new image they uploaded and mark it as unlisted. I think that this feature would be something that should be monetized. An item on the buy-stuff page could be added to allow players to create private puzzles from their own uploaded image.

Multiple variants of piece counts for each puzzle

For all existing puzzles; create new puzzles with varying piece counts of 30, 100, 500, and 1000. If the original puzzle piece count was higher then 1000; then recreate with that piece count as well.

Advent puzzles

Based on a advent calendar where each day you get a few more puzzle pieces that should all be able to join to at least one other piece. Would be an invite only puzzle.

Puzzles with multiple sides

This is yet one more puzzle type. The idea is that puzzle pieces can have a back side that can be flipped. That backside could be another picture therefore making the puzzle even more difficult. Of course since this is implemented via software, it can have more than just 2 sides.

This would be a new puzzle variant that would be added to the PuzzleVariant database table.

Cancel or un select a piece

Sometimes a user may have clicked on the wrong piece and needs to be able to unselect it. The major use case is when that piece is part of a larger group and the player doesn't want to have karma points deducted.

It should use the same function as when the current selected piece is moved by another player. This function is found in the puzzle-pieces/src/puzzle-pieces.js onPieceUpdateWhileSelected .

The build process for puzzle-pieces.js is not the greatest and could be improved since the tools have been updated to support web components and such.

Allow a player to use Instagram to authenticate

Players that have an Instagram account can choose to authenticate and authorize the Puzzle Massive application. The application will only need to have the basic permissions which are to read the user's profile and media. With this integration the player can choose to create puzzles with photos on their Instagram account.

This would also be the process for a photographer to mark photos from their Instagram account to be okay to use on Puzzle Massive. This would allow any other player to create a puzzle with one of those photos and have the proper attribution added.

The Instagram account owner should also be able to remove puzzles from the site that were made with their photos.

A player can also use their Instagram account to login with Puzzle Massive and no longer need to use the anonymous login link.

The following are known to be prerequisites to this new feature.

  • Switch to using https protocol (SSL)
  • Store email with player profile so a player can login that way instead of using Instagram
  • Allow players to delete their account. Doing so would also remove any puzzles created with their photos?
  • #30 Support emailing the player when their puzzles are ready and such
  • #45 if the player is not using a public Instagram account or wishes to not create public puzzles with their photos.
  • #7 would allow photos to be submitted instead of just suggested.

Show timer on puzzle

Have a clock icon that will toggle showing the timer. Timer should automatically stop when no piece movements in the last 5 minutes.

Needs to record and show fastest time. Both the fastest time and current time should show on the front page.

Puzzle invites

Players can send invites to other players to go to a puzzle of their choosing. The other player will be shown a pop-up or other notification that the player wants them to join that puzzle.

Puzzle rebuild process

Instead of having a puzzle reset when complete; it needs to have it's resources rebuilt. This will prevent scripts from auto completing puzzles based on the CSS. It will also help migrate older puzzles to the newest rendering process.

  • Needs to keep the same URL.
  • The puzzle resources will need to have some way of cache-busting
  • A new status will be added: REBUILD

How to handle players that get blocked?

The karma rules on a puzzle are meant to prevent abusive players from ruining a puzzle for everyone else. However, there are some cases when a player that was doing a puzzle is blocked because they moved too many pieces or didn't notice the karma bar going to empty. A issue to improve that with a warning notification should happen, but this open discussion is about fixing it after a player has been blocked.

  • Should other players be allowed to reset the karma on the player that was blocked? This could be done by either using their dots or possibly using some of their karma points. Maybe it could require at least 2 other players to do so?

  • Or should the player's dot amount steadily deplete when the karma for a puzzle hits 0. Then the player wouldn't be added to the blocked player list until they also ran out of dots? This would be aligned with the goal of preventing new players that just want to be a nuisance and haven't really done any puzzles in the past.

  • Or should an admin have an interface that they can manually edit a player's karma points?

Maybe all the above should be done. Okay, thanks.

Puzzle types

Puzzles can be a single variant and default to 'classic' for the classic interlocking puzzle piece shape. Other variants may be more bizarre like multiple sided pieces (#44) or overlapping shapes (#14) for example.

Puzzles can have multiple features added when a puzzle is being created or a new instance of that puzzle is being made by a player. These features could be:

Puzzle Party Page

Should show upcoming puzzle party competitions with date and time and who will be entering. Allow players to rsvp which will show a list of bit icons on the page that plan to come. Show the upcoming puzzle party on the home page?

The previous puzzle party competition's scores and jigsaw puzzles.

Also a form to register for the next upcoming party or to create a puzzle party competition.

Player admin page

Allow editing and viewing player details. Action buttons should also include things like ban IP.

Reward ideas

Taken from some old ideas

  • fancy effects for piece movements (rotating, fading, etc.),
  • ability to hide/hoard pieces
  • stubborn fist (make those pieces fit!)
  • score suckers (moving 'infected' pieces degrades your score)
  • bit swap/stealing

Corner pieces can snap to puzzle outline

Replace the initial top left corner from being already placed in the top left corner. Allow corner pieces to snap to their positions and be a part of the 'fixed' group.

Overlapping shapes puzzle pieces

These could be randomly generated to be of different sizes and shapes. The pieces connect by overlapping parts of the pieces' image that are identical.

Massive Monday Puzzle

On Monday only one public puzzle would be available to play. Any players that join pieces on it will get a badge if the puzzle is completed before the end of the day.

Will need to trigger a 'critical mass' of active players on the site in order for Massive Monday. Show an alert/info bar at top of site where it shows how many players are playing. Also show the most active puzzle that will be used if critical mass is reached.

When going to other puzzle pages the UI should prevent being able to access/play any other puzzle then the current Massive Monday one.

Create suggest image for puzzle form

This will replace the jot form implementation. This form will potentially be open to a wider audience and so I need it to not allow image uploads. It should be rather simple in it's design. Don't bother too much with copyright details and other text, since the player won't read it.

  • URL field that will be used for linking to the image
  • Piece count field

At the bottom it needs some text describing the process of submitting an image for a puzzle. Also suggest a few sites to visit to find good puzzles.

Somewhere describe that only players with the contributor role may upload images for puzzles.

Start and end time for puzzles

An optional start and end time can be associated with the puzzle instance and should be shown on the page.

The time elapsed should also be shown on the page (See issue #40 )

Sorter bot

A sorter bot can be attained by other means. The sorter bot can be deployed to a puzzle to gather specific pieces. Each sorter bot is only able to gather one type of piece and can't be re-configured later. The types of pieces would be at first just the general color of a piece, or if a piece has that color in it.

Players that use a sorter bot will have to spend dots to maintain it.

Sorter bots work mostly on the server end. The bot on the client end gets a position that it needs to travel to by a certain timestamp. After it gets there it can send another request to the server for the next position to travel to. The server sends a response back if the bot has found a piece. The bot will follow the directions back to it's target drop point with the piece that it found. Other players can steal the piece that the bot has found; which will cause the bot to look for another piece.

Stats page

Show puzzle counts for complete, active, etc..

Show player counts

Piece moves, joins in the last hour, day, week, total.

Improve anonymous login

Maybe show the anonymous login link as soon as the register a bit icon?

Allow them to link their email in order to get their login link sent to them.

Auto set puzzles to FROZEN when move api has error

Prevent further pieces from getting bad data set by setting the status to frozen for the puzzle. Ideally a notification should be sent.

In the puzzle admin create a way to set these frozen puzzles to buggy_unlisted after the fix to the code has happened and fixing the data isn't worth it.

Ignore 500 errors on puzzles that have been set as buggy_unlisted.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.