Skip to content
Convert Tile World solutions to JSON.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
COPYING
README.md
all.do
bstrlib.c
bstrlib.h
default.o.do
err.c
err.h
fileio.c
fileio.h
format.txt
solution.c
solution.h
tws2json.c
tws2json.do
version.h

README.md

What is this?

A program which converts Tile World's solution format, TWS, into a readable JSON-based format.

Is it any good?

Yes.

Okay, how do i use it?

First compile it.

% redo

Then run

% ./tws2json ~/.tworld/intro-ms.dac.tws

You should see something like this:

{"class":"tws",
 "ruleset":"ms",
 "levelset":"",
 "generator":"tws2json/0.1",
 "solutions":[
  {"class":"solution",
   "number":1,
   "password":"BDHP",
   "rndslidedir":1,
   "stepping":0,
   "rndseed":2017730254,
   "moves":"5L3R3,r,,4Rr,,R2Ll,,2L5D5L3D3U5R2D5R3U3D5L,Dd,,R,r,,R,l,,5L3R6D,,d"},
  {"class":"solution",
   "number":2,
...

Format

Pretty much the above.

The movestring is based on the notation commonly used by players. See format.txt for more details.

The format is still in flux though, so don't get too comfortable.

Bugs

Conversion from JSON to TWS isn't yet supported.

Mouse moves are not yet supported.

The levelset name isn't loaded properly.

License

GPLv2. See COPYING for the full license text.

Several files have been borrowed from Tile World, copyright Brian Raiter, which is also licensed under the GPL.

bstrlib was written by Paul Hsieh, and is licensed under the GPL.

You can’t perform that action at this time.