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.
You typically go through the following steps to create a new area:
Create one or more maps.
You may optionally create some custom artwork for your area.
You may choose to create new kinds of game objects for your area in XML format.
You may choose to write some code.
When you're ready to test your area, you can upload it to the game server.
While testing, you may do some incremental development in the live game.
When you feel your area is ready, you will submit it for review.
You'll make any adjustments to your area that the reviewer requires of you.
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.
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.
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:
maps that read their data from a text file. The Wyvern Sokoban game is implemented this way.
maps whose terrain and contents are regular enough to be expressable algorithmically. For instance, it might be easier to create a perfect circle of stones using a program than trying to draw it in the editor.
maps that have complex logic for determining where things go. A maze with moving walls might be a good candidate for implementing in Jython.
It's possible to mix any of the three modes and create a map that has extra code to support it.
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.
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.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.
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.
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:
You can clone an object in the game, and it will be placed in your inventory.
You can dispose an object to destroy it, and then reloading it will re-read your python class definition.
You can dump any object to see its properties.
You can invoke setprop on any object to change the value of one of its properties.
You can use the goto command to teleport to any map in the game, or cause a map to be loaded if necessary.
You can unload an existing game map; when you reload it using load or goto, it will re-read the map file and pick up any changes you may have made.
You can uncache an existing archetype, which throws it out of the system-wide cache. Next time you clone an object of that archetype, it will re-read the archetype from the file, picking up any new changes.
You have full access to your own Jython interpreter. This gives you amazing flexibility — you can call methods on objects directly, making you a little walking debugger.
Your toolchest includes many other commands. For more information on the development commands, see the Wizard Command Reference.
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.