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

April 25, 2007
Abstracting M3G (JSR 184) and Mascot Capsule version 3, new getting-started tutorial

[Back]

 

The new Mobile 3D programming tutorial outlines how to create an application that is extremely portable across both M3G (JSR 184) and Mascot Capsule version 3 by using abstracting to solve the common problem of enabling your application over several mobile phone models. Here you will find advice on programming tools, a comparison between M3G and Mascot Capsule version 3, and step-by-step examples including code classes and snippets.

This tutorial is written by Mikael Baros, Chief Technology Officer at Redikod, who also wrote a five-part article series about how to get started with 3D programming for Sony Ericsson mobile phones using M3G (JSR 184) which was published on Sony Ericsson Developer World between July 2005 and January 2006. Check it out here>>

Download Mobile 3D programming tutorial>>

Mikael Baros starts this tutorial by outlining the subject area and then provides an overview of 3D programming tools, IDEs and 3D and 2D graphics creation packages, including links to popular, freely available tools.

He then guides you through the abstraction process in the following sections.

Here's an overview:

 

Mikael Baros, Chief Technology Officer at Redikod.

Comparison between M3G and Mascot Capsule version 3
To understand the two APIs involved, the differences, similarities and advantages/disadvantages are presented in a grid format, including categories such as camera, mesh representation, 3D sprites, animation and 3D vectors.

Starting to abstract
Before the abstraction process can begin, Mikael Baros recommends that a situation analysis is carried out to understand basic needs. Remember to consider API requirements, structure, cross-platform library (Xlib) and the specific API library.

Examples
Mikael Baros explains how to abstract the two APIs through a series of examples which include code classes and snippets. These examples will start you down the abstracting path and by the end of this tutorial you will have a solid start on which to complete the work:

  • Meshes: defined as a structure holding rudimentary 3D model data and its appearance in the 3D world, this section covers mesh data and mesh appearance.
  • Transformations: to successfully render mesh structure, transformations on a mesh and the current camera on the scene need to be abstracted to correctly transform the meshes from object space to 3D world space and finally into camera space for projection.
  • Rendering: to abstract the rendering approach to have the same code for both APIs, similarities and differences in the rendering pipeline need to be identified and then separated in another set of abstract xlib classes.
  • Object generation: introducing the Factory class, this method creates all your specific classes and casts them to their base class/interface.
  • Collision: this more advanced example of abstracting APIs takes collision into account, a handy method used in many 3D games and something you will always want to abstract.

More information:

 

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