Maze generation has never been easier: Math.random() < 0.5 ? “/” : “\\”; and you’ve got yourself a maze! Like all awesome ideas this one comes directly from the Commodore 64.
Also filed in
|
|
Maybe you’ve heard that there’s a new kid on the short-message scene: App.Net. It’s just like Twitter, except you have to pay $50 a year to use it. Sure, that’ll keep the poor people away – but what else do you get for the fee? How’s this for an incentive: no longer are you limited [...]
Also filed in
|
|
[update: wow, amazing response so far! I'll start collating the data and get you all some findings soon.] Hey chaps, I’m canvasing general opinions and understanding about CoffeeScript as research for an up-n-coming book. There seems to be some pretty strong thoughts on the matter amongst the people I’ve talked to in person, and I’m [...]
As many of you may know from my complaining, I’ve currently embarked on a new writing mission: a CoffeeScript book for SitePoint. The example project that runs throughout is an HTML5 game using Canvas. While I was trying to create a random colour palette – for instructional purposes – I fell over this “trick” of [...]
I just finished typing all this code, and boy are my arms tired! Wait, that doesn’t really work. Anyway, I did a search on twitter for the hash tag #rimshot yesterday and the results were not very funny. The problem was that seeing the term #rimshot is not the same as hearing “budum ching”. Hence, [...]
Also filed in
|
|
Scala, Play 2.0, CoffeeScript, real-time streams, server-sent events, (lots of) HTML5 canvas, local storage, push state, easter egg, … If you’ve worked in IT for long enough, you make sure you get yourself in a position where you no longer have to work on dull projects. It’s hard (dull projects are often very lucrative – [...]
Also filed in
|
|
Super short version: If you’re using Server Sent Events, and it doesn’t work in Firefox because “Firefox can’t establish a connection to the server at…” and it’s not a CORS problem… make sure you’re not setting a content-length header. The end.
Thursday, February 2, 2012
And we’re back! In part one we looked at setting up a tinted palette for drawing our 8-bit masterpieces to canvas. Here’s what we’re going for today: rendering colourised sprites and tiles. We’ll be loading in our (ok, Notch’s) 4-color sprite sheet and rendering tiles from it with our chosen colours.
How crap is the mouse, right? Yeah, I know! So I made a greasemonkey script to do my websurfin’ using my NES-style USB gamepad. For those of you too excited to read on, take your gamepad-enabled build of Firefox and install Gamepad Navigator now! Up and down to scroll the page up and down. The [...]