core2d

2.10.1 • Public • Published

code style downloads license npm version

core2d logo

About

Core2D is the powerhouse used by Maragato マラガト apps, among others. It is the evolution of Videogame, which in turn was the evolution of Quick. In its current form, it adopts JavaScript modules, leveraging the full power of Object-oriented programming.

Concept

Apps created with Core2D are made of one or more scenes, which may contain one or more sprites. These objects have properties that can be customized to shape their behavior. It's that simple.

Get Started

Download or clone/fork the skeleton project to start building your app. Alternatively, the library can be also installed to your existing/new project:

npm install core2d

Learn

The best way to learn is by doing, and you can see what Core2D is capable of through existing open-sourced apps. Check the Hall of Fame below for some source code.

Support

Please consider joining the Discussions for collaboration and support.

Features

Collision Detection

Translated to callbacks, to keep update logic clean.

Assets Caching

Assets and their transformations are reused automatically to keep a solid performance.

User Input

Human interaction is unified via abstractions, so that apps will just work, regardless of the devices in use.

Controllers

controllers

Gamepads or keyboard. When using a keyboard, sensible defaults (minding accessibility) are used, as seen in KeyMap.mjs.

Pointers

pointer

Mice or touch screen.

Virtual Resolution

Internal geometry frees the app logic from displays, i.e. your app can have an internal logic resolution of 800x600, while running on any display size.

Contributing

The core of the library (under src/) should remain agnostic and lean. Updates to the core library are usually related to technology developments in the platform (web API advances), while staying true to the basic concepts of the library, which are common to all apps.

Opinionated functionality should be implemented in the form of a plugin (under src/plugin/). Plugins can add features that are domain driven, such as elements that can be reused by multiple apps, but not necessarily by every app.

Hall of Fame

Recent entries:

  • Mythology - Single-player arcade pinball game

Apps created with Core2D:

Package Sidebar

Install

npm i core2d

Weekly Downloads

8

Version

2.10.1

License

MIT

Unpacked Size

61.7 kB

Total Files

43

Last publish

Collaborators

  • diogoeichert