invade & destroy

.

Developing games using HTML5 Canvas and JavaScript is simply the future. Something classic like Egor Balishev’s RGB Invader, an entry in the 10K Apart, is usually my favorite. If for some reasons (which I would not elaborate in this post) you need to deploy the game as a desktop or a mobile application, using Canvas… Read more »

offline, command-line beautifier for JavaScript code

.

There are many different ways to autoformat JavaScript code, my favorite is always jsbeautifier.org. Apparently, you can also use it locally without a web browser since it supports running it with Rhino. It took me just few minutes to reimplement the same functionality, but using Qt Script, the fantastic ECMAScript support built into Qt. The… Read more »

san francisco

.

I have been in Qt Developer Days twice, in the previous two years. This year I am still going there, but only the San Francisco event, for the first time as a participant (as opposed to as a speaker). I’ll bring other new engineers at Sencha, too. Since I live in the Bay Area these… Read more »

geocoding based on IP address

.

Given an IP address, there are different ways to obtain the approximate location: online web service or offline database. It is far from perfect, but it is very useful to give some initial guess before locking into GPS signals or using WiFi-based tracking. Today’s example for X2 is actually an old code lying around which… Read more »

capture OpenStreetMap and MapQuest (and Ovi Maps)

.

Over a year ago, I showed how to render OpenStreetMap on your Qt application. While there were few follow-ups after that, I never found some time to clean it up. But worry no more, here is one OpenStreetMap-related example (at roughly 250 lines of code) I just made public, freshly available from X2 repository under… Read more »

minimalistic JavaScript editing widget

.

In the spirit of clean-up-and-publish, here is another code example of X2: a subclass of QPlainTextEdit which acts as a nice and minimalistic JavaScript editor. Basically it just adds a sidebar for the line number and a syntax highlighter. Thanks to QPlainTextEdit and QSyntaxHighlighter, this editing widget is quite performant. At just about 500 lines,… Read more »