Tron: an HTML5 Game in 219 Bytes

661-tron-219

I’ve never been keen on this multi-megabyte web page nonsense. Perhaps it’s because I started web development during the dial-up days when a total page weight of 100Kb was considered excessive? Or perhaps it’s simply because I don’t understand why extravagant bandwidth is necessary?

I’ve mentioned a number of 1KB JavaScript and CSS competitions before. There have been some remarkable entries but few are as bandwidth-friendly as 219 Byte Tron. Yes, 219 bytes — which includes all the HTML5 and JavaScript code.

The project started as a challenge and several collaborators contributed to the memory-shaving exercise. You can play it here — use the keys i, j, k and l to start and steer. I found the game worked best in Opera but it’s fine in Chrome and Safari. Firefox and IE9 aren’t compatible.

While it’ll never win any game-play awards or replace your Call of Duty sessions, it’s an impressive exercise in mental agility. The developers have documented each ‘line’ of the code and there are some useful tips and tricks which you could apply to your JavaScript programming.

  • In all browsers except Firefox, assigning an ID to an element exposes the node object as a variable within JavaScript, e.g.
    
    <div id="test">Hello</div>
    <script>test.textContent = "Goodbye";</script>
    
  • Browsers will happily accept non-quoted tag attributes if they don’t contain >, space or tab characters.
  • Variables can be initialized within function calls, e.g.
    
    myFunction(a=1, b=2, c=3);
    
  • A binary & can be used instead of && if both sides of the operator are boolean values.
  • body is the only essential HTML tag on a web page!

Remember that Tron takes byte saving to an extreme level. Some of these tips are useful but you should always weigh that against:

  1. Functionality. For example, just because onkeyup is shorter than onkeydown, that doesn’t necessarily make it the most appropriate event to use.
  2. Readability. Without the documentation, Tron’s code would have been impossible to understand. Few developers would persist in trying to make sense of it.
  3. Compatibility. I advocate cross-browser operation and suspect IE9 and Firefox could be fixed with a few additional bytes.

219 Byte Tron is astounding. While you may never adopt many of these techniques, you should consider what’s possible before adding another megabyte of superfluous bulk to your pages.

5 Fantastic Podcasts For Web Designers

If you are a web designer looking to learn new skills, or even just to listen in on conversations about your passion, then podcasts might just be the ticket for you. You can listen in the car, at work, or even at the gym, to gain new insights into your career. Talk about multi-tasking! Here are 5 of my favorite web design podcasts:

1. The Big Web Show

The Big Web Show focuses on a special guest each episode. This is great, because this allows each episode to take a new direction, usually going in depth into what the guest’s specialty is, or is really passionate about. It is produced by the 5by5 Network and features topics like web publishing, art direction, content strategy, typography and more. Big Web has a very loose format, but still manages to pack in a lot of great  information, and the guest format brings in new perspective each and every episode.

2. The Web Ahead

Also produced by the 5by5 Network, The Web Ahead is the more technical cousin of The Big Web Show. More dedicated to the web developer, the show hosted by Jen Simmons focuses on the changing technologies and future of the web. They discuss such topics as HTML5, mobile, responsive web design, iOS, and Android. There are all topics that web designers should be well aware of, even if they are on the front-end.

3. The Deeply Graphic DesignCast

With only 8 episodes under its belt, Deeply Graphic has already found its stride. While not exclusively devoted to web design, many of their episodes do focus on it. Already, there is a 2 part episode all about the web design trends of 2012, as well as an episode dedicated to online portfolio websites. Most of the other episodes focus on general business-side topics that print as well as web designers can apply to their business. Produced by The Deep End design studio in Los Angeles, the three hosts have varied experience, and weigh in on issues from different viewpoints, which makes for a very interesting and entertaining show.

4. Shop Talk

Shop Talk is a podcast with a twist… its also a live call-in show! The two hosts, Chris and Dave share a genuine enthusiasm about web design and development that is infectious. They have guests on a regular basis and they have a lot of fun talking about some really geeky things. But I just happen to be a geek too, so it fits into my day perfectly.

5. The Boagworld Show

Boagworld combines entertaining banter and great information into an extremely listenable package. They follow the format which I like, one topic per episode. But these guys take it a step further, and organize their podcasts into “seasons” of 6 episodes each. Each season is its own umbrella topic, and each episode fits nicely under that umbrella.

 

5 of the Best Free HTML5 Presentation Systems

645-html5-presentations

I have a lot of respect for Microsoft PowerPoint. It may be over-used and encourages people to create shocking slide shows, but it’s powerful and fun. I have just one criticism: all PowerPoint presentations look the same. It doesn’t matter how you change the colors, backgrounds, fonts or transitions — everyone can spot a PPT from a mile away.

Fortunately, we now have another option: HTML5. Or, more specifically, HTML5 templates powered by JavaScript with CSS3 2D/3D transitions and animations. The benefits include:

  • it’s quicker to add a few HTML tags than use a WYSIWYG interface
  • you can update a presentation using a basic text editor on any device
  • files can be hosted on the web; you need never lose a PPT again
  • you can easily distribute a presentation without viewing software
  • it’s not PowerPoint and your audience will be amazed by your technical prowess.

Admittedly, HTML5 presentations are not quite as powerful:

  • you require web coding skills
  • positioning, effects and transitions are more limited
  • few systems offer slide notes (it’s a little awkward to show them separately)
  • it’s more difficult to print handouts

But those are not necessarily killer drawbacks — you’re forced to concentrate on the presentation content rather than frivolous tweaks and awful animations.

Here are the best HTML5 presentation systems I’ve found. Click the headings to view a demonstration — most work best in Chrome, Safari or Firefox…

Reveal.js

This is my current favorite. Slides look great and can be positioned horizontally or vertically. It’s also easy to change the CSS to add your own effects — I managed to add a rudimentary notes facility doing just that.

Slides are defined in separate section tags and Reveal.js offers a choice of several 3D slide transitions … although they look fairly similar.

Download the reveal.js files…

Impress.js

Impress.js is, well, impressive. It’s been influenced by the commercial prezi.com; slides are arranged in a 3-dimensional space and your view rotates and pans accordingly. I won’t attempt to explain it further — just try it and you’ll understand what I mean.

Slides are defined in div elements with data attributes controlling the x, y, z locations and rotations. That’s the only drawback; it’s a little difficult to visualize and define those values. Persevere, though, and you’ll be able to create some stunning and original slide shows.

Download the Impress.js files…

Google Slides Template

As you’d expect, Google has their own HTML5 presentation template (as well as the one offered in Google Docs). It’s fairly basic when compared to Reveal.js or Impress.js; it’s restricted to right-to-left slide transitions and fade-in effects, but it still looks great.

Slides are defined in article tags and it’s easy to add extra stylesheets to override the default CSS.

Download the Google Slides Template file…

Deck.js

Deck.js was one of the first HTML5 presentation systems. It looks similar to Google’s offering — perhaps a little prettier, but without slide transition effects.

Slides are defined within semantically correct section blocks in an outer article. There’s also a documented API so it’s possible to create your own extensions.

Download the Deck.js files…

Shower

Shower is a presentation system by Vadim Makeev of Opera Software. While it’s one of the simpler systems, it’s fast and works well in all browsers. The slide thumbnail view is especially cool (press ESC).

Shower’s main drawback is it’s convoluted HTML. Slides are defined in a section within a div within another div and contain their own header and content. A little more development could make it easier to use.

Download the Shower files…

Other worthy mentions:

Have I neglected to mention your favorite HTML5 presentation system…

27 Blog Designs With Amazing Design And Functionality

In this inspirational showcase article, I collected a little bit different blogs – usually blogs serve for one purpose – design or function. Just a few blog designs fulfil both important tasks, I thought I will find a lot more design suitable for this article before I started.
Here you’ll find a lot of beautiful simplicity and functionality where design really works and matters! Enjoy and hope you will learn good things from those blog designs and implement in your own designs as well!

Read the full article