location.hash is dead. Long live HTML5 pushState! For a long time, location.hash was a way for AJAX applications to get back button and bookmarking support, and libraries like jQuery BBQ from Ben Alman made dealing with it cross browser a cinch. Now, with HTML5 coming of age, there is a new feature that aims to replace the use of location.hash with a better solution: pushState. Over on the Spoiled Milk blog, Jamie Appleseed describes the API as “a way to change the URL displayed in the browser through JavaScript without reloading the page.” It works on the history object like this: window.history.pushState(data, "Title", "/new-url"); The last argument is the new URL. In order to support the back and forward buttons you must be notified when they are clicked. Currently, pushState has support from the latest versions of Safari and Chrome, and Firefox 4 will be supporting it as well. If you’d like to read a more in depth overview of these new features, you should check out the aforementioned blog post by Jamie Appleseed.
5lide: HTML5-based Slides Maker At last week's GTUG campout, a 3-day long HTML5 hackathon, I signed up to be a TA for the weekend. That meant I spent most of my time wandering around answering random questions and helping developers debug their hacks. But, I can't be surrounded by a bunch of people hacking on cool shit and not join in myself -- it's just way too tempting. So, on Friday night, after coming home from the pitches and discovering that drinking 2 Dr. As some of you know from my posts about Prezi and Ignite, I am a fan of alternative slide formats and presentation techniques. Early last year, the HTML5 advocates started using a set of slides that both showed off HTML5 features and were written in HTML5 - so they could do interactive samples and harness the power of HTML5 at the same time. Since I had limited time to work on the app, I looked around for a sample application to start off with. Happy 5lide-ing!
The HTML5 test - How well does your browser support HTML5? Marquee Hire from Up Marquees - For Weddings, Events & Festivals - Based in Flintshire, North Wales, UK HTML5 Sites 5lide: HTML5-based Slides Maker At last week's GTUG campout, a 3-day long HTML5 hackathon, I signed up to be a TA for the weekend. That meant I spent most of my time wandering around answering random questions and helping developers debug their hacks. But, I can't be surrounded by a bunch of people hacking on cool shit and not join in myself -- it's just way too tempting. So, on Friday night, after coming home from the pitches and discovering that drinking 2 Dr. Pepper's was not in fact a good way to avoid jet lag, I stayed up into the wee hours hacking on an idea I'd been brewing for a few weeks. As some of you know from my posts about Prezi and Ignite, I am a fan of alternative slide formats and presentation techniques. Early last year, the HTML5 advocates started using a set of slides that both showed off HTML5 features and were written in HTML5 - so they could do interactive samples and harness the power of HTML5 at the same time. Happy 5lide-ing!
Start Using HTML5 WebSockets Today One of the coolest new features of HTML5 is WebSockets, which let us talk to the server without using AJAX requests. In this tutorial, we'll review the process of running a WebSocket server in PHP, and then building a client to send and receive messages to it over the WebSocket protocol. What are WebSockets? WebSockets is a technique for two-way communication over one (TCP) socket, a type of PUSH technology. At the moment, it's still being standardized by the W3C; however, the latest versions of Chrome and Safari have support for WebSockets. What do WebSockets Replace? Websockets can replace long-polling. Many Ajax applications makes use of the above – this can often be attributed to poor resource utilization. Wouldn't it be great if the server could wake up one morning and send its data to clients who are willing to listen without some sort of pre established connection? Step 1: Get the WebSocket Server This tutorial will focus more on the client building rather than server implementation.
HTML5 Presentation In March 1936, an unusual confluence of forces occurred in Santa Clara County. A long cold winter delayed the blossoming of the millions of cherry, apricot, peach, and prune plum trees covering hundreds of square miles of the Valley floor. Then, unlike many years, the rains that followed were light and too early to knock the blossoms from their branches. Instead, by the billions, they all burst open at once. Seemingly overnight, the ocean of green that was the Valley turned into a low, soft, dizzyingly perfumed cloud of pink and white. Uncounted bees and yellow jackets, newly born, raced out of their hives and holes, overwhelmed by this impossible banquet. Then came the wind. It roared off the Pacific Ocean, through the nearly uninhabited passes of the Santa Cruz Mountains and then, flattening out, poured down into the great alluvial plains of the Valley.
How to Get the Best Color Out of Your Photos @bigbill25: Yes I know, that ergs me as well, but the idea that those are "primary" colors seems to be embedded in a persons mind by those darn 3rd grade art teachers. I guess we will just have to accept the fact that the general populace is mis-informed. @bigbill25: Actually, thats not entirely true. It depends on what you use for material. @bigbill25: Well it also depends if you are talking about pigment or light.
Onslaught! Arena Introduction In June of 2010, it came to our attention that local publishing "zine" Boing Boing was having a game development competition. We saw this as a perfectly good excuse to make a quick, simple game in JavaScript and <canvas>, so we set to work. After the competition we still had a lot of ideas and wanted to finish what we started. The retro, pixelated look It was important that our game look and feel like a retro Nintendo Entertainment System game, given the contest premise to develop a game based on a chiptune. Given how small these sprites are we decided to double-up our pixels, meaning that a 16x16 sprite would now be 32x32 pixels and so forth. Here's a scenario that we considered: This method would consist of 1x1 sprites instead of doubling them up on the asset creation side. Fun canvas tricks We all know that <canvas> is the new hotness, but sometimes developers still recommend using DOM. When an enemy gets hit in Onslaught! The Game Loop Here's an example of a game loop: Audio