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

nostalgist

v0.10.0

Published

Nostalgist.js is a JavaScript library that allows you to run emulators of retro consoles within web browsers.

Downloads

542

Readme

Nostalgist.js is a JavaScript library that allows you to run emulators of retro consoles, like NES and Sega Genesis, within web browsers.

[!tip]
Nostalgist.js is for developers. If you are a player and prefer playing games you own in browsers, rather than building something with code, you may want to try another open-source project RetroAssembly.

A Quick Glance

Website

Checkout nostalgist.js.org for more online examples and documentation.

Features

  • Launch a retro game with RetroArch emulator in a browser

    import { Nostalgist } from 'nostalgist'
    
    await Nostalgist.launch({
      core: 'fceumm',
      rom: 'flappybird.nes',
    })

    Related API: launch

  • Save the state of the game, then load it later

    import { Nostalgist } from 'nostalgist'
    
    const nostalgist = await Nostalgist.nes('flappybird.nes')
    const { state } = await nostalgist.saveState()
    await nostalgist.loadState(state)

    Related APIs: saveState, loadState

  • Customize any RetroArch config before launching

    import { Nostalgist } from 'nostalgist'
    
    const nostalgist = await Nostalgist.launch({
      core: 'fceumm',
      rom: 'flappybird.nes',
      retroarchConfig: {
        rewind_enable: true,
      },
      retroarchCoreConfig: {
        fceumm_turbo_enable: 'Both',
      },
    })

    Related API: launch#retroarchConfig

  • Access low level APIs of Emscripten

    import { Nostalgist } from 'nostalgist'
    
    const rom = 'https://example.com/zelda.sfc'
    const nostalgist = await Nostalgist.snes(rom)
    const FS = nostalgist.getEmscriptenFS()
    FS.readdir('/')

    Related APIs: getEmscriptenModule, getEmscriptenFS

Motivation

Nostalgist.js is built on top of RetroArch Emscripten builds. We love RetroArch to run in browsers because that's portable and convenient. Although there is already an official instance, RetroArch web player, and some third-party ones like webretro, it's still not that easy to launch RetroArch in a browser programmatically.

The purpose of Nostalgist.js is to simplify the process of launching an emulator to play a game, via RetroArch, in browsers. Given a ROM and a core, the game should be launched without any additional configuration.

APIs

Please refer to nostalgist.js.org/apis.

Related

Credits

  • These are the fundamental dependencies of Nostalgist.js.

  • We are using ROMs here for the purpose of demonstration.

  • By default, our ROMs and cores are all loaded from this free CDN service.

Showcases

  • RetroAssembly

    A web app with which you can build a custom retro gaming library inside your browser. Game states can be synced with cloud storage services like OneDrive/Google Drive/Dropbox

    It's built on top of Nostalgist.js.

Alternatives

  • EmulatorJS

    Another JavaScript library for emulation inside browsers.

    It's more powerful and more sophisticated. It has many custom cores and has a friendly user interface. It can be used inside mobile browsers with touch support.

    It's not that friendly towards modern frontend development.

Caveat

[!caution]

  • Nostalgist.js DOES NOT provide any pirated content, like copyrighted ROM files or BIOS files.
  • And it DOES NOT encourage that.

License

MIT