<< Previous

Next >>

indy_logo.gif (3362 bytes)

Step 6: customising the engine

By setting system properties, you can change the engine's interface or localise it.
This is done in a top-level block entitled "System". The set of verbs can be completely redefined there, if needed.


SYSTEM
{
	WALK
	{
		LABEL { "Walk to" }	// Walking label
		INK { 0 0 25 }		// Foreground color
		PAPER { 255 128 128 }	// Background color
		POSITION { 0 }
	}
	VERB Push
	{
		INK { 255 255 255 }
		PAPER { 255 0 0 }
		KEY { "P" }		// Keyboard shortcut
	}		
	VERB Open
	{
	}
	VERB talk
	{
		CURSOR { "gr/m_talk.gif"  17 15 "gr/m_talk2.gif"  17 15 }	// Hot cursor
	}
	// All verbs require 1 item to act on...
	VERB Give
	{
		SENTENCE { 2 "to" }	// ...but this verb requires 2 items.
	}	
	VERB Use
	{
		SENTENCE { * "with" }	// Special case: item-dependent sentences.
	}
	VERB Pull { }
	VERB Close
	{
		ICON { "gr/x.gif" }	// Button image
	}
	VERB "Pick up" { }
	VERB "Turn on" { }
	VERB look { }
	VERB "Turn off" { }
	FPS { 10 }		// Default: 5 frames per sec.
	SCREEN { 512 350 }	// Default: 320x143
	PLAYER { Junior }	// Specify which item will be initially controlled by the player.
	TITLE { "Henry Java Jr. and the tutorial of Doom" }
	FONT { "Courier" 25 }	// Default: "SansSerif" 12
	INVENTORY { 6 }		// Default: 10 items shown at once.
	CURSOR { "gr/m_triangle.gif" 17 15 }	// Normal cursor
}

ROOM main
{
	ITEM Junior
	{
		ANIMATION
		{
			// --- standby images ---
			0  0  "gr/indy_d.gif"  1 // Looking South
			0  1  "gr/indy_r.gif"  1 // Looking West
			0  2  "gr/indy_u.gif"  1 // Looking North
			0  3  "gr/indy_l.gif"  1 // Looking East
			// --- walking animation ---
			1  0  "gr/indy_wd.gif" 4 // Looking South
			1  1  "gr/indy_wr.gif" 6 // Looking West
			1  2  "gr/indy_wu.gif" 4 // Looking North
			1  3  "gr/indy_wl.gif" 6 // Looking East
			// --- talking animation ---
			2  0  "gr/indy_td.gif" 7 // Looking South
			2  1  "gr/indy_tr.gif" 4 // Looking West
			2  2  "gr/indy_tu.gif" 1 // Looking North
			2  3  "gr/indy_tl.gif" 4 // Looking East
		}
		POSITION { 170 170 0 }
		ITEM whip
		{
			ICON { "gr/whip.gif" }
			SENTENCE { 2 }	// this item needs another object with a verb like "use"
		}
	}
}

You can define as many verbs as you wish. For each verb, the default is 1 item per sentence. You can specify 2 if needed, or let this number be item-specific by specifying "*". Here for example, the Whip needs to be "Used" with something else.

Two custom mouse cursors can be defined for each verb. The second one will be used as "hot", meaning there is an item underneath the mouse that can be activated with the selected verb (in the Sam&Max™ way). The coordinates in the CURSOR block refer to the activation point within the image, that is, the point that counts when clicking. Please note that custom cursors require java 1.2 .

Verb buttons have two colors, and optionally an image.

The size of the playing area can be defined with the SCREEN keyword. Please note that this size refers only to the main area, and does not include the screen space needed by the interface placed below it. This can be troublesome when switching to full-screen mode, because the number of physical lines is limited and you may not have enough space to show the interface if you didn't plan correctly.

Fonts can also be changed, but they have to be only one of the following names: Dialog , SansSerif , Serif , Monospaced , Helvetica , TimesRoman , Courier , DialogInput , ZapfDingbats . These fonts are internal to Java 1.1 and don't necessarily appear as installed fonts in your operating system.

There is a text file called "indy.ini" which can be modified to localise the menus and the Application's Icon.

<< Previous

Next >>

Back to the main page

1