Smash is a language designed for writing adventure games (interactive fiction), although it can be used for writing other types of single-player, turn-based games as well. The language provides an easy means of specifying all the locations, objects, and menu choices supported by the game, and lets you specify the "game logic," that is, what things should happen and when. To play a game written in Smash, you need a Smash interpreter of some kind. The interpreter will handle all the details about displaying information to the user and with saving and loading games. So your Smash code, in other words, does not need to address things like HTML formatting, terminal controls, or saved game files. This is largely the purpose of the Smash language in the first place: to reduce the code that needs to be written to implement a game to just the game logic itself, while the user interface and other bookkeeping details are handled for you. So where do you get a Smash interpreter? At present, there is limited availability of Smash interpreters. The Adventure Games Live site hosts a web-based Smash engine, which allows players to play Smash games via CGI. Saved games are automatically stored on the web server. At the present time, this web-based Smash engine is not available for downloading or use anywhere but on the RinkWorks server. However, a Python-based Smash interpreter and development tool called Rex has been released as open source software. This may be freely downloaded and will allow you to play Smash games locally. Alternatively, you can write your own Smash engine, using the language specs provided in this tutorial. Should you do this, we would be very much interested in learning about it, for a couple of different reasons. (One, there are some as-yet poorly documented details about Smash that developers of Smash interpreters should know about, and we would like to work with you to document these issues more clearly. Two, if you would like to make your interpreter available for others to download and use, we would be very interested in making it available from this web site.) At any rate, this tutorial will teach you the physical structure of Smash and all of the available commands. Afterward, some examples of Smash code are given which illustrate how common game behavior can be coded. If you are interested in writing a game for the Adventure Games Live site, please also read the pages about that, as there are certain requirements for games featured on that site. |
|