blockwise

Npm package npm GitHub last commit (branch) GitHub npm

Blockwise is a utility library that simplifies 2D game development by treating all elements as blocks. It exposes a single TypeScript interface, aiming to provide essential functions for creating small, beginner-friendly games.

import { Block, isBlockColliding } from "blockwise";

const player: Block = { x: 0, y: 0, w: 1, y: 1 };
const obstacle: Block = { x: 15, y: 0, w: 1, y: 1 };
console.log(isBlockColliding(player, obstacle)); // false

Documentation

https://ferdodo.github.io/blockwise/

Installation

npm install blockwise

Generated using TypeDoc