open-index/open-npm huggingface dataset:
npm package: @headless-game-engine/clock
Description: A minimalistic, framework-agnostic JavaScript game engine.
Author: gjtiquia
Latest version: 0.2.0

# Headless Game Engine - Clock

A minimalistic, framework-agnostic JavaScript game engine.

This is the clock package for the Headless Game Engine.

This package used to run the game engine in a fixed timestep, together with other time related utilities.

Contains

- Clock
- Time
- EngineClock

Clock is a wrapper for setInterval, with the difference being that it calls the callback at the beginning of the interval without waiting.

Time is a static class that holds the data needed for the EngineClock to run, for example the tick rate.

EngineClock makes use of the clock and runs the game engine in a fixed timestep according to Time.tickRate.
npm package: @headless-game-engine/core
Description: A minimalistic, framework-agnostic JavaScript game engine.
Author: gjtiquia
Latest version: 0.2.0

# Headless Game Engine - Core

A minimalistic, framework-agnostic JavaScript game engine.

This is the core package for the Headless Game Engine.

Other packages are completely optional. It is highly encouraged to extend directly from the core package for creating custom solutions for your game.

Contains

- Component
- GameObject
- System
- Scene
- GameEngine

The GameEngine runs the scene.

Scene contains GameObjects and Systems.

GameObjects contains Components.

Systems can be optionally used to drive the components if an ECS architecture is desired.

Components and Systems can be easily extended.
npm package: @headless-game-engine/physics-2d
Description: A minimalistic, framework-agnostic JavaScript game engine.
Author: gjtiquia
Latest version: 0.1.0

# Headless Game Engine - Physics 2D

A minimalistic, framework-agnostic JavaScript game engine.

This is the Physics 2D package for the Headless Game Engine.

Contains

- Collider2D
- BoxCollider2D
- Rigidbody2D
- PhysicsSystem2D

BoxCollider2D is an AABB collider that extends from abstract class Collider2D.

Rigidbody2D is capable of adding force to change its velocity, which changes its position.

PhysicsSystem2D does 3 things

1. Movement Integration

- Moves the rigidbodies according to their current velocity.

2. Collision Detection

- Detects collisions between colliders

3. Collision Resolution

- Resolve the collisions between rigidbodies and static colliders by displacing the rigidbody and changing its velocity.