Code Monkey home page Code Monkey logo

Lazy eye blocks game

Synopsis

"le" in leblocks stands for Lazy Eye. Amblyopia, commonly known as lazy eye, causes more visual loss in the under 40 age group than all the injuries and diseases combined in this age group.

This is a version of a classic blocks game with a little change that allows people with amblyopia use it as a treatment tool. Read more about amblyopia

How does it work?

idea

The idea is to force brain to use the information that we receive from both eyes simultaneously. This is achieved by separating information sources for the left and the right eye, so that the brain is forced to take into consideration the image coming via the weaker eye and to combine information in order to form a complete image. In that way, the brain learns how to use the weaker eye from scratch.

implementation

The color of the falling blocks and the ground blocks is adjustable, hence, using 3D glasses (old style red\blue, like the ones shown here) we can separate images that the left and the right eye see.

Motivation

I have a lazy eye myself. I was born with a huge difference in sight between the eyes. It was only diagnosed, when I was seven. Now I'm an adult, and, as a result of brain suppression, my right eye is working on just 60% of its ability. Once, I stumbled upon an article on the lazy eye treatment, recommending a game that helps. After a proper search, I found a few apps for mobile devices, but nothing to use online and free of charge. And so I decided to do it myself. Here are my goals:

  • make the lazy eye blocks game accessible from maximum amount of devices

Installation

  • Install dependencies with npm install
  • Run development server: npm run start

Testing

All tests are located under /test folder. I've decided to use mocha as a test runner and chai as an assertion library.

  • /test/main.js is a test entry point for the webpack bundling, all tests should be included here.
  • /test/test.html html template with browser setup of mocha.
  • To run tests start development server and go to http://localhost:port/test.html

Known issues

Swipe support I've developed custom swipe support instead of using 3rd party library (to reduce size of the resulting bundle) therefore there are several bugs on various screens. Have to be handled properly. Used hammerjs instead of my custom implementaiton that resides on a branch for now.

Non-consistent usage of various browser features:

  • Babel loader uses @babel/preset-env without any specific configuration.
  • Following WebAPIs are being used: Element.classList.add, document.querySelector, document.getElementById, document.createElement, Element.appendChild. Those APIs are not being transpiled by babel. So correct polyfills should be provided for older browsers.

CSS issues:

  • There is a usage of CSS flexbox property. If it will remain -> need to adjust transpilation level of babel preset. So code won't be transpiled to support browsers of versions that are lower than flexbox support.
  • Order of @import statements in src/mains.scss is important. This probably can be solved with proper webpack configuration.

Sasha Gurevich's Projects

dotfiles icon dotfiles

bootstrap and single source of development environment configuration

lazy-eye-blocks icon lazy-eye-blocks

Rework of leblocks.github.io with usage of modern web development tools.

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.