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

mgk.js

v1.0.0

Published

epik framework for creating simple 2d games with web technologies, this package is new so 100% there might be bugs(entire package not working could also be the case) PLUSS this is open-source (can access it via github: https://github.com/helloworld190/MGK

Readme

MGK.js

MGK.js is a small JavaScript tool to make simple 2D games.


What it does(very useful trust)

  • Lets you create game objects with parts (called components) like position, shapes, and movement.
  • Supports circles and sprites for drawing.
  • Has simple physics with speed and gravity.
  • Detects when objects bump into each other and pushes them apart.
  • Lets you add buttons and labels on the screen.
  • Works in the browser with a canvas.

How to install(very useful trust me)

Use npm:

npm install mgk.js

How to use

import { Game, GameObject, Transform, Circle, RigidBody, Collider, CollisionSystem } from 'mgk.js';

const game = new Game({ width: 800, height: 600 });

// Make a blue ball const ball = new GameObject(game); ball.addComponent(new Transform({ x: 100, y: 100 })); ball.addComponent(new Circle({ radius: 20, fill: 'blue' })); ball.addComponent(new RigidBody()); ball.addComponent(new Collider({ radius: 20 }));

game.objects.push(ball); game.plugins.push(new CollisionSystem());

function loop(time = 0) { const dt = (time - game.lastTime) / 1000; game.lastTime = time;

game.update(dt);

game.ctx.clearRect(0, 0, game.canvas.width, game.canvas.height); game.objects.forEach(o => o.render(game.ctx));

requestAnimationFrame(loop); }

requestAnimationFrame(loop);

Main parts

Game: The main game engine.

GameObject: Things you add to the game (like players or enemies).

Component: Pieces that give behavior to objects (position, drawing, physics).

Plugin: Extra stuff that can run each frame (like collision).

Quick tips

Add components to game objects to give them behavior.

Use update(dt) every frame to update logic.

Use render(ctx) every frame to draw.

Use the CollisionSystem plugin to handle simple collisions automatically.

Real License MIT © helloworld190

Help Ask questions or report bugs on GitHub.