Posted December 12, 2019 by Eastvillage
#guide #tutorial #custom level packs #levels
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.
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:
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:
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.
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:
Level objects currently have two keys:
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!
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.
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!