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

@qteatime/kate-desktop

v0.23.4-a1r2

Published

Electron-based desktop application for the fantasy handheld console Kate.

Downloads

5

Readme

Kate

NOTE: Kate is an experimental proof-of-concept currently, expect it to randomly break on every new release (or, like, just on a regular usage). Cartridge format is not final and old binaries will not work on version changes.

Kate is a fantasy handheld console designed for simpler story-rich games, like Visual Novels and 2d RPGs. It looks like an old handheld, but runs on Windows, Mac, Linux, or in your browser. That way, you can easily and safely share small games as a single file that can run anywhere; and players can install and play it without worrying too much about security, since it's all sandboxed!

You can dive into more details about the concept and technical specifications on Kate's Concept Paper. To understand more about what technology powers Kate, and what guarantees you can expect from it, see the Kate's Underlying Technology page.

You can try Kate directly from your web-browser: go to https://kate.qteati.me/ and install the hello.kart file provided in this repository by drag-dropping it over the console.

Installation

Kate only supports installing from npm currently. You'll need Node.js 16+ installed. Run the following from the command line:

$ npm install @qteatime/kate-desktop@experimental

You can then start it from the command-line as well:

$ kate-desktop

Alternatively, you can use Kate online from https://kate.qteati.me/. It's possible to install the page as a web application and have it work offline:

  • On Windows 10+: open the page in Microsoft Edge and choose Apps -> Install site as an app from the menu;
  • On iPhone: open the page in Safari and choose Share -> Add to Home Screen;
  • On Android: open the page in Google Chrome and choose Install app from the menu;

Specifications

| | | | ------------------------ | ------------------------------------------------------------- | | Display | 800x480 — a 5:3 screen | | Cartridge size limit | 512mb | | Input | D-pad, O, X, L, R, Menu, and Capture (6 buttons), multi-touch |

Default input configuration

| Kate | Common uses | Keyboard | | -------- | ------------------------------------------------- | ------------ | | D-pad | Navigation, directional input | arrow keys | | O | Confirm selection, Ok | Z | | X | Cancel selection, alternate input | X | | L | Previous page | A | | R | Next page | S | | Menu | Contextual menu, long-press for OS menu | left Shift | | Capture | Take a screenshot, long-press for recording video | left Ctrl |

Hacking on Kate

The core of Kate is written in TypeScript, some tools are written in Crochet. To build Kate you'll need at least a working Node.js environment.

Setup things with:

$ npm install
$ node make all

After this you should have a working Kate. You can either use node make desktop:run to run it as an Electron app, or start a server on the www folder and point a modern browser there.

You should see a screen similar to the screenshot above, but without any cartridges. Drag the hello.kart file from the examples/ folder and drop it over the console to install it. Then either click the game or use the keyboard/virtual buttons to play.

Examples

See the examples/ folder in this repository for some example games. You can build all of them into cartridges by running node make example:all.

  • Hello, from Kate: A hello-world type demo that shows what keys you're pressing (uses the input API).

  • Boon-scrolling: A small "doom-scrolling" simulation with procedural generation (uses the cart_fs, audio, and input APIs, as well as the domui library for UI).

Cartridges and runtime

Kate games are packaged as a single .kart binary file. This file contains something that can run in a webbrowser, a specification of which runtime it needs to use, some meta-data, and a set of arbitrary files in a read-only file-system. In that sense, it's much like a .tar or .zip file, just without compression and with some additional meta-data for the console.

Currently the only supported runtime is Web Archive, which means you provide an HTML entry point and Kate will display that page in the console in a fully sandboxed IFrame with JavaScript support.

This means no access to things like fetch or even loading images. In order to remediate that, Kate provides an IPC layer that allows this sandboxed process to do things—by posting messages to the parent window, and handling messages sent by the parent window.

Web APIs can be emulated through what Kate calls "bridges": small scripts injected into the page that replace common Web APIs with an implementation over Kate's IPC, so the game in question doesn't need to be Kate-aware.

By doing this, there's also no need for a web-server. Games can be played locally using all standard web technologies (and some enhanced Kate ones), and without worrying about network latency when loading resources. Players on the other hand enjoy the same benefits of regular executables without having to worry about sandboxing them themselves, or playing them in a different machine.

You build these .kart files using the included kate-packaging (kart) application, providing it with a JSON configuration file and an output location. For safety the cartridge can only include files that are contained in the directory of the JSON file.

See the hello-world example cartridge for some practical example of how this all works.

Roadmap

For the current work, see the Kate Preview meta-issue.

Future planned features:

  • Additional APIs:
    • Touch-input support;
    • Keyboard/Virtual keyboard input for text;
    • Haptic feedback/vibration;
    • Object store API (flat, tag-based file system);
    • Object database API (IndexedDB-like);
    • Badges/achievements API;
    • Networking API;
    • Improved audio API (effects, graphs, etc);
    • Improved screen recording/capture API with audio;
  • KateOS UI improvements:
    • Reconfiguring keybindings;
    • Tracking play times locally;
    • Game collections and filtering;
    • Browsing cartridges' object store/key-value store;
    • Extending media gallery to videos;
    • OST player for cartridges;
    • "Store", for finding games in connected distributed repositories;
    • Audit, for auditing security logs/actions in the console;
  • Supporting games not designed for Kate:
    • Proxying HTML Audio/Web Audio APIs;
    • Proxying IndexedDB API;
    • Full support for common game engines through bridges;
  • Supporting tooling:
    • Kate IDE, a fully integrated way of building Kate games;

Licence

Copyright (c) 2023 Q. Licensed under the permissive MIT licence.