Coder Social home page Coder Social logo

html5-game-template's Introduction

barebones HTML5 game template

This template supplies basic infrastructure that a good web game can be built on, so that as the game developer, you can just get on with writing that game.

fast start

easy build & deploy

  • builds minified game configured for browser appcache using UglifyJS and almond.js
  • trivial to deploy to a live server (currently supports github-pages)

default best practices help your codebase scale

  • structured for maintainability using RequireJS
  • includes pre-configured QUnit test harness

easy to specialize

it should be easy to build higher-level, more specialized templates (e.g. for a simple canvas game, a game based on the Gladius engine, or an MMORPG) on top of this one.

prerequisites

  • be sure node.js and npm are installed and in your PATH

  • (optional) if you wish to deploy to github pages, ensure that git is installed and configured

  • Use npm to install volo into your path, if it's not there already:

    npm install -g volo

let's get started

Create and configure a new copy of this game template:

> volo create myNewGame gladiusjs/html5-game-template
Downloading: https://nodeload.github.com/gladiusjs/html5-game-template/zipball/master
Downloading: https://nodeload.github.com/toji/game-shim/zipball/master

Take a look around:

> cd myNewGame
> ls
README.md       package.json    tools           www
node_modules    test            volofile

Add any libraries that you intend to use. volo uses github's search API to find them and grabs the latest released version.

> volo add three.js
Using github repo "mrdoob/three.js" for "three.js"...
Downloading: https://raw.github.com/mrdoob/three.js/master/build/Three.js
Installed github:mrdoob/three.js/master at js/three.js

> volo add stats.js
Using github repo "mrdoob/stats.js" for "stats.js"...
Downloading: https://raw.github.com/mrdoob/stats.js/master/build/Stats.js
Installed github:mrdoob/stats.js/master at www/js/lib/stats.js

Do any development you like, putting tests into the test/ directory infrastructure if you wish. (Not shown :-)

Build a minified version complete with an appcache file:

> volo appcache
(...)

Deploy the built version to the gh-pages branch of suitably named repo:

> volo ghdeploy
Log in to GitHub to complete action (your password is not saved. It is sent over SSL to GitHub and converted to an OAuth token)
GitHub user name: dmose
GitHub password: 
Contacting GitHub...
  (...)
To [email protected]:dmose/monkeyGame.git
e5dbfd4..1296c81  gh-pages -> gh-pages
GitHub Pages is set up. Check http://dmose.github.com/monkeyGame/ in about 10-15 minutes.

misc

  • FAQ
  • upcoming features (depending in part on user feedback): jshint, Mozilla Persona auth, Node.js server side piece

credits

Main developers: Dan Mosedale and James Burke

This template is based on, and still shares code with, James Burke's create-responsive-template for volo, and leans heavily on volo. Thanks to the contributors to both volo and create-responsive-template.

Thanks to Alan Kligman for helping crispify various parts of the the documentation and what we're shipping.

Thanks also to the authors of the following:

html5-game-template's People

Contributors

jrburke avatar jstrimpel avatar zeedev avatar

Watchers

James Cloos 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.