Simple game core for 2d platform on pixi.js without unnecessary dependencies
- Tiled (Developing levels for the game)
- ShoeBox (packing resources into one tile set)
- Tiled
- Animation Controller
- Simple Scene manager
- Basic Camera
- Entities behavior management
- Simple collision detection
- Adaptive screen
-
managers
All managers classes for game -
objects
All entities and individual classes for TiledMap -
scenes
All scenes for ScenesManager -
utils
Utilities functions for game
Supports objectgroup layers, rotation and opacity of the sprites. Tileset supports animation frames and objectgroup.
Tiled's animation of tiles works for simple game sprites, for objects with behavior, the animation is configured manually.
The first rectangle in the object group of the tile will be processed as a physical body of the object-sprites with the type entity
for handling collisions.
Objects rectangles with the type area
are processed by objects-sprites of the type entity
for collisions with triggers and rigid static bodies.
An object with the type entity
is assigned a specific behavior from the group of classes objects/index
.
Objects with the type area
or entity
can have custom properties, which are listed below in the documentation.
Properties map:
-
background: image_name
Custom background for current level map. -
gravity: 1
Acceleration of gravity for objects of typeentity
.
-
Solid
Adjusts the position of objects of theentity
type with respect to the solid area (Only withentity.isSolid = true
, the default value) -
SlopeRight and slopeLeft
Adjusts the position of objects of theentity
type relative to the curved surface (Only withentity.isSolid = true
, default value) -
CameraZoom
A trigger that handles a Player to control camera zoom.
Properties:
zoom = 1 (default) -
Dead
Collision trigger to kill entity -
Exit
Collision trigger to complete the level
-
Player
-
Slime
A little slime moves right and left on ground. Kills the player
Properties:
path: 3 (the number of tiles that an enemy can pass in one direction)
dir: -1 (start direction enemy)
speed: 4 -
Bee
A little bee flies right and left in the air, swaying along a sine wave. Kills the player
Properties:
path: 3 (the number of tiles that an enemy can pass in one direction)
dir: -1 (start direction enemy)
speed: 4 -
Coin
Coins that the player collects
Properties:
score: 10 (default) -
Jumper
Sets the negative vector in Y coordinate for Player
Properties:
power: 45 (default)
- Code by Andrey Zhevlakov
- Free game asset by Kenney
- LICENSE MIT