npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@attention1/game-elements

v0.0.2

Published

This is an experiemental platform to distribute web (components) based games, and connect players as peers with [WebRTC](https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API).

Downloads

3

Readme

game-elements

This is an experiemental platform to distribute web (components) based games, and connect players as peers with WebRTC.

This project only involves frontend code running in the client's browser. WebRTCPeerConnection(s) can be establised with various methods, without the need of a predefined server; a user can decide how-to.

This project also tries to takes advantages of the Matrix.org ecosystem, as one of the signaling method (send-to-device), as well as by posting game results, and chats, into matrix public rooms (project chat in #attention1-game-elements:matrix.org).

Usage

It is possible to play online, offline, develop on the project, re-use & customize the project elsewhere.

Play games

To play games go on the website and select a game in the game selection menu.

Install game-elements in an other project

This project is written in HTML, CSS, Javascript, and distributed as a npm package.

  • https://www.npmjs.com/package/@attention1/game-elements
  • install with npm i @sctlib/game-elements

Objectives

  • play with creating "simple web based games"
  • play with web-rtc peer connections
  • try to create multiplayer games (and game validation, no noone can cheat?!)
  • play with rtc-peer signaling without server

Development

  • npm i
  • npm run dev

Code is Javascript, HTML, CSS, web-components written with lit.

Project ideas

Games could be anything in the context of this app, when a game is selected from the project's UI <select/> element, a web-component with the same name is rendered (see #renderGame()).

The game should be an existing web-component/custom-element (otherwise it will be an undefined custom HTML element, with no feature). All known games are defined in the config file.

This is all experiemental and for research and enjoyment

Todo directions

  • be able to gather webrtc peers, and play game together
  • be able with peers, to "customize" a game room (like a matrix room), with widgets (games, video, audio)
  • connect peers in network (mesh etc.)
  • be able to create "teams of peers"
  • (lazy) import (and define) games as javascript modules (and web-components)
  • improve game management / definitions / events, so it can support "many games", and each can be added easily
  • improve concept of a "user" so they can customize their gaming experience, avaiable games; maybe even add games (matrix-rooms, rtc distribution)