This movie shows the power of MPEG-4 object constructing through PROTO construct for item display and ECMAScript for game management.
Important features used in this content
Scene construct
- PROTO
The proto node is a template node made of other protos or native MPEG-4 objects. It may be used in the scene as any other node, greatly simplifying complex scene organization.
In this example, the proto node is used to modelize the bubbles appearance and interaction behaviour. - Viewport
This node is used to specify how to map a given content to a 2D rectangle, indicating aspect ratio and alignment constraints. This enables designing a scene in any given coordinate system and mapping it precisely to the final display.
Scripting
- Script
This node is used to exectute complex scripting, typically ECMAScript. It gives more control on the scene compared to a conditional, and is very usefull to handle state variables.
In this example, the script is used to manage the game state: bubbles gathering, discarding and appearance handling.
User Interactivity
- TouchSensor
This node is used enable pointing devices interactions with graphical elements of the scene, generating a set of simple (isOver, isActive) as well as complex (hitPoint, hitNormal, hitTexCoord) events.