{"repo":"IceCreamYou/HTML5-Canvas-Game-Boilerplate","free":true,"listed":false,"github":"https://github.com/IceCreamYou/HTML5-Canvas-Game-Boilerplate","clone":"git clone https://github.com/IceCreamYou/HTML5-Canvas-Game-Boilerplate.git","description":"Provides a set of default code that makes getting up and running with an HTML5 canvas game very easy.","language":"JavaScript","stars":264,"topics":["canvas","html5-canvas-game","html5-boilerplate","javascript","boilerplate-html","game-engine","game-development","game-2d","game-framework","boilerplate"],"license":null,"category":"game-templates","readme_excerpt":"This project makes starting an interactive 2D Canvas application fast and easy , even for developers who have never used Canvas before. The project includes a stripped-down version of HTML5 Boilerplate and adds some Canvas-specific boilerplate and a couple of useful JavaScript abstractions. In other words, it includes the code you were going to write for every canvas project anyway, plus a few tools for rapid prototyping of common features. Thorough documentation is an explicit goal of this project. It should be easy to learn, use, and get started. Getting Started --------------- First, fork and git clone this repository, or install from NPM with npm i canvasboilerplate . To get started building, open up main.js. There are three functions there which are the backbone of your application: - update(): Update the objects in your world -- move them, calculate collision, etc. - draw(): Draw all the objects and layers onto the main canvas. - setup(): Set up the objects that should populate your world. This runs after images have been pre-loaded but immediately before animation starts. These functions are called automatically for you. Just fill in the logic! To see your project, open index.html in your browser. By default, it has a keyboard-controlled player who can wander around. At this point you can dive in and start building right away, explore more features, or dig deeper into the documentation: - What's Included & API Overview - Full API Documentation - Walk-Through Guide/Tuto","default_branch":null,"files":null,"tree":[],"storefront":"/r/IceCreamYou","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/IceCreamYou/HTML5-Canvas-Game-Boilerplate/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}