Code Monkey home page Code Monkey logo

themis-games-template's Introduction

Blind-Accessible HTML + Javascript Game Template

Blind-accessible HTML/Javascript game template, originally developed and maintained by Themis Games. You can read more about how it works, and the different considerations for web accessible games, in this excellent write-up.

Games That Use This

License

Creative Commons 0 (CC0)

Usage

  • Use the index.html file a a starting point. If you wish, you can extract the CSS and JS into separate files
  • Make sure you include the Javascript code in the <body> tag, because it needs to access the DOM.
  • In the scaleGamecontainer method, make sure you change the width and height of authoredWidth and authoredheight so that the game scales correctly.
  • Make the same change in the CSS: Specify #gamecontainer.width and #gameContainer.height. Also update the offsets (left and top) to half those values respsectively. This will make your game center on-screen.
  • Update sfxFiles to list any sound files you want to preload.
  • Call setupAudio() on the first user gesture. This is a security feature (in Chrome), where this is no longer allowed to be called outside of user gestures. This also causes the audio files to preload.

themis-games-template's People

Contributors

cptnoblivious avatar nightblade9 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  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.