Boris van Schooten

A mini Actionscript 3 to Java converter

For my own game project, I needed to translate some AS3 code to Java. I could not find any software capable of doing this. Instead of doing all the boring conversions by hand (i.e. “function a():void” -> “void a()”), I wrote a simple converter based on regular expressions. It is very small but does a good job of automating the most boring part of the conversion process.

I converted my actionscript game Web Wars with it, and most of the code converted well. Afterwards, I spent most of my time fixing numeric type conversion problems (double-int), something that no shallow parser can do automatically.

See the source code below.

Continue Reading »

Installing Wacom tablet in ubuntu

I recently bought a wacom bamboo tablet (the most basic one) and had to do a bit of research to get it to work on my Ubuntu Karmic (32 bit) machine and add pressure-sensitivity to Gimp. All drivers are supplied, but the version is too old to work with my new tablet. The installation procedure for updated drivers is not hard, but I did not find it clearly described anywhere.

Continue Reading »

Detecting mobile visitors on your website

While almost all modern mobile devices (mobile phones, that is) can handle HTML, it is a good idea to optimise your web pages to the small screen size and low bandwidth of a typical mobile device. So, you’d want two versions of your website: one for mobiles and one for normal computers.

I’ve been looking for a simple and fast detection script that detects whether a website visitor is on a mobile phone or on a regular PC. I tested several scripts against lists of mobile and non-mobile user agents.

Continue Reading »

Designing games for a touch screen phone

Touch screen phones are becoming more and more common. Sales trends show that touch screens are really taking off since a year or two. This year we see the introduction of several cheap (€ 200) Android phones: The Samsung Galaxy Apollo and the LG GW620.

For both Android and IPhone, the primary input device is a touch screen. Only some Androids have a QWERTY keyboard, the others hardly have any buttons at all. I never worked with touch screens before, so I decided to try my hand at one.

Showing progress bar when loading a large SWF (AS3, Flex 4)

If you have a single large SWF, you often want to produce a custom intro screen (such as a progress bar) while it is loading. This is possible in Actionscript 3, using a factory class, though I found the documentation rather obscure. Thanks to some blog postings and the Mochi API examples I found out how it works.

As an example I will discuss a simple “progress bar” loader that can be plugged into any actionscript class.

Continue Reading »

Use PIC microcontroller to generate TV signal

Now, for something completely different. I’ve been working with the PIC series microcontrollers. These are versatile devices, which can, for example, drive a TV input directly, using no more than a couple of resistors. The PIC acts as a video chip (GPU) as well as a microprocessor.

Continue Reading »

mxmlc: compiling .as file inside package

Up till now I managed to avoid compiling a main class that was inside a package. When I did it the naive way, I got this error:

“a file found in the source-path must have the same package structure”

Sounds familiar? It does to many flex users. I found a lot of questions about this error but no answers. After some trial and error I found the answer. Note, I use flex 4.0.0 here. Other versions may have somewhat different command line parameters.

Continue Reading »

Kongregate’s crap, hidden gems, and overrated games

The Kongregate gaming community is an interesting place for gamers and game developers alike. Kongregate is basically community driven: by rating games, the users decide which games will gain more exposure and which will become buried and forgotten. This means editors have less work sorting out the loads of uploads and inevitable crap that arrives at their site every day. I’ve been happy with the constructive reviews that I get from Kongregate members. It’s better than, for example, Newgrounds. however, there seems to be some things wrong with the rating system. That’s not a good thing, as the whole site hinges on the rating system. I’ll try to illustrate.

Continue Reading »

Pixel Bender water ripple filter

Demo + source of my pixel bender ripple filter. This filter create pixel displacement and shading effects that look similar to water ripples.

Continue Reading »

Shiny table effect with Pixel Bender

Here’s a second pixel bender example. It creates a “shiny table” reflection effect for arbitrary display objects, such as a video.

Continue Reading »