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 🙏

© 2025 – Pkg Stats / Ryan Hefner

poh

v1.0.0

Published

Pico Proof-of-Honor Kernel

Downloads

12

Readme

poh.core

This is the kernel for the P2PMMO game: Proof of Honor.

The core is transaction-based and headless meaning that you can send your action-blocks to a buddy and a perfect copy of your character appears in their world.

  • it's written ontop of pico
  • can use hyperswarm for multiplay
  • is totally missing an UI - Please PR/or Issue if you build one!

asciicast

Objectives / How to play

Once every 24 hours a Hero may
append 1 block of actions - each block
must end with either going to sleep at a tavern or death.

boot

Initialize kernel and create a new character:

import { boot } from 'poh'

const kernel = await boot()

const name = 'Duncan the peerless'
const memo = '<Last words on death>'

await kernel.createHero(name, memo)


// character sheet is exposed as a reactive-store

const unsub = kernel.$player(hero => {
    console.log('current stats and inventory', hero)
})
unsub()

begin

Now that you have a kernel and a hero, you can begin exploring,
maybe visit the town for some shopping:

import {
I, // Items
A  // Areas
} from 'poh/db'

const session = await kernel.beginPVE()

// walk to town
await session.travelTo(A.crossroads)
await session.travelTo(A.town)

// Buy a dagger
await session.interact(0, 'buy', I.dagger, 1)

// Check inventory
kernel.$player(h => console.log('Inventory', h.inventory))()

// Equip the weapon
await session.use(I.dagger)

Good, now we're ready for adventure!

// walk back to crossroads
await session.travelTo(A.crossroads)

// look for trouble
const encounter = await session.explore(0)
console.log('You encountered', encounter)

battle

If a the encounter is hostile, you'll be locked in session.state == 'battle'\ at which point you are forced to choose one of the following:

// Hit the critter
result = session.doBattle('attack')

// Use a skill/spell
result = session.doBattle('cast', 'firebolt')

// Attempt escape
result = session.doBattle('run')

Note: Each round you're allowed to use 1 item session.use(I.herb) before you commit your combat action via session.doBattle()

sleep

Once you're happy with your achievements it's time to save state and call it a day:

// goto area with tavern/bed
await session.travelTo(A.town)

// sleep

const [diff] = await kernel.commitPVE()

console.log('gold, xp and stats gained', diff)

note: k.commitPVE() broadcasts your character to the network
if kernel was booted with swarm K = await boot(Hyperswarm)

Ok that's pretty much the gist of it;
But always keep an eye on:

kernel.$player(hero =>
  console.log('current exhaustion', hero.exhaustion)
)()

because:

[!IMPORTANT] All actions that require random/rolls increase exhaustion

exhaustion > 1024 = DEATH

reference

Checkout test.js:89 'Express gameplay as functions' for a complete implementation of gameplay.

Checkout testnet.js for multiplayer/w bots.

Prior attempt / version 0: PoH-2020

LICENSE

AGPL-version-3

Clarification:

  • do whatever you wish with your UI / assets
  • please PR patches and changes to gameplay, so everyone can play the same game.
  • no sublicensing (even if you're a cool dude). the license is the license.

All wrongs reversed 🄯 2024 Tony Ivanov - decentlabs