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 put 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).
Verb buttons have two colors, and optionally an image.

Also, if a file called "icon.gif" is present in the Engine's subdirectory, it will be used as the Application's Icon when launched from your operating system.

Next >>

Back to the main page