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 🙏

© 2026 – Pkg Stats / Ryan Hefner

gtpython

v0.0.2

Published

Write GameTank games in a pygame-flavored Python that compiles to native 6502. Part of the pycretro console-Python family.

Readme

gtpython

Write GameTank games in a pygame-flavored Python that compiles to native 6502. Part of the pycretro console-Python family (with gbapython for GBA and mdpython for Sega Genesis).

Native resolution: 128 × 128 (draw and sprites use the full screen). Colors are PICO-8-style indices 0–15 that bake to the GameTank CAPTURE palette at build time. Numbers are 16.16 fixed point. Familiar, not compatible — see DIFFERENCES.md.

Your first game

import pygame

pygame.init()
screen = pygame.display.set_mode((128, 128))   # MUST be 128x128 (native)
clock = pygame.time.Clock()

running = True
while running:
    cls(1)                          # dark blue background

    print("hello python", 34, 16, 14)   # title, pink, near the top

    # a smiley face, drawn entirely with shapes (centered on 128x128)
    circfill(64, 72, 30, 10)        # head: a big yellow circle
    rectfill(52, 58, 58, 68, 0)     # left eye
    rectfill(70, 58, 76, 68, 0)     # right eye
    circfill(64, 82, 9, 0)          # mouth

    clock.tick(60)
gtpython build examples/hello/main.py -o hello.gtr

That exact code produces this ROM:

gtpython hello The hello example: shapes + text, drawn by the code above (examples/hello).

npm install brings the whole cc65 WASM toolchain and the GameTank core. The compiler front-end is the pycretro package.

Sprites

gtpython sprite pygame.image.load + blit -> a hardware sprite (examples/sprite)

What you can do

  • Draw: cls, screen.fill((r,g,b)), rectfill/rect/circfill/circ/line/ pset, print(text, x, y, color) (f-strings work).
  • Sprites: pygame.image.load("hero.png") + screen.blit(img, (x, y)) — the PNG bakes to a native .gtg sheet.
  • Input: pygame.key.get_pressed() + pygame.K_* (d-pad, K_z, K_x, K_c).
  • Rects, classes, sprite.Group, mixer, font — same API as the family (docs/CHEATSHEET.md).

Examples

examples/: hello, sprite. Build with gtpython build examples/<name>/main.py.

See docs/CHEATSHEET.md, docs/ASSETS.md (image/music formats), and DIFFERENCES.md.

Runtime + hardware register semantics adapted from clydeshaffer/gametank_sdk (MIT) — see PROVENANCE.md.


Screenshots are the raw framebuffer at 3× integer scale (pixel-perfect native). Note: GameTank pixels display at the hardware's native aspect on real hardware; these images preserve exact pixels rather than resampling to a TV aspect.