Wizard's Development Guide

This section of the manual outlines the mechanics of putting files on the server. It covers the various tools at your disposal.

This section does not explain how to write programs in the Wyvern environment — the Tutorials are where the coding gets started. This guide is a refresher for you on the entire content-development cycle for Programming Wizards.

The Development Lifecycle

You typically go through the following steps to create a new area:

  1. Create one or more maps.

  2. You may optionally create some custom artwork for your area.

  3. You may choose to create new kinds of game objects for your area in XML format.

  4. You may choose to write some code.

  5. When you're ready to test your area, you can upload it to the game server.

  6. While testing, you may do some incremental development in the live game.

  7. When you feel your area is ready, you will submit it for review.

  8. You'll make any adjustments to your area that the reviewer requires of you.

  9. At Cabochon's option, if the content meets our criteria for safeness, robustness and quality, we will link your area into the main game server at some location that we agree on.

  10. When you feel like making a change or bug fix, you can start over again at step 1.

The remainder of this section tells you how to do these things.

Creating Maps

Usually you create maps using the Map Editor. There is a manual available that explains the various features of the editor.

The editor writes out your map as an XML file. This is a text file that you can open in any text editor and make changes to, if you're so inclined. The XML file format is outlined in the Map Editor manual.

Sometimes you need to put something in a map that isn't yet supported by the map editor. It's OK to make adjustments to the XML file by hand, as long as you check it carefully. One simple check you can do, after making modifications, is open it back up in the editor to see if your changes are correct. The editor supports reading any valid map, and it can write valid maps back out again. There just isn't necessarily always UI available for editing each map feature.

You can create maps entirely by hand, if you're careful. Keep in mind that if your map contains errors, it may not load into the game. You can fix the errors on the fly and try again — as soon as the map file is error-free, the map will load into the game.

The third and final way to create a map is to write a Jython program that initializes the map on the fly. This is the best way to implement certain kinds of maps, for instance:

It's possible to mix any of the three modes and create a map that has extra code to support it.

Creating Custom Artwork

If you have a little talent for drawing, you can create your own artwork and add it into the game. Wyvern's artwork is designed to be easy to create even for non-artists. Even if you consider yourself to have no artistic ability at all, you will probably find it pretty easy to start with an existing picture that's close to what you want, and change the colors or make minute changes to transform it into something else.

Or you can find a friend who can draw well, and ask them to do the work for you. As long as you don't use copyrighted or objectionable material, and your artwork follows the rules for sizing and naming, it doesn't really matter how you come up with it.

Before you create any artwork, you should read the Wyvern Artwork Specification and make sure you're doing everything properly.

To use your artwork in the game, set the object's image path to point to your artwork like so: "wiz/yourname/some_image". There's more detail on how to do this in the Tutorials.

Creating New Game Objects

You can create new game objects without writing any code simply by defining them in XML. This is similar to writing HTML or any other data-definition language. You declare the object in a text file, say which properties it should have and what their values should be, and then you can use it in any game map.

You can find more information about this in the Tutorials section.

Writing Code

Currently the only language we support is Jython. There are other languages for the Java Virtual Machine, such as (to pick the obvious example) Java. You can technically write your Wizard code in Java, but Java doesn't support reloading classes on the fly, so if you have a mistake in your class, you'll have to wait until the server reboots before you can try it again. If you really hate this, go to the Java Developer Connection and vote for bug #4151172. Maybe they'll fix it someday. (They claim they've fixed it, since you can do it from a debugger, but that's not what people were asking for.)

Once your code is written, you can upload it to the server, described in the next section.

Editing and Uploading Source Files

The major game file formats you'll be dealing with are as follows:

File type Extension(s) contents
maps .map text/XML
archetypes .arch text/XML
source code .py, .java text
images .gif, .png, .jpg binary
music .mid, .midi, .ogg binary
sounds .wav, .ogg binary
logfiles .log text

Text and XML files can be created or modified in any text editor, such as Windows Notepad. Some editors are more powerful than others: Rhialto wrote Wyvern entirely using Emacs, which is one of his favorite pieces of software on the planet.

Binary file formats can only be created and edited with specialized software.

You can use the Map Editor to upload and download all these file types using the Upload File and Download File dialogs.

Alternately, you can use File Transfer Protocol (FTP) with an FTP client of your choice. This approach gives you more flexible access to your wiz directory.

Incremental (In-Game) Development

The Wyvern engine provides various mechanisms for you to test and rework your code and areas on the fly. Here are some of the tools at your disposal:

Your toolchest includes many other commands. For more information on the development commands, see the Wizard Command Reference.

Submitting Your Area

When you're made a Wizard, you'll be assigned a sponsor — a senior wizard who can mentor you and review your code. Ask your sponsor to review your area for you. Your sponsor will have access to your wizard directory automatically, and he or she will help you get your area ready for use by real players.

Once your sponsor has accepted your code, he or she will submit it to the elder wizards to be linked into the game. It's possible that some other wizards may come by to see the code or try the area out. Once there's general agreement that your area is OK, the elders and your sponsor will work with you to figure out where your area should be linked in.

Generally there's only one entry point to an area from the rest of the game, to simplify the game administration. If you feel you have a real need for more than one entry point, and you can make a good case for it, we may opt to make an exception for you.

Once your area is live, you can continue refining it, but keep in mind that it's subject to further reviews to ensure it stays balanced and fair. Check the Area Guidelines to see the latest rules and policies for area and object creation.