Opera Command, JavaScript based Missile Command game

Tuesday, July 14th, 2009

Firstly I'd just like to let you know that the lack of posts lately is because I have a new full time job which I'm enjoying quite much so far, but it still means I have less time / motivation to write stuff. The unit testing series and other postings ...

TankWar Online, my JavaScript based cannons game

Tuesday, June 30th, 2009

Back in late 2006 I wrote my most ambitious JavaScript/game project so far: TankWar Online, which as you may guess from the name was about tanks, shooting stuff, and it had a real-time online game mode - as far as I know, the first such ever in a JS based ...

How WidgetCity does a tile-based map using just CSS

Monday, June 15th, 2009

My city building game, WidgetCity, displays the city as a table, each cell of a table representing one tile. The tile map is done purely using just CSS, and CSS classes. The map is also scrollable. How is this all done?

How to pass variable values to JavaScript

Friday, May 22nd, 2009

A relatively common task in today's Web 2.0 apps is passing values from a server-side script (or through a link) to JavaScript, affecting the client-side script execution. Not surprisingly, there are a few ways to do that. Let's look at three and their pros and cons: Embedding scripts into templates Passing variables ...

Optimizing JavaScript for extreme performance and low memory consumption

Thursday, April 30th, 2009

While making WidgetCity, I had to use various measures to speed up the code. In this post, I'll show you the tricks I learned - some of which I haven't seen mentioned anywhere else before. A lot of performance optimization tips for JavaScript code involve things that you more typically see ...

I wrote a Sim City clone in JavaScript

Tuesday, April 28th, 2009

This is why I haven't been updating lately: I have been working on a Sim City clone, written purely in HTML, CSS and JavaScript! The game is called WidgetCity, and I'm participating with it in the Betavine Widget Competition 2009. The game was designed to run in Opera Widgets mode, but it ...

Integrating FCKeditor with Zend_Form

Sunday, April 5th, 2009

How to use FCKeditor, or any other WYSIWYG editor, with Zend_Form? Another relatively common question. There are many ways you can do this, but let's look at these two as they are the best in my opinion: Adding some JavaScript to your view script Creating a Zend_Form_Decorator We'll be using FCKeditor, but you can ...

Object-Oriented JavaScript book review

Wednesday, March 11th, 2009

I was recently contacted by Packt Publishing, and asked if I wanted to review a book they published - Object-Oriented JavaScript, written by Stoyan Stefanov. I hadn't reviewed books before, but I decided to give it a shot! As stated on Packt's website, by reading the book you will learn: Create scalable, ...

Using Prototype Property in JavaScript

Wednesday, March 4th, 2009

I have been asked to review the book "Object-Oriented JavaScript" by Stoyan Stefanov, and published by Packt Publishing. The review is not quite ready yet, but in the meantime, here's some exclusive content from the book for you to have a look at. The following topics are discussed in this article: Every ...

Ajax, high latency and user experience

Thursday, February 26th, 2009

Most of us probably have used at least one website which bases some major functionality on Ajax. But have you ever used a such site, done something, then moved on to another page, only to come back later to realize what you just did was never saved? What happens to XMLHttpRequests ...