 |
Iceblox Plus: Technical stuff
|
 |
Different platforms have different characteristics, and often warrant highly different
technical solutions. Here is a quick overview of how I created each version of the game.
The Sony Ericsson T3xx series
The T300 and T310 use the mophun game engine, which
supports 8x8-pixel tiles for creating backgrounds. Here I use three different layers --
a bottom one that contains the ground and all stationary block shadows, a middle one
that contains the ground decorations and the bottom half of the blocks, and a top one
that contains the top half of the blocks (aligned 4 vertical pixels off from the other
two). The blocks are 16 pixels wide, with top sides 8 pixels high and front sides 12
pixels high. If I draw all mobile shadows between layer 1 and 2, the bottom 12 pixel rows
of all mobile objects between layer 2 and 3, and finally the remaining top part of the
mobile objects after layer 3, the 3D effect takes care of itself. There is no "masking"
involved.
The Nokia 40 series
These phones have no particular game engine, but they are equipped with J2ME (the
Micro Edition Java) and some non-standard more powerful libraries for graphics and
sound, called the Nokia UI API. A combination of the graphical tools being rather
low-level and the Nokia 7210 having a small amount of memory forced me to use
old-school masking for the 3D effect instead. But I kept the original graphics.
The only place where I've made full use of the 4096-color display is the green tone,
which is considerably smoother than on the T300. On this platform there is no vertical
scrolling. The screen is so high that there is room for the entire playing field.
The Nokia 30 series
These phones have the same type of Java as the 40 series, and are actually faster
than the now practically ancient 7210. The only drawback was the small display. But what
worked on the T300 (101x80 pixels) could work here (96x65 pixels) if I scaled everything
down to 75%. The block units went from 16x8 and 16x12 to 12x6 and 12x9.
The Nokia 60 series
Compared to the Sony Ericsson T300, the Nokia 7560 has a huge display. There was no
chance of making the original graphics look good on it. That design used a design
that saved a lot of vertical space, but since this screen is higher than it is wide
(176x208 pixels), such an approach would be completely pointless. (This is one reason why I tend
to be highly skeptical whenever people talk about "write once, run anywhere" in the
context of mobile phones. Most games don't translate well from a landscape-oriented
display to a portrait-oriented one.) I had to do something about the viewing angle, and
picked a 45-degree view instead. With everything scaled up a bit, the ground units
were now 24x16 pixels. Also, I changed the mobile shadows from a flat color to a checkered
pattern alternating between black and transparent. The 7650 display isn't blurry
enough for this to work to full effect, however.
The Sharp GX10
This device is the multimedia phone flagship of the operator company Vodafone. They
developed their own J2ME graphics and sound libraries for it. Unfortunately, the sound
is ridiculously complicated to use and the new graphics tools are somewhat unpractical.
There are two built-in screen buffers, on which you can draw 8x8-pixel blocks of bitmapped
graphics, but only at integer multiples of 8 pixels on the back buffer. And no standard
drawing tools (text, rectangles, lines) work on the front buffer. The penguin consists of
12 separate 8x8-pixel blocks, and the shadow of 6. There was no easy way to achieve the
3D effect. I had to use brute force and draw the mobile graphics and then re-draw certain
background tiles on top of them.
The Siemens S55
Not only is the display of the S55 identical to the T300, but there are some really eerie
similarities between the device-specific Siemens Java libraries and the Mophun platform.
The way sprites and tile layers are handled is so similar it's hard to believe the two
platforms aren't related. One thing I had to take into account, however, was that Mophun
uses black as the transparent color, whereas the Siemens graphical tools use medium red
(roughly 0xdb0000). Some trivial pre-processing of the graphics data files took care of that.
The Sony Ericsson T610
This would have been a really mouth-watering game platform if not for the shortage of heap space.
Due to a bug or restriction, the total amount of memory a T610 Mophun game is allowed to
allocate is only 60 kilobytes. The T300/T310 has the same problem, but it isn't as crucial there
because everything is so small. The T610 display calls for bigger sprites, which will eat
up the heap memory in no time. I got around it by reducing all my sprites to 16 colors (4 bits
per pixel instead of 8).
|






|