2.10 IMAGE

The IMAGE definition is widely used in the DimensioneX file syntax in order to describe an image being used.

 

An IMAGE is defined in one line according to the following syntax:

 

IMAGE [orientation] [dimensions] [ SHOWAREA [x1],[x2],y ] url

 

Example:

 

IMAGE N 400×300   SHOWAREA 100,300,10     start.jpg

 

 

The parameters are specified below. Don’t include double quotes (“) for specifying the values:

 

IMAGE attribute Meaning
url

Defines the file representing the image.

It can be either a fully-qualified, absolute URL or a relative URL (a simple file name is considered as such).

 

  •   Absolute URLs are not recommended.
  •   URLs beginning with a slash are considered relative to the server hosting the game.

For example, the following:

/pics/scroll.gif

always refers to the /pics/ folder in the server hosting the game.

 

  •   Relative URLs not starting with a slash are considered relative to the IMAGESFOLDER attribute which has been defined for this WORLD. This means that, by deafult, all images are assumed to be stored in the same IMAGESFOLDER.

 

For example, the following:

scroll.gif

will be automatically modified so that the image will be fetched from the WORLD’s IMAGESFOLDER.

dimensions (Optional) Specifies width and height of the image in the form: 123×123. The first number is width, the second is height.
This data are optional but, if specified, the effect as perceived by the user is that the page loads more quickly.
orientation

(Optional) Specifies the orientation which an observer should have in order to see that image.

 

Possible values are N S E W U D for North South East West Up Down.

 

Use this attribute in multiple IMAGE definitions in order to create navigable 360° views of the object.

SHOWAREA x1,x2,y

(Optional). Specifies the baseline along which any on-screen object or icon can be shown.

The purpose of this information is to avoid erroneously displayed situations such as: objects flying in the air, characters standing on the water’s surface, etc.

 

The default values are:

x1 = left side of the picture

x2 = right side of the picture

y = 10% of the picture’s height

 

Please note that, any invalid value is automatically replaced by its default value specified above. For this reason, if you would like not to specify a parameter, just use the conventional value –1, which the game engine will interpret as: “use the default”.

 

Note: The IMAGE tag is not used for specifying icons, which are dealt with by a specific ICON attribute.

 

See also 3.9.8Object model for: IMAGE for information about how to handle IMAGE objects in the scripts.

2.10.1    Allowed formats

Allowed formats are: JPG (Jpeg), GIF, PNG for images. Please be sure to read carefully section 1.4.3About game images and sounds for useful tips about image/clip optimization.

 

In the IMAGE tag you can use also:

  • Macromedia Flash (.SWF)
    animations in .SWF format. Please note that it is not possile to see objects placed on top of embedded objects, such as SWF animations.
  • QuickTime (.MOV)
    panoramic images or 360° images coded in the QuickTime VR Format, QuickTime video clips. Please note that it is not possile to see objects placed on top of embedded objects, such as MOV clips.
  • More image formats may work, depending on the user’s browser.
2.11 Attributes/properties, ATTRLIST definitions
2.9 SHOW types

Leave a Reply

Your email address will not be published. Required fields are marked *