ES6 module “this” confusion

I’m currently writing a wrapper for Phaser. This will be used writing hundreds of games which include some common elements. The wrapper allows default functionality to be built in for games as well as an interface between our games and Phaser – helping a lot with Phaser’s API changes. One aspect of this has been … 

 

Debugging AJAX CORS preflight requests

Response for preflight has invalid HTTP status code 405 I’ve written a simple HTML5 game that uses JS to communicate with a server via AJAX, and ran into an issue with AJAX CORS preflight requests. When I’ve done this previously I’ve always built an accompanying Rails server, so I’ve had no CORS issues. At my … 

 

Optimizing load times and UX for large HTML5 activities

Large HTML5 Games and Loading Complete Videos I’m a Señor Front End Developer at Blake E-Learning, making kids educational games. These games are pretty heavy on multimedia assets, and tend to run for a few minutes each, usually starting with a video. One problem we need to deal with is load times – activities regularly … 

 

Magic number roundificator limits significant decimal places in text

Limit decimal places in a text string I have put no validation, or tests, in here. It was a simple proof of concept, but I thought someone may find it useful. All it does is go through the text you paste in the top field, look for numbers resembling 12.3456, and round it to the …