Skip to content

Commit

Permalink
Updated current features and added demo link
Browse files Browse the repository at this point in the history
  • Loading branch information
profexorgeek authored Aug 18, 2018
1 parent da22508 commit 98cafb1
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ Frixl is written in TypeScript and renders, by default, to a 2D canvas. This
engine is not intended for 3D use. It is intended for animated data visualization,
simple video games and similar interactive media.

See a preview that runs right out of this repository here:
http://htmlpreview.github.io/?https://github.com/profexorgeek/frixl/blob/master/Example/index.html

## Setup
Setup assumes you have installed Node and NPM are are familiar with basic Node/NPM usage.

Expand All @@ -22,7 +25,7 @@ Frixl uses pure TypeScript to compile (no third-party build tools such as Webpac
- Build once: `tsc`
- To watch and build: `tsc -w`

### Building the Examples
### Building the Example
To use Frixl you extend its core objects such as Positionables, Sprites, Views and the Game itself. To build and run the example:

- Enter the Example directory: `cd Example`
Expand All @@ -32,15 +35,19 @@ To use Frixl you extend its core objects such as Positionables, Sprites, Views a


## Current Features
- Views: containers to organize a level, menu or similar concept into self-contained components
- Positionable: base game entity that can be positioned, rotated and has properties like velocity and acceleration that automatically update the position. Supports attachment to a parent and infinitely nestable children.
- Camera: extends Positionable to provide a camera that can have position, velocity and acceleration
- Sprite: base game entity that extends positionable to represent a drawable object.
- Texture Coordinates: Sprites can be mapped to a portion of a spritesheet by specifying the texture coordinates for the sprite
- Animation: sprites support frame-based animation
- IRenderer: Rendering interface to render Sprites and provide a buffer for loaded textures. Allows game engine to accept custom renderer implementations.
- DefaultRenderer: 2D Canvas rendering implementation that can recursively render infinitely nested Sprites.
- Input: Enums for easy translation of human-readable names into character codes and methods to check input states in the game loop.
Frixl engine is comprised of modular objects that are easy to extend and customize. At a high level, the game instance manages a scene graph that starts with a **View**. Views should be used for things like menu screens or levels and keep your game organized and scalable.

Views own a collection of **Positionables**. Positionables are the base type for every game component. They define handy properties for position, velocity and acceleration and offer a simple physics implementation. Positionables can also have children that are relatively positioned, making it easy to build a recursive scene graph of logical object attachments.

The **Sprite** type extends Positionable and supports texture mapping and animation with an **Animation** class that you can populate in code or from a persistant source such as JSON. This allows your game to use spritesheets for frame animation and loading and rendering efficiency. Since Sprites inherit from Positionable, they also get basic physics and support parenting and children.

Frixl offers a default **Camera** that extends Positionable, allowing the camera itself to have physics if desired! The camera can also be attached to any positionable, making tracking of game objects such as the player very simple.

Frixl defines an **IRenderer** interface that handles both rendering and texture loading/buffering (these are currently combined to make it easier to bind to other rendering libraries, which usually provide both). Frixl comes with a **DefaultRenderer** class that works great for most purposes, utilizing the 2D canvas renderer and containing basic texture loading methods. However, you can easily swap out the renderer with your own implementation of IRenderer if you want to use an existing library or your own system.

Frixl provides an **InputHandler** and defines enums for keyboard and mouse input, making it easy to implement the most common types of input. It also translates touch input on mobile devices to mouse clicks so most implementations will work cross platform.

The Example folder demonstrates implementation of most of these features.

## Next Up
- Views should have an unload method that is called before moving to another view
Expand Down

0 comments on commit 98cafb1

Please sign in to comment.