https://github.com/ferdodo/blockwise
Minimalistic utility lib for writing simple 2d games where everything is a block.
https://github.com/ferdodo/blockwise
Last synced: over 1 year ago
JSON representation
Minimalistic utility lib for writing simple 2d games where everything is a block.
- Host: GitHub
- URL: https://github.com/ferdodo/blockwise
- Owner: ferdodo
- License: mit
- Created: 2023-09-07T12:16:04.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2024-10-30T03:47:28.000Z (over 1 year ago)
- Last Synced: 2024-10-30T06:26:03.654Z (over 1 year ago)
- Language: TypeScript
- Homepage: https://ferdodo.github.io/blockwise/
- Size: 354 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://www.npmjs.com/package/blockwise)
[](https://www.npmjs.com/package/blockwise)
[](https://github.com/ferdodo/blockwise)
[](https://github.com/ferdodo/blockwise)
[](https://ferdodo.github.io/blockwise/)
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.
``` TypeScript
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
```bash
npm install blockwise
```