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

bgrio

v0.0.3

Published

Welcome This project is a framework to create boardgames in Typescript, React and SocketIO. It my hobby to create some games. I was using Boardgame Arena Studio, on my PHP times. And now, I could use [boardgame.io](https://boardgame.io).

Downloads

1

Readme

bgrio-framework

Welcome
This project is a framework to create boardgames in Typescript, React and SocketIO. It's my hobby to create some board games. I was using Boardgame Arena Studio, on my PHP times. And now, I could use boardgame.io.

But the goal is to do my sandbox main project and use it to be the beta tester of it too ^^

Create a new game

A game is composed of X parts :

  • UI :
    • handles socket events
    • emits socket events
    • routing from game state
  • game parameters:
    • icon
    • title
    • describtion
    • player settings
      • min player
      • max player
      • default number of player
    • specific parameters
  • socket events to add on server

How to install a game ?

You first need to create a bgrio app :

npm install bgrio-framework
npx bgrio-framework create app my-game-app

After, you have to add content / games. You can create a new one or you can install one done by someone else. Install it and add it to the app. Then, you have to start the bgrio app. Here are an example :

index.ts

import { BGRIO_GameEvents, BGRIO_Server } from 'bgrio-framework'
import {server as LimitLimit} from 'bgrio-limitlimit'

const games: BGRIO_GameEvents = [
    LimitLimit
]

const server = new BGRIO_Server(games)
server.start()

index.tsx

import * as React from 'react';
import * as ReactDOM from 'react-dom';
import { BGRIO_GameUI, BGRIO_App } from 'bgrio-framework'
import {UI as LimitLimit} from 'bgrio-limitlimit'

const games: BGRIO_GameUI[] = [
    LimitLimit
]

ReactDOM.render(
  <BGRIO_App games={games} />,
  document.getElementById('root') as HTMLElement
);

registerServiceWorker();

How to create a game ?

A boilerplate is accessible running

npx bgrio-framework create game my-game

It create a folder named my-game or whatever you want :)

my-game
└─── src
│   │   index.ts
│   │   server.ts
│   │   client.tsx
│   └─── modules
│       │   Card.demo.ts
│       │   Player.demo.ts
│       │   Game.demo.ts
│ package.json
│ tsconfig.json
│ README.md

What to do now ?

There are a lot of prebuilt game components, for game model, websockets events or even react components. It means you are still completly free to create your game with your patterns but for an easier start, extends them ^^ You have multiple npm packages to have the perfect toolbox for your game.

  • @bgrio/ui: tsx package with some usefull components. All packaged in a storybook app if you want to see cool components.
  • @bgrio/core: ts package with helpers, framework initializer (server and ui)
  • @bgrio/cli: toolbox to generate app, components from example, game skeleton, etc...