GithubHelp home page GithubHelp logo

mozilla / mortar-game-stub Goto Github PK

View Code? Open in Web Editor NEW
91.0 22.0 45.0 636 KB

INACTIVE - http://mzl.la/ghe-archive - A simple web game template.

Home Page: http://mozilla.github.com/mortar-game-stub/

CSS 7.85% JavaScript 83.57% HTML 8.58%
inactive unmaintained

mortar-game-stub's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mortar-game-stub's Issues

Limit time delta to 1s

We solved the pause issue in #1, but if your phone lags (which I haven't witnessed but is entirely possible) you might still end up with a huge jump when the next animation frame comes around. I suggest we limit the maximum time delta to one second.

Add touch events

This is mostly meant for mobile development (for now). Let's add touch events on the canvas for moving the player around.

Make canvas fullscreen?

It doesn't make sense to "waste" space with the template title and description when running this on a small screen (e.g. in mobiles). In those cases we should make the canvas use all available screen space, and probably display the texts over the canvas itself (using white on black for obvious reasons). Should use media queries for text and positioning.

Or maybe we should even always use a full screen canvas in all the cases?

CODE_OF_CONDUCT.md file missing

As of January 1 2019, Mozilla requires that all GitHub projects include this CODE_OF_CONDUCT.md file in the project root. The file has two parts:

  1. Required Text - All text under the headings Community Participation Guidelines and How to Report, are required, and should not be altered.
  2. Optional Text - The Project Specific Etiquette heading provides a space to speak more specifically about ways people can work effectively and inclusively together. Some examples of those can be found on the Firefox Debugger project, and Common Voice. (The optional part is commented out in the raw template file, and will not be visible until you modify and uncomment that part.)

If you have any questions about this file, or Code of Conduct policies and procedures, please reach out to [email protected].

(Message COC001)

Pause when closed

So when you "leave the tab" or close the app, requestAnimationFrame will stop triggering. However, due to the way we handle a steady average speed (by measureing time between each animation frame), there will be a huge jump in game play when you return to the app.

I suggest we detect leaving and coming back (blur event?? my memory is fuzzy) and reset the timestamp when we come back so we restart where we left off instead of jumping ahead.

That said, by exposing an "unpause" event (or so), we can leave it up to the developer to not start right back up when coming back but wait for keypress or something.

Prettify

Basically add some more css so it doesn't look as unfinished as it does right now

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.