Getting Started with AGS - Part 9

 

Cursors

It's easy to overlook mouse cursors, but they provide the essential interface between the player and the game world. In AGS, each mouse cursor provides a different mode of interaction to the player.


The Cursors pane

Unlike most of AGS, mouse cursors modes are not generic - that is, AGS has special coded behaviour for some of the cursors. This means that you are unable to customize what some of the cursor modes do - let's list these ones briefly:

All the other cursors are 'normal' cursors, in that you can use them for whatever purposes you want.

If you want to create a Lucasarts-style game where the mouse cursor disappears during cutscenes, the easiest way to do it is simply to import a blank image over the Wait mouse cursor.

The Cursors editor pane is fairly self-explanatory. Click the "Change image" button to set a graphic for the cursor; and click inside the graphic to set the cursor's hotspot. (The hotspot sets which spot under the cursor will be activated when you click with it).

There are a couple of other options you can set for cursors, let's cover them briefly:

You can use the "New Cursor" button to create additional cursors to the standard 10. If you do so however, any extra cursors you create will not have interaction events created for them, so you will have to handle their clicks using the "Any Click" events.

 

Fonts

The default blank game comes with a couple of basic fonts, but you don't have to use them - you can import your own.


The Font Editor

By default, you'll see three fonts are available. Font 0 is the standard font used in message boxes. Font 1 is the speech font, used with lucasarts-style speech; and font 2 is an outline font for the speech font.

Outlines are pretty much essential for lucasarts-style speech. Since the text is drawn directly onto the screen and not onto a message box, without an outline it could be very hard to read the text, depending on what colour the screen happened to be behind it.

There are two ways to do outlines - AGS can do an automatic outline, or you can import a special outline font. They both have advantages:

Importing fonts

AGS supports both TrueType (TTF) and SCI (Sierra's format) fonts. To overwrite an existing font, simply select it and click the "Import font" button. To create a new font slot, click the "New font" button, then "Import font".

You should use SCI fonts wherever possible, since they are significantly faster to render than TTF fonts. Using TTF fonts can slow your game down, so only use them if you really need to.

Where can you get a SCI font? Well, there are three ways:

If you go to your Windows Fonts folder to try and import a TTF font, you will not be able to do so (double-clicking them will open them up in the Windows Font Viewer). Unfortunately there is nothing I can do about this - you must either type the filename in manually, or copy the font to another folder and import it from there.
By default, font 0 is used as the normal text font, and font 1 is used as the speech font. To use any additional fonts, the text script functions SetNormalFont and SetSpeechFont can be used to change the active fonts.

 

Conclusion

That's it for the "Getting Started" tutorials. I hope they've helped you to get a grasp of the AGS basics. If there's anything you didn't really understand or that you think should be covered but wasn't, please let us know on the Beginners Technical Forum, so that the tutorials can be improved to explain it better.

Return to tutorials index
 

Tutorial last updated 15 February 2004. Copyright (c) 2004 Chris Jones.