A Game Engine From Scratch In JavaScript Part 4 – Editor & Debugger

The editor serves as a live debugger and allows modifying the game objects in real-time. While this is still a work in progress, I wanted to share a screen capture so you can see how it might end up looking. The next screen capture shows some live editing capabilities. Continue reading

A Game Engine From Scratch in JavaScript Part 3 – Breakout

I wanted to make sure this engine would be comparable or maybe even easier to use than some of the other engines out there, with the ability to build a variety of game types and not just the game I was hoping to build. For this, I decided to go with Breakouts, which is a website that aims to help other developers compare and choose a game engine. So here’s my attempt…

It’s a work in progress, please check back soon for the full article:

This GIF was recorded at 20 FPS; the game runs at 60.

Working: sound effects, level progression, game states, mouse/keyboard input, collision (a bit buggy), ball-bounce physics (a bit crude), sprites, spritesheets, sprite animations, rendering layers, async module/asset loader, fixed timestep. These are all provided by the core engine.

Not Working: power-ups, variable timestep, improved physics.

Continue reading

A Game Engine From Scratch In JavaScript Part 2 – Physics

About 1-2 weeks ago I decided to make a game engine in my spare time. The most challenging aspect so far has been the handling of physics – how objects in the game behave when they collide.

I was able to get a few collision prototypes working. Here’s what the first prototype looks like, it could handle many moving objects, but the accuracy wasn’t perfect:

Disclaimer: I do not own the graphics depicted in this article, nor do I have permission to use them in a commercial product. The graphics were found using Google Image search, and they are being used here solely for showcasing the engine’s capabilities and progress. The tree sprites are from Here Be Monsters, and the player/wolf sprites are from Ragnarok Online.

What you’re seeing in the screen capture above is a bunch of objects (wolf sprites) being spawned with a “roam” AI package, which just makes the objects move around. This AI package idea will be expanded upon later, but it’s kind of how Skyrim AI works, mixed with Final Fantasy XII Gambits – interchangeable and override-able behavior stacks for different scenarios.

(The screen capture above doesn’t reflect 60 FPS due to gif recording at the time. It’s also a .gifv image hosted by Imgur, my apology if the buffering is choppy…)

Continue reading

How to Make a Star Rating Widget – jQuery vs ReactJS vs AngularJS vs Polymer

I found a Quora article by ReactJS lead developer Pete Hunt which compares a Star Rating Widget built identically in AngularJS and ReactJS. Since I was wondering what a similar jQuery version might look like, and since I’ve done a few of these widgets before (see Rapid Platform’s ‘Choice’ component), I decided to build a lightweight jQuery version of this Star Rating Widget for comparison. Feel free to use the Star Rating Widget code in this article for your own projects.

Touch it, you know you want to:

First up, the HTML where our bare minimum template "myrating" lives...

<!DOCTYPE html>
        <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.3.js"></script>
        <script type="text/javascript" src="rating.js"></script>
        <div id="myrating">
            <span class="star" style="cursor:pointer;">&#9733;</span>

Next we have rating.js, where the jQuery component lives...

Continue reading

WP-OAuth Is Not Vulnerable to SpoofedMe Social Login Exploit

The SpoofedMe social login exploit is a known weakness of the OAuth2 “spec”. The OAuth2 spec doesn’t define strict implementation standards, so developers have free reign to come up with some pretty wild implementations, or hack together a few libraries until it works. And that’s where the problem lies. There is no standard. Furthermore, social login is something that is normally built on top of OAuth2, and there’s no standard for that either. Some folks are trying to standardize social login with OpenID Connect (I like to think of this as “OAuth2-Strict”), but until then we will be facing issues like SpoofedMe because not all developers are gods.

The SpoofedMe exploit is actually similar to this one, from a Google security advisory earlier this year:

“An attacker could forge an OpenID request that doesn’t ask for the user’s email address, and then insert an unsigned email address into the IDPs response. If the attacker relays this response to a website that doesn’t notice that this attribute is unsigned, the website may be tricked into logging the attacker in to any local account.” –Link

Thankfully, I read the spec and decided not to implement this gaping security hole in WP-OAuth to begin with. Properly identifying users to perform the account match was one of the biggest design challenges that I encountered because not only were there numerous docs and specs to work through, there were a lot of existing implementations that did it wrong. I had to start from scratch.

Video Game Music – White Winter / Xmas Mix

Looking for some music to get you in that winter holiday spirit? Are you a fan of video games such as Skyrim, Secret of Evermore, Final Fantasy, Dungeon Siege, Total Annihilation, or Ragnarok Online? Let Jeremy Soule, Nobuo Uematsu and Matt Uelmen guide you into the winterlands by giving this YouTube playlist a listen. Make sure to hit shuffle.

A Major Google Analytics Problem is Brewing with Referer Spam (Semalt, buttons for website, 7makemoneyonline, darodar), and They’re Doing Nothing About It (TM)

I’ve noticed the same problem that others have been experiencing with Google Analytics lately – an influx of botnet referer spam from domains semalt.combuttons-for-website.com, darodar.com and 7makemoneyonline.com (the list continues to grow), making their way to the top of your “Top Referrals” list. This traffic is throwing off analytics and may have long term SERP implications. From the sound of it, most users are either having a difficult time filtering (excluding) the domains and traffic through Google Analytics, and/or resorting to blocking the domains via their .htaccess file.

This is a public service announcement.


Instead, offer them a clue about what orifice they can stuff that form in.

While I’m not the best SEO guy around, I’d have to say this looks like a traffic stealing campaign where somehow, they are using an opt-out form to phish/harvest backlinks and/or SERP rankings from your domain, or upsell you on better analytics software.

Furthermore, it seems that users are being scammed by what I would call social engineering agents who work for Semalt and lurk on public forums to point users towards an opt-out form run by them, effectively phishing users through Google Analytics. You might say that Google Analytics has been compromised. And what better way for Semalt to sell their own analytics software than to game their largest competitor’s software and lure users away from it? Semalt is literally using Google Analytics for free clicks and advertising, completely bypassing Google’s own pay-per-click advertising model. Instead of the phishing scam hitting your email inbox, it’s hitting your analytics report.

Some of the referer URLs contain my own Google Analytics ID. For example – forum.topicXXXXXXX.darodar.com – where XXX is your Google Analytics ID. I’d say they are using a script to iterate through all Google Analytics ID’s starting with 0000000, effectively generating traffic and analytics records for every site on the web that uses Google Analytics. But that’s not all, once you visit that referer URL with your Google Analytics ID in it, you’ve just told the spammers that your Google Analytics account is alive and well. It’s probably the same thing Semalt is doing with their opt-out form.

In doing so, these spammers would have the ability to sway traffic one way or another throughout the entire Google Analytics ecosystem without wasting botnet resources on inactive or retired Google Analytics accounts.

Shouldn’t Google be upset about that? This is not just a new type of spam or black hat SEO, it is a new type of marketing warfare or analytics malware. Continue reading

Mist – Alpha Preview 1

Yet another project I’m working on…

Screenshot of the Edit menu, for real-time editing of meta-data, somewhat resembling a CMS:


Continue reading