How to make custom level packs


Note: As for v.1.5.0 this guide is no longer relevant since a level editor was added to the game and the level data format changed.

---

Hey arrowone

Update 1.3.0 adds support for custom level packs! In this post I will explain how to make your own custom level pack.

Creating levels

In TAWYCPA levels layouts are described with PNG files. Each pixel is a different entity/tile. For instance this is the level 'deadlock':

The size of the image defines the size of the level. Typically, levels are 16x16, but any size between 8-24 is ideal. The width and the height do not have to be the same, so you could easily make a 8x20 level. I recommend creating your levels using Paint.NET. It is a drawing tool halfway between MS Paint and Adobe Photoshop, and it is free!

Here are the pixel colors for each type of entity and tile:

  • Power core => Blue (0094FFFF)
  • Wall => Black (000000FF)
  • Neutral arrow => Orange (FF6A00FF)
  • Rock => Light grey (808080FF)
  • Linked block, red => Red (FF0000FF)
  • Linked block, lime => Lime (B6FF00FF)
  • Linked block, purple => Purple (B200FFFF)
  • Soft Wall => Grey (404040FF) (alpha = 255)
  • Rotator, clockwise => Grey (404040FE) (alpha = 254)
  • Rotator, counter-clockwise => Grey (404040FD) (alpha = 253)
  • Mirror => Grey (404040FC) (alpha = 252)

All the colors can be found in the Paint.NET color palette. Empty tiles should be transparent.

The rotation of neutral arrows are stored in the alpha channel. Basically, reducing the alpha with one, rotates the arrow clockwise:

  • Right => FF6A00FF (alpha = 255)
  • Down => FF6A00FE (alpha = 254)
  • Left => FF6A00FD (alpha = 253)
  • Up => FF6A00FC (alpha = 252)

The two outer-most tiles will always be where the player can place blue arrows (this might change in the future). The player can still place blue arrows there if the tile is a special tile like a mirror.

(It is currently not possible to place a tile and an entity on the same spot due to the simple save format.)

And that's it. Save your level with a fitting name.

Creating a pack

A level pack is a folder containing a JSON file with info about the pack and all the levels belonging to the pack. The game comes with two packs (atm), Standard and Advanced. As an example, here is the JSON for the Standard level pack (only the first few levels are shown):

{
  "name": "Standard",
  "creator": "Eastvillage",
  "levels": [
    {
      "name": "Empty",
      "file": "empty.png"
    },
    {
      "name": "One-two",
      "file": "one-two.png"
    },
    {
      "name": "Deadlock",
      "file": "deadlock.png"
    },
    {
      "name": "Skating",
      "file": "skating.png"
    }
}

The outermost object is the pack object. Currently the pack object has three keys:

  • "name": The name of the pack,
  • "creator": The creator of the pack, and
  • "levels": A list of level objects. The order of the levels determines the order in game.

Level objects currently have two keys:

  • "name": The name of the level,
  • "file": the PNG file that describes the level's layout. This is a path so you can put your levels in sub-directories if you want (e.g. "easy/intro.png". This field can be omitted if the file's name is the same as the level's name. (e.g. the level is called "AmazingLevel" and the PNG is in the same folder as the JSON and is called "AmazingLevel.png")

In the future, I want to add dependencies to levels, so for instance, the player has to complete level 5 to unlock level 6. Currently, the player can play your levels in any order they like. I would recommend putting the easy levels first anyway.

Bundle up your level PNGs and your pack JSON in a folder and you are done!

Testing and Errors

To test your pack, put the folder with your pack into a folder called levels located next to the TAWYCPA jar. The file structure should look like this:

tawycpa.jar
levels/
    yourpack/
        yourpack.json
        level1.png
        level2.png
        level3.png

Then run the TAWYCPA jar. TAWYCPA will seach the levels folder for JSON files and find your pack. When the game is running you should be able to find your pack in the level select.

You can make changes to your levels while the game is running. After saving a given PNG file, simply press ESC and then 'Reset level' to see your changes.

If the game crashes or does not start up, there might be an error in your pack. Check that the JSON file is correct. Remember all the quotation marks and make sure you have spelled  keys and PNG names correctly.

If you cannot find the error, try running TAWYCPA with the following command:

java -jar tawycpa.jar

and maybe you get an error messages telling you why.

Sharing your level pack

The best way to share your level pack is to go to the Discord server: https://discord.gg/JjycYfM. I guarentee people will enjoy your levels and give you some feedback. You can also find me there.

Have fun creating levels!

Get The Area Where You Can't Place Arrows

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.