os2d

0.2.9 • Public • Published

OS2D

A JavaScript game engine

Demo

Features

  • Linked Box2D (Use GameObject.ySpeed, GameObject.speed.y or PhysicsBody.body.getLinearVelocity().y)

  • Cross-platform

  • GameObject

    • Holds position and rotation
    • Components (ShapeRenderer, Collider, PhysicBody, etc)
      • Components are used to add functionality to GameObjects
      • Components have complete control over a GameObject in order to perform different functions
  • Shapes (Circle, Rectangle, RegularPolygon)

    • Shapes are immutable and can be reused on different components, such as ShapeRenderer and Collider
  • Serializable to JSON

    • Whole heirarchy Game->GameObject->Component->Shape->Point
    • Can serialize event listeners to JSON
    • "Smart Serialize"
      • Will output an object {json: "", functions: ""}
        • functions contains a string that has valid JavaScript code for you to paste in your code
      • Can create variables that are reused throughout the JSON
      • Variables will compress the end result JSON as any matchin Points or Shapes are reused -To decompress use "os2d.deserializeVariables(deserializeJSON, functions)"

Readme

Keywords

Package Sidebar

Install

npm i os2d

Weekly Downloads

2

Version

0.2.9

License

UNLICENSED

Unpacked Size

4.29 MB

Total Files

38

Last publish

Collaborators

  • outstream