Skip navigation

..Code

Snowball has been written using Mobile Processing, an open source environment dedicated to design and prototype software for mobile phones. It mantains all the caracteristics and goals of its “big brother” Processing, another open source environment which runs on Windows, Mac OSX and Linux. Processing and Mobile Processing (from now on: Mobile) build applications using Java, a language developed by Sun Microsystem that has the particularity to be system-indipendent, it means that the same piece of code generates a program which can run on every system, if supported. Mobile phones use a particular version of Java called Java 2 Micro Edition (J2ME) which is dedicated to run applications on little devices, that’s why an application in Mobile, if well coded, can potentially run on every mobile phone with Java inside.

You can have a look to all the prototype code, downloading and trying it:

HOW THE CODE WORKS

Our prototype shows the the many function of Snowball, they are still images which change depending on the key that are pressed. In an initial phase, Snowball coudn’t be loaded by mobiles because the weight of the single files. So we decided to split the application into little steps which represent the various phases of the interaction; for the same rasons image quality has been reduced.
Basically, you can move through the menu with directional keys, hitting Fire or Softbutton Right makes you choose that item. Pressing Softbutton Left you go back in the menu hierarchy. To exit from the application simply press 9 and to come back to the start, press 7.

Basically these applications are structured into two parts:

  • in the firsts all images are assigned to a variable, and every variable is assigned to a “mode”. This is a value used into the draw function (which is into the second part of the code) to recall the image of the screen associated to it. It means that everytime the value of the mode variable is changed, the program shows the correlate screen;
  • in the second, there are all the function used to change the mode value depending on the specific key pressing.

Thanks to Nicholas Zambetti for the source code of mode-switching.

Thanks to Vinay Ventrakaman for the useful help while coding.

MENU NAVIGATION

Menunav_thumb
This is the prototype of the menu, that simulates the setting of an image as a snowball attack. The path you have to make is forced, and will carry you from the inital screen to the confirmation screen that snowball attack is set.

Donwloads:

Application folder (contains the code in Mobile format and its concerning data, to use it you have to copy it into your Mobile processing sketches folder -which usually is in Documents on Mac OSX and in Documenti\MobileProcessing in Windows - and then open it with Mobile, .zip archive, 373 kilobytes)
MIDlet (upload this file on your mobile phone via Infrared or Bluetooth to see it working, .jar, 227 kilobytes)
Code-A4 - booklet_A4 format (download this if you want to see the code and don’t have Mobile, Adobe .PDF file, 22 kilobytes)

ATTACKING WITH SNOWBALLS

Snowball_attacking-thumbnail
This simulates a little snowball fight (that’s the same represented on the step-through, so if you can’t find yourself just refer to that).

Donwloads:

Application folder (contains the code in Mobile format and its concerning data, extract it into your Mobile processing sketches folder -which usually is in Documents on Mac OSX or in Documents\MobileProcessing on Windows - and then open it with Mobile, .zip, 2171 kilobytes)
MIDlet (upload this file on your mobile phone via Infrared or Bluetooth to see it working, .jar, 1130 kilobytes)
Code-A4 - booklet_A4 format (download this if you want to see the code and don’t have Mobile, Adobe .PDF file, 36 kilobytes)

Useful source code can be found here.

The software has been designed for Nokia6600:

  • screen resolution 176 x 208 pixel at 127 DPI, 65.536 colors, TFT display;
  • VGA camera resolution 640 x 480 pixel;
  • supports GSM, GPRS, HSCSD, Bluetooth 1.0, IrDA;
  • CPU 104 Mhz, 6 Megabytes internal memory;
  • 16 Megabytes RAM;
  • 716 Kilobytes video memory;
  • Java: MIDP 2.0, CLDC 1.0

nokia6600

Before downloading Mobile or Processing you should verify that your Java VM version is up to date, check it here; In order to use Mobile:
Windows users must also download the Java Wireless Toolkit for CLDC here (42 Megabytes);
Mac OSX users must download the Mpowerplayer SDK here (7.4 Megabytes);

Latest version of Processing is here available for Mac OSX (14.5 Megabytes), Windows (34 Megabytes) and Linux (41.5 Megabytes);
Latest version of Mobile is here available for Mac OSX (5.5 Megabytes) and Windows (3.6 Megabytes);

< (Flowchart and Step-through) PREVIOUS | NEXT (Technology) >