Code Monkey home page Code Monkey logo

tankjs's Introduction

Build Status

TANK

A lightweight Javascript engine framework focused on the following ideas:

  • Modular
  • Small
  • Made for programmers

To get started, pull the repository and take a look at the samples/ directory, or read the docs. More documentation will be written as the framework matures.

Features

Components

Rather than using an inheritance tree, TANK uses a component-based architecture. In this model, you write lots of small, modular components that can be attached to any object to create custom behaviors quickly. A component's logic can very quite a bit in scope, such as a simple position component that just has x and y fields, to a complex renderer that handles drawing and sorting other drawable components.

Entities

An Entity is a generic object whose behavior is defined by the collection of components attached to it. It also may contain child entities which receive updates when it does. Most 'things' in your game will be entities, whether it is a barrel on the ground, a trigger zone, or something more abstract like the object that manages the AI of your strategy game.

Events

All Components can listen to Entities for events. For example, each Entity will dispatch the 'childadded' event when a child is added to it. Events can be dispatched immediately, next frame, or after a certain timeout.

Building

Before you can run the sample projects, you'll need to build TankJS. Building requires NodeJS.

$ git clone http://github.com/phosphoer/TankJS.git
$ cd TankJS
$ sudo npm install -g gulp
$ npm install
$ gulp

If you don't wish to install gulp globally, you should also be able to install it locally and run it from the node_modules/ directory.

$ cd TankJS
$ npm install
$ node_modules/.bin/gulp

Run tests

$ npm test

tankjs's People

Contributors

kkoenig avatar phosphoer avatar rrohrer avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.