Header Sep
Latest News
我的评分 用户评价
登录票选本页

June 27, 2005
Landscape gaming design tips for a new angle on mobile games

[Back]

 

For a new perspective on your J2ME games, here are some design ideas to try when developing landscape style games for Sony Ericsson mobile phones.

 

Design for square
This is the simplest approach and targets the shortest width offered by a given screen size. By assuming a common screen size of 176x220 pixels but designing towards 176x176, a virtual square can be created that will cater for both landscape and portrait modes and will be highly portable. A drawback to this approach is the inherent "dead space". A popular solution is to mask the dead space with suitable user interface additions.

Generic layout
By not deciding a layout strategy and instead using the MIDP high level APIs, the application can be allowed to decide how best to cater for the screen dimensions and layout. This is generally only practical for business applications since much of fine control required for game oriented content is lost and high level user interfaces and low level APIs cannot be concurrently mixed.

Fit to window
By using Canvas to query the screen dimensions appropriately, MIDlets can scale effectively regardless of the screen dimensions available. See example below:

public void paint(Graphics g)
   {
    try 
    {
      Image image = Image.createImage("/mysprite.gif");     

      // Paint a white background
      g.setColor( 255, 255, 255 );
      g.fillRect( 0, 0, width, height );
      g.setColor( 255, 255, 255);

      // Paint the sprite centre
      g.drawImage(image, getWidth()/2, getHeight()/2, Graphics.VCENTER | Graphics.HCENTER);
    }
    catch (Exception ioe)
    {
      System.err.println("Couldnt load the image "+ioe);
    }
   }

This is considered "best practice" as it can be scaled to any screen size. However it relies heavily on the positioning of other artifacts to work effectively and may lead to increased development time. It can also lead to a stretched appearance although this may have relatively little impact depending on application type and genre.

Fit content
This approach requires reimplementation to take advantage of the extra screen width and usually involves substantially changing the dynamics of the application:

  • Increase the number of artifacts
    The new space needs to be filled in a natural way - a common answer to this is to increase the number of on-screen artifacts.
  • Modify clipping distance
    The clipping area should also be adjusted to cater for the different screen configurations and updated according to the play style. Fitting the content to the new dimensions provides the optimal use of the screen space. However, it requires a significant amount of additional development.

Updated Sony Ericsson J2ME Developers' Guidelines
The Sony Ericsson J2ME Developers' Guidelines are now updated to include a variety of landscape gaming style adoption hints, together with enhancements and fresh material covering all aspects of J2ME development for Sony Ericsson mobile phones. Download>>

More information:

 

我的评分 用户评价
登录票选本页