2.3 GUI section
Posted on May 3, 2016 | 0 comments
The GUI section is optional and describes the command panels that will used in the game.
Inside it, each PANEL tag describes a command panel in the game. INCLUDE statements could be used to include libraries of reusable PANEL and PAGE definitions.
GUI section’s syntax is as follows (square brackets indicate optional parts, things which are not written in bold can be changed by you):
GUI[ SCENE SIZE 350×235]
[ SCENE LOOK lookType ]
[ SCREEN SIZE 800×600]
[ LOGOSRC gamelogo.jpg ]
[ MAP gamemap.jpg ]
[ COMPASS true ]
[ MSGLISTSIZE 3 ]
[ SKINS skinspec, skinspec, … ]
[ SHOW PROPERTIES property1, property2, … ]
[ HOOKS cmd1=event1,cmd2=event2, … ]
[PANEL definition …]
[PAGE definition …]
|Tag||Meaning and values|
(Optional) Specifies the default size of the rooms’ scenes, in pixels. Format: widthxheight.
This is just a standard value, of course. You can design rooms with scenes of any size you like later.
The default value is 350×235 which may be a good value for 640×480 screens, but rather small for bigger screens.
(Optional) Specifies the size of the “default” screen, in pixels. Format: widthxheight.
The “default” screen we are talking about here is the screen for for which the game was designed (typically the one used by the game programmer dureing design and testing). The value for SCENE SIZE should enable a “perfect” display on this “default” screen.
The game engine is able to automatically reproportion images so that the display is correct on different screen sizes.
So, if a game with SCENE SIZE 350×200 was designed for a 640×480 screen, we simply state so by using the SCREEN SIZE tag. This way, when a player will be using a larger screen (say, 1024×768) the images will be proportionally enlarged.
(Optional) Determines how the scene will look like in the standard view.
Possible values for lookType are:
1STPERSON (default) The scene is seen in 1st person (player is not displayed)
3RDPERSON The scene is seen in 3rd person (player is displayed)
|LOGOSRC||(Optional) URL of the game logo. If the URL is without the “http://” part, then it will be searched in the IMAGESFOLDER, as specified in the initial WORLD definition.|
(Optional) URL of the game’s default map. If the URL is without the “http://” part, then it will be searched in the IMAGESFOLDER.
Map’s dimensions should be 200×200
(Optional) “true” or “false”.
Specifies if the compass has to be displayed in the top bar. The default setting is false, which means that the compass is displayed only when it’s necessary (eg. you are in a room with more than one picture).
|MSGLISTSIZE||(Optional) Tells how many messages can be kept inside the player messages frame. The standard value is 3, but you may want to use a bigger value if you want to implement a chat site.|
(Optional) List of comma-separated skin (DXS) files specifiers (see next box below).
They have to be listed in order of preference, the first will be used and proposed by default.
If, instead of the skin file name the word “default” is specified, then the default skin is loaded.
If the SKIN attribute is omitted, the default skin is used.
Consult chapter 4 for the syntax of DXS files.
|skinspec||The skin specifiers could be one of the following:
|HOOKS||(Optional) Defines a number of server events that can be called from outside. See HOOKS definition below.|
(Optional) Defines a set of properties to be displayed.
By default, the game engine shows only those properties whose name begin with a capital letter.
|PANEL||(Optional) Defines a custom panel which could be used in the game. See PANEL definition below.|