p5.party

p5.party is a library for easily creating online multi-user sketches with p5.js. With p5.party you can quickly prototype ideas for multiplayer games, real-time multi-user apps, and multi-computer art projects.

https://github.com/jbakse/p5.party

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.1%) to scientific vocabulary

Keywords

multiplayer multiuser p5 realtime
Last synced: 6 months ago · JSON representation ·

Repository

p5.party is a library for easily creating online multi-user sketches with p5.js. With p5.party you can quickly prototype ideas for multiplayer games, real-time multi-user apps, and multi-computer art projects.

Basic Info
  • Host: GitHub
  • Owner: jbakse
  • License: mit
  • Language: JavaScript
  • Default Branch: main
  • Homepage: https://p5party.org/
  • Size: 11 MB
Statistics
  • Stars: 59
  • Watchers: 2
  • Forks: 46
  • Open Issues: 5
  • Releases: 25
Topics
multiplayer multiuser p5 realtime
Created almost 6 years ago · Last pushed 12 months ago
Metadata Files
Readme License Citation

README.md

![p5.party logo](assets/p5_party_logo.png) ![NPM](https://img.shields.io/npm/l/p5.party) ![GitHub package.json version](https://img.shields.io/github/package-json/v/jbakse/p5.party) ![GitHub commit activity](https://img.shields.io/github/commit-activity/m/jbakse/p5.party) ![jsDelivr hits (npm)](https://img.shields.io/jsdelivr/npm/hy/p5.party) [![Website](https://img.shields.io/website?down_message=offline&label=documentation&up_message=online&url=https%3A%2F%2Fwww.notion.so%2Fp5-party-Documentation-887564cad8ec455e9bee994362322f2e)](https://www.notion.so/p5-party-Documentation-887564cad8ec455e9bee994362322f2e) [![Website](https://img.shields.io/website?down_message=offline&label=examples&up_message=online&url=https%3A%2F%2Fp5party.netlify.app%2F)](http://p5party.netlify.app) Test Coverage: ![Statements](https://img.shields.io/badge/statements-97.95%25-brightgreen.svg?style=flat) ![Branches](https://img.shields.io/badge/branches-92.03%25-brightgreen.svg?style=flat) ![Functions](https://img.shields.io/badge/functions-94.91%25-brightgreen.svg?style=flat) ![Lines](https://img.shields.io/badge/lines-97.78%25-brightgreen.svg?style=flat)

Multi-player Games with p5.js

p5.party is a library for easily prototyping online multi-user sketches with p5.js. With p5.party you can quickly test ideas for multiplayer games, realtime multi-user apps, and multi-computer art projects.

p5.party Website

Documentation

Demos + Examples

Discussion

What is it good for?

Prototyping + Sketching

p5.party provides a simple, imperative interface for working with shared data inspired by the programming conventions used by the p5.js api. p5.party let's you try ideas quickly without writing server code or setting up a front-end/back-end stack.

Workshops + Classes

p5.party uses a deepstream.io server which is easy to set up and cheap—or free—to run. Many sketches and projects can connect to the same p5.party server, so students can focus on sketching instead of setting up servers.

What is it not good for?

Production

p5.party is designed for prototypes. As your project grows, you'll need to look into other libraries and backends that suit your project's needs.

Security

Sketches built with p5.party are insecure. p5.party has no method to authenticate or authorize users. Multiple apps share a server and can read, write, and delete each other's data.

Features

Shared Data Objects

With p5.party you can easily create a shared data object that is automatically synchronized between instances of your sketch. You can assign and read properties on these objects just like a plain old local javascript object.

Multiple Apps and Rooms

A single p5.party server can support many apps and each app can group users into rooms. p5.party keeps track of which clients are in each room and shares the data to the right clients.

Client-side Hosting

p5.party automatically designates one (and only one) guest in each room as the host. Your code can easily check if it is the host and take care of running the party. This lets you avoid writing server-side code and makes prototyping faster.

Show Me Some Code!

html <script src="https://cdn.jsdelivr.net/npm/p5@latest/lib/p5.js"></script> <script src="https://cdn.jsdelivr.net/npm/p5.party@latest/dist/p5.party.js"></script>

```javascript let shared;

function preload() { // connect to server partyConnect("...", "hello_party");

// load a shared data object shared = partyLoadShared("shared"); }

function setup() { createCanvas(400, 400); noStroke(); fill("red");

// set initial values if they are not set* shared.x ??= width * 0.5; shared.y ??= height * 0.5; }

function mousePressed() { // write shared data shared.x = mouseX; shared.y = mouseY; }

function draw() { background("white"); // read shared data ellipse(shared.x, shared.y, 100, 100); } ```

*using the newish ES2020 ??= Operator

Installation and Quickstart

The quickest way to get started with p5.party is to load it from a CDN or download the latest release .

Visit the P5 Web Editor Quick Start Guide or VS Code Quick Start Guide to get started!

Server Installation

You can set up a server in a few minutes using Heroku and a clone of the p5.party repo.

Server Setup

Contributing

We welcome new contibuters. Please feel free to start a discusion, post issues, or request features. If you want to help with writing code or documentation, you can start by indicating your interest on an open issue or by creating your own.

License

Distributed under the MIT License. See license for more information.

Acknowledgements

p5.party builds on deepstream.io and sindresorhus/on-change. Deepstream is a realtime data-sync server that can be easily self hosted on services like heroku or aws. on-change uses javascript proxies to make a fully observable object. p5.party uses on-change to watch for changes to shared data objects and then communicates these changes to deepstream. p5.party also depends on a number of other great packages.

Contributors

p5.party was created by Justin Bakse, Munro Hoberman, and Isabel Anguera.

Contributions by Tanvi Mishra, Apurv Rayate, Hyacinth Weng, MJ Gomez-Saavedra, Shayla Lee

Thanks To

Jessie Han, An Kong, Kevin Lin, Malin Mabika, Tanvi Mishra, Brittany Price, Apurv Rayate, Beatriz Ribeiro Dos Santos, Tong Shao, Hyacinth Weng, Winnie Yuxiang Zhai, Joan Jingwen Zhang, Jasmine Chen, Joshua Davison, Caitlin Keating, Simone Liu, Zhuoran Ma, Rand Rivera, Runzhe Sha, Haotian Wang, Ziyi Wang

Owner

  • Name: Justin Bakse
  • Login: jbakse
  • Kind: user
  • Location: New York

Citation (CITATION.cff)

# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
message: "Thank you for using p5.party. You can cite it as below."
title: p5.party
authors:
  - given-names: Justin
    family-names: Bakse
type: software
url: https://github.com/jbakse/p5.party
date-released: 2020-05-03

GitHub Events

Total
  • Issues event: 3
  • Watch event: 7
  • Delete event: 3
  • Issue comment event: 9
  • Push event: 10
  • Pull request event: 6
  • Fork event: 11
  • Create event: 4
Last Year
  • Issues event: 3
  • Watch event: 7
  • Delete event: 3
  • Issue comment event: 9
  • Push event: 10
  • Pull request event: 6
  • Fork event: 11
  • Create event: 4

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 471
  • Total Committers: 4
  • Avg Commits per committer: 117.75
  • Development Distribution Score (DDS): 0.151
Top Committers
Name Email Commits
Justin Bakse j****n@t****m 400
Isabel Anguera i****2@g****m 31
redmoe 3****e@u****m 24
dependabot[bot] 4****]@u****m 16
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 17
  • Total pull requests: 60
  • Average time to close issues: 6 months
  • Average time to close pull requests: 4 months
  • Total issue authors: 9
  • Total pull request authors: 6
  • Average comments per issue: 1.47
  • Average comments per pull request: 0.3
  • Merged pull requests: 37
  • Bot issues: 0
  • Bot pull requests: 37
Past Year
  • Issues: 2
  • Pull requests: 7
  • Average time to close issues: N/A
  • Average time to close pull requests: 7 days
  • Issue authors: 2
  • Pull request authors: 3
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 4
Top Authors
Issue Authors
  • jbakse (8)
  • BlueSage96 (2)
  • luizbills (1)
  • bojidar-bg (1)
  • ShaoT-Hugh (1)
  • lcivita99 (1)
  • b3aribeiro (1)
  • huaigulin (1)
  • rahji (1)
Pull Request Authors
  • dependabot[bot] (41)
  • isabel-anguera (14)
  • redmoe (5)
  • ana-konzen (2)
  • luizbills (1)
  • jbakse (1)
Top Labels
Issue Labels
documentation (3) enhancement (3) good first issue (2) examples (1)
Pull Request Labels
dependencies (41)

Dependencies

package-lock.json npm
  • 831 dependencies
package.json npm
  • @types/jest ^28.1.1 development
  • @typescript-eslint/eslint-plugin ^5.26.0 development
  • @typescript-eslint/parser ^5.26.0 development
  • buffer ^6.0.3 development
  • css-loader ^6.5.1 development
  • esbuild ^0.14.42 development
  • eslint ^8.16.0 development
  • eslint-config-p5js ^1.1.0 development
  • genversion ^3.0.2 development
  • istanbul-badges-readme ^1.8.1 development
  • jest ^28.1.0 development
  • jest-css-modules ^2.1.0 development
  • jest-environment-jsdom ^28.1.0 development
  • np ^7.6.0 development
  • ts-jest ^28.0.3 development
  • typescript ^4.7.2 development
  • @deepstream/client ^5.2.6
  • @deepstream/server ^5.2.6
  • on-change ^4.0.0
  • reefjs ^11.0.1
  • ts-dedent ^2.2.0