This page is work-in-progress. You can reach me on twitter or mail to rezoner1337@gmail.com
What is Playground.js?
Playground.js is a game oriented javascript framework that gives you access to essentials like mouse, keyboard, sound and well designed architecture. The rest is up to you. Whether you prefer to roll your own physics library or use Box2D - playground will not get in your way.
download Template project with <canvas> based renderer
download Template without any renderer.
download Standalone on GitHub
What does it do?
At the very core it provides out-of-box surface with all essential events.
playground({
width: 640,
height: 480,
scale: 2,
create: function() { },
ready: function() { },
resize: function() { },
step: function(dt) { },
render: function() { },
keydown: function(data) { },
keyup: function(data) { },
mousedown: function(data) { },
mouseup: function(data) { },
mousemove: function(data) { },
touchstart: function(data) { },
touchend: function(data) { },
touchmove: function(data) { },
gamepaddown: function(data) { },
gamepadup: function(data) { },
gamepadmove: function(data) { }
});
or
new PLAYGROUND.Application(...);
What else?
Optional basics like sound
, states
, canvas
, easing
, tweening
and loaders
The goal is to provide a framework that:
- Takes care of basic APIs
- Lets developer use his own solutions for physics, collisions, entities...
- Makes a good base regarding both prototyping and scalability
- Provides sane defaults out-of-box
Target platforms:
- Games in cutting edge browsers
- Games on desktop with NW.js
It is especially for you if:
- You spend more and more time bending some engine to your will rather than implementing what you need.
- The voices in your head are telling you to participate in Ludum Dare
Not convinced. Show me something cool.
I want to give it a go
Straight ahead to Getting Started