git404hub

what is notpygamejs fr?

karpathy/notpygamejs — explained in plain English

Analysis updated 2026-07-17 · repo last pushed 2023-10-17

109JavaScriptAudience · developerComplexity · 2/5DormantSetup · easy

tl;dr

A minimal JavaScript library by Andrej Karpathy for building simple 2D browser games on Canvas, handling the game loop, timing, and input so you just write init/update/draw functions.

vibe map

mindmap
  root((notpygamejs))
    What it does
      Runs game loop
      Handles input events
      Draws to Canvas
    Core functions
      Init function
      Update function
      Draw function
      Click and key handlers
    Use cases
      2D puzzle games
      Interactive art
      Teaching game basics
    Tech stack
      JavaScript
      HTML Canvas

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

what do people make with this?

VIBE 1

Build a simple 2D browser game like a breakout paddle game by writing update, draw, and input functions.

VIBE 2

Prototype an interactive art project or educational demo without wrestling with raw Canvas and timing APIs.

VIBE 3

Learn how a game loop and input handling work under the hood using a minimal teaching-oriented library.

what's the stack?

JavaScriptHTML Canvas

how it stacks up fr

karpathy/notpygamejstj/co-parallelpeng-zhihui/cheese-uestc
Stars109109110
LanguageJavaScriptJavaScriptJavaScript
Last pushed2023-10-172016-12-272017-01-13
MaintenanceDormantDormantDormant
Setup difficultyeasyeasymoderate
Complexity2/52/52/5
Audiencedeveloperdevelopergeneral

Figures from each repo's GitHub metadata at analysis time.

how do i run it?

Difficulty · easy time til it works · 30min

Intentionally minimal, no physics engine, sprite system, or asset management, you draw directly to the canvas.

prompts (copy fr)

prompt 1
Show me how to set up a canvas and write the five core functions notpygamejs expects to build a simple game.
prompt 2
Help me build a breakout paddle game using notpygamejs, with paddle movement, ball physics, and collision detection.
prompt 3
Explain how notpygamejs runs its game loop and calls my update and draw functions at a steady frame rate.
prompt 4
Walk me through adding keyboard and mouse input handling to a notpygamejs game.

Frequently asked questions

what is notpygamejs fr?

A minimal JavaScript library by Andrej Karpathy for building simple 2D browser games on Canvas, handling the game loop, timing, and input so you just write init/update/draw functions.

What language is notpygamejs written in?

Mainly JavaScript. The stack also includes JavaScript, HTML Canvas.

Is notpygamejs actively maintained?

Dormant — no commits in 2+ years (last push 2023-10-17).

How hard is notpygamejs to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is notpygamejs for?

Mainly developer.

peek the repo → explain another one

This repo across BitVibe Labs

double-check against the repo, no cap.