• Register

WizFight is a local multiplayer game about dueling wizards for 2-4 players. It is a game about not caring that all you can do is throw banana peels at people while that other guy can draw lightning bolts from the sky.

Post feature Report RSS A Customizable Experience

Matt talks a bit about some of his goals for mod support in WizFight.

Posted by on

A major point I tried to hit in WizFight was moddability. I wanted to provide just enough moddability that the game would not change too much within the realms of the game's setting but that the player could create their own experience within the game. I opted for custom levels and enemies. I had even coded in an XML-based loop system that allowed for an arbitrary amount of sound clips to be looped together. Eventually, I was looking into custom traps, as well. I did not, however, want to include custom wizards because the complexity would be much higher and did not fit into the simplistic modding design that I had designed beforehand.

Full level creation guide here.

Custom levels were relatively simple to include. In addition to a Tiled tilemap, the modder would create an XML file holding the locations of each of the spawns and any traps that the level might have. If you were overriding the tileset, music, or win theme by using a file that was named differently than the level, you would also include that here. A custom level's XML file might look like this:

xml code:
<level>
        <spawns>
                <spawn x="64" y="16" />
                <spawn x="240" y="208" />
                <spawn x="304" y="64" />
                <spawn x="32" y="176" />
        </spawns>
 
        <bounds>
                <platform x="-16" y="80" />
                <platform x="320" y="80" />
                <platform x="-16" y="192" />
                <platform x="320" y="192" />
                <platform x="-16" y="224" />
                <platform x="320" y="224" />
        </bounds>
 
        <hills>
                <hill x="80" y="86" />
                <hill x="192" y="118" />
        </hills>
 
        <traps>
                <boulder x="16" y="76" spawnx="1" spawny="-16" delay="0" dir="1" />
        </traps>
 
        <overrides>
                <win name="temple" />
        </overrides>
</level>

It was relatively simple, if a bit of a pain. No one was a huge fan of it. Also, because of the archaic method I used to solve players falling through the level when wrapping around the screen, placing failsafes was a pain. Here's a diagram of how they would need to be placed.

Ultimately, I would have been much better off with an integrated level editor that had automated systems in place to place those failsafes. It would have made creating levels much easier for myself, as well. However, that was a bit out of my reach at the time.

Given the aversion to using the system currently in place, I do eventually intend to devise a level format that integrates the tilemap and the level objects so that I can move towards an integrated level editor so that the level creation process is much easier, further encouraging modding. I will also be forced to create a level editor if I plan to keep features the same across all systems.

In terms of enemy modding, the process was much simpler. An enemy's XML file might look like this:

xml code:
<enemy>
  <w>8</w>
  <h>8</h>
  <type>chaser</type>
  <sprite>eyeball</sprite>
  <health>3</health>
  <speed>1</speed>
  <knockback>1</knockback>
  <weight>3</weight>
</enemy>

Most of this is self-explanatory, other than knockback being a binary true/false value, with knockback being calculated by the game based on the size of the enemy's sprite and weight being how often they are randomly chosen by the system. Several behaviors for enemies were included and, ultimately, it turned out to be very customizable while still being simple. The above config file would provide this enemy:

There are a few concerns I had regarding high scores and possible online leaderboards based on changes made to the enemies included in the game but I had considered countering that with a simple check to make sure that you could only submit online high scores if the enemies were the defaults.

Ultimately, I wanted to be able to allow the player to modify major components while still retaining the game's defining factors, such as wizards. I think I succeeded in that quite a bit, albeit being a bit awkward to actually mod the game. When I rebuild the game I plan on extending modding support and adding completely new options for modders.

-Matt

Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: