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

@vimazing/the-last-startyper

v0.6.0

Published

A fast-paced typing game with dynamic mode switching. Type falling text (letters, words, sentences, paragraphs) before it reaches your ship.

Downloads

13

Readme

The Last StarTyper

A fast-paced typing game built with React and TypeScript. Type falling text before it reaches your ship!

Features

  • Four Game Modes: Letters, Words, Sentences, and Paragraphs
  • Dynamic Mode Switching: Change game modes at runtime for endless variety
  • Real-time Score Tracking: Track correct/incorrect keystrokes and deaths
  • Visual Effects: Laser hits, ship explosions, and perspective effects
  • Platform Integration: Customize speed, content, and mode switching via options
  • Independent Content Tracking: Each mode tracks completion separately

Installation

npm install @vimazing/the-last-startyper

Quick Start

import { useGame } from '@vimazing/the-last-startyper';
import '@vimazing/the-last-startyper/game.css';

function App() {
  const game = useGame({
    gameMode: 'letters',
    downwardSpeed: 100,
  });

  return (
    <div>
      <div ref={game.containerRef} />
      <button onClick={game.startGame}>Start</button>
      <p>Score: {game.scoreManager.score}</p>
    </div>
  );
}

Game Modes

Letters

Single characters fall one at a time. Type each letter to destroy it.

Words

Full words fall from the top. Type each character of the word sequentially.

Sentences

Multi-line sentences with perspective effect. Continue typing through line breaks.

Paragraphs

6-line paragraphs with advanced perspective and smooth line transitions.

API

useGame(options?, platformHook?)

Main hook for initializing the game.

Options:

type GameOptions = {
  gameMode?: 'letters' | 'words' | 'sentences' | 'paragraphs';
  downwardSpeed?: number; // pixels per second
  boardDimensions?: [number, number];
  wordList?: string[];
}

Returns:

type GameManager = {
  containerRef: RefObject<HTMLDivElement>;
  renderBoard: () => void;
  gameStatus: 'waiting' | 'started' | 'game-over' | 'game-won';
  setGameStatus: (status) => void;
  startGame: () => void;
  quitGame: () => void;
  cursor: CursorManager;
  scoreManager: ScoreManager;
  keyLog: KeyLogEntry[];
  clearKeyLog: () => void;
  getKeyLog: () => KeyLogEntry[];
  handleTypedLetter: (letter: string) => void;
  changeGameMode: (options: GameOptions) => void;
}

Platform Hook

Pass a function to useGame to receive game events:

const platformHook = (gameManager: GameManager) => {
  // Analytics, custom bindings, monitoring, etc.
  window.addEventListener('keydown', (e) => {
    if (e.key === 'h') showHelp();
  });
};

const game = useGame(options, platformHook);

Gameplay Controls

  • Space: Start/Restart game
  • Esc: Quit game
  • A-Z, 0-9, . , ! ?: Type characters to destroy falling text

Score Tracking

Access detailed metrics via scoreManager:

game.scoreManager.score         // Current score
game.scoreManager.correct       // Correct keystrokes
game.scoreManager.missed        // Incorrect keystrokes
game.scoreManager.deaths        // Deaths (text hit ship)
game.scoreManager.currentCount  // Count for current mode
game.scoreManager.lettersCompleted
game.scoreManager.wordsCompleted
game.scoreManager.sentencesCompleted
game.scoreManager.paragraphsCompleted

Mode Switching

Request mode changes at runtime:

// Platform can request a mode change anytime
game.changeGameMode({ gameMode: 'words', downwardSpeed: 75 });

// Mode change applies after current text completes
// Maintains independent completion counts per mode

Example

See the /example directory for a full implementation with:

  • Test state machines
  • Score-based and count-based transitions
  • Custom platform hook
  • Complete UI

License

MIT

Author

André Padez - VIMazing Project