update: this post has been moved to my blog

Welcome! Today I'd like to talk about another subject which can't be emphasized enough: Code Quality. This entails a lot of tools and patterns that ultimately come together to make your game more solid and programmer friendly. Even if you're working alone on a project, these tools can save you some precious debugging time by pointing out simple errors, if not more complex ones. I'll be using my current project, c as an example where possible.

A few notes before we get started:

  • Some of the following tools are specific to the JavaScript ecosystem.
  • Some of the following tools are only free for open source projects, so bear in mind that you might be missing out on the awesome!

Style Checking

Some of the easiest tools you can set up for your project are JSHint and JSCS. These tools provide basic st


update: this post has been moved to my blog

Welcome! You might be reading this out of curiosity, or because you want to improve your programming capabilities to stop people from exploiting your JS games. Given that the first thing I do when I open a new incremental is open the terminal and start messing around with your games, I figured it's about time to write something about what I see and how I break your games. Consequently, I'll describe ways you can protect your games from the basic code manipulations I perform. Some might say "you're just ruining the game for yourself!" while I'm going to turn around and say "I don't care" -- that's not the point of this!

NB: This will only apply to vanilla JS applications, which I see more commonly. Frameworks like AngularJS and such are out of scope for this post. Advanced techniques such as using a debugger, while slightly more on topic, will also be disregarded for now.



Keybase proof

I hereby claim:

  • I am seiyria on github.
  • I am seiyria ( on keybase.
  • I have a public key whose fingerprint is 459D 591A 221A 68D0 D7DA A237 99FF 38D0 52A4 9311

To claim this, I am signing this object:

View Converter.js
var fs = require('fs-extra');
var wiki = require('nodemw');
var q = require('q');
var glob = require('glob');
var execSync = require('child_process').execSync;
var logger = require('winston');
var argv = require('minimist')(process.argv.slice(2));
var client = new wiki({
server: '',
View knockout.bootstrap.tooltip.remote.js
Option Parameters:
url - the URL that will be sending back the tooltip data (required)
loadingText - the placeholder text during the loading process
getDelay - the delay between when the loading text is shown and when the GET request is sent
emptyText - the text that is shown if there was an empty or invalid (404) response from the server
cache - if this is true, the response will be cached and will not be re-requested
options - these are passed to the bootstrap base tooltip call
View knockout.bootstrap.glyphicon.tree.css
#nav-bar ul {
list-style-type: none;
#nav-bar {
padding-left: 0;
#nav-bar > ul {
padding-left: 20px;
View knockout-sortable.default-text.js
var origForeachUpdate = ko.bindingHandlers.sortable.update;
ko.bindingHandlers.sortable.update = function(element, valueAccessor, allBindingsAccessor, data, context) {
var options = valueAccessor();
if (options.defaultText) {
var hasDefaultText = $(element).find('span.injected').length > 0;
var array = ko.unwrap(;