notpygamejs
Source
- Source kind:
github-repository - URL: https://github.com/karpathy/notpygamejs
- Discovery source: https://github.com/karpathy/notpygamejs
- License:
NOASSERTION - Distribution policy:
public-summary-local-archive-only - Public mirror status:
summary-only - Content hash:
2c6547e38f6e58da85f3101922f4183af824310efa7cbd2c041f153f14c83c9b - First seen: 2026-05-15
- Last changed: 2026-05-15
Classification
- Primary category: Minimal implementations
- Corpus source note: 2026-05-15-karpathy-public-corpus
- Project taxonomy: karpathy-project-taxonomy
- Idea map: karpathy-idea-map
- Topic hub: karpathy-public-work
Summary
notpygamejs Game making library for Javascript with the Canvas element. Andrej Karpathy 1 May 2012 Usage This library abstracts away boring stuff such as game loop, mouse, keyboard API calls, etc etc etc. All that is left to do is to implement the meat of the following functions: The library assumes that your HTML file looks, for example as: In other words, call NPGinit({ FPS}) function once somewhere in your code. The function will hook its functionality into a canvas on the page with id “NPGcanvas”. Since this is not using any namespaces, a few things get added to global namespace (I know, I know…). For now,…
What This Teaches
- How a complex idea can be compressed into a minimal but working implementation.
- Useful as a reference style for serious small systems rather than decorative demos.
Why It Matters
This matters as part of Karpathy’s broader pattern: compress hard technical systems into readable, inspectable, working artifacts.
Repository Snapshot
- Full name:
karpathy/notpygamejs - Default branch:
master - HEAD:
6ee48fa769b88bf618fc44070fd5cb7a5f9eb832 - Stars at crawl: 101
- Forks at crawl: 21
- File count: 8
- README path:
Readme.md - License path: “
- Created: 2012-01-02T04:55:06Z
- Updated: 2026-05-07T21:21:47Z
- Pushed: 2023-10-17T14:11:25Z
Top-Level Structure
demos: 4[root]: 2include: 2
File Extension Profile
.html: 5.js: 2.md: 1
Tags / Release-Like Markers
- No git tags found in the shallow local clone.
Sample File Tree
demos/ballbounce.htmldemos/evolve.htmldemos/exgame.htmldemos/particles.htmlinclude/npgmain.jsinclude/vector2D.jsReadme.mdstarter.html
Public Handling Notes
- EXTRACTED: This page records public metadata and a source-grounded summary.
- INFERRED: Full local preservation, when available, is for private/local use unless a license or explicit source policy makes public redistribution safe.
- Do not treat this page as permission to republish unlicensed source text or code wholesale.