Skip to content

About

Library of default genericals components and systems to develop your games easily

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

26 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


NanoForge


npm version npm downloads Tests status Documentation status Last commit Contributors

About

components-systems holds NanoForge's official component and system packages for the editor, made for Engine v2. Each folder of packages is one package of the registry:

Package Side What it gives
@nanoforge/basics shared Position2D, Velocity2D, Acceleration2D and move2D
@nanoforge/graphics-2d client Rectangles, circles and texts with a color or an image, draw2D
@nanoforge/physics-2d shared Hitboxes, collisions, gravity, walls and platforms
@nanoforge/controls-2d client Move and jump with the keyboard
@nanoforge/combat-2d both Health, damage, bullets fired at the mouse

The packages to install in a new project are listed in Default packages.

Installation

In the editor: File › Packages…, search for @nanoforge/, and install. A package installs the packages it depends on.

Writing a component or a system

The editor reads everything from the code (TSDoc), there is no separate manifest per item:

  • a component is a class tagged @component, with a literal name equal to the class name, and public constructor parameters with defaults: they are the fields of the inspector;
  • a system is a function (registry, ctx) tagged @system, that queries its components with registry.getZipper([A, B]);
  • @side client for what uses graphics or input, @side shared for the rest;
  • @group, @preset, @color, @asset lay out the inspector (see the editor's Components doc).

Keep the parameters few and named for beginners, with what is less common in an Advanced hidden group. Everything else stays reachable from code (shape on drawables, collisions on hitboxes).

A package imports another with its name and the path of a file in it: import { Position2D } from "@nanoforge/basics/components/position-2d".

Links

Contributing

Before creating an issue, please ensure that it hasn't already been reported/suggested, and double-check the documentation.
See the contribution guide if you'd like to submit a PR.

Help

If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please don't hesitate to ask questions in discussions.

About

Library of default genericals components and systems to develop your games easily

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages