Skip to content

Instantly share code, notes, and snippets.

@Vovan-VE
Last active May 4, 2023 15:34
Show Gist options
  • Save Vovan-VE/8fe61068255eca1f04837e33c215ddf8 to your computer and use it in GitHub Desktop.
Save Vovan-VE/8fe61068255eca1f04837e33c215ddf8 to your computer and use it in GitHub Desktop.
WinPlex SLT file format

WinPlex *.slt file format

WinPlex stores demos (solutions) in *.slt files.

SLT files are stored in Solution subfolder in the game directory. Every SLT file named as:

<levelset-file-name>.<level-index>.slt

For example:

  • levels.dat.111.slt
  • mullover.sp.1.slt

File Format

SLT file is a text file in CP1251 codepage.

See SVG

It consists of:

  • player: Name of the player solved the level.
  • levelset file: Name of levelset file.
  • level number: Level number.
  • Save frames. Due to bug an in-game "Save" cause 1 frame to miss from SLT, so "save" frame index is written instead.
    • frame index: frame number when in-game "Save" was triggered.
  • Bugs DB. Bugs (buggy base) in WinPlex have constant repetition period and random initial time offset. So, SLT for level with eaten bugs must have at least entries for those eaten bugs. Bugs not initialized from SLT will have random initial time offset and so may cause gameplay change if Murphy ate one of such bug. WinPlex saves all bugs, not only eaten. However, it loss bugs DB if in-game "Save/Load" was used.
    • x and y: 0-based coordinates of target bug tile.
    • time offset: initial time offset from 0 to 35 inclusive.
  • Movements. Every "move" ends with - char. Possible cases for every "move":
    • - (a dash alone): idle 1 frame.
    • 1-: hold spacebar 1 frame. To release Red Disk it must be repeated 23 times.
    • X-: move 1 tile (4 frames) to the given direction X.
    • X1-: snap eat 1 frame to the given direction X.
      • In both cases above the X direction can be D, L, R or U.
      • When several arrow keys was pressed together, WinPlex can write several direction letters together in a single "move", like for example DL-, which is incorrect and illogical, but it does so.

// https://tabatkins.github.io/railroad-diagrams/generator.html
Diagram(
Stack(
Sequence(
NonTerminal("player"), "0xA4",
NonTerminal("levelset file"), "0xA4",
NonTerminal("level number"), "0xA4",
),
Group(
ZeroOrMore(
Sequence(NonTerminal("frame index"), "0xA4"),
null,
"skip",
),
"save frames",
),
Group(
ZeroOrMore(
Sequence(
"M*",
NonTerminal("x"),
"*",
NonTerminal("y"),
"*",
NonTerminal("time offset"),
),
"-",
"skip",
),
"bugs DB"
),
Group(
OneOrMore(Sequence(
Optional(Sequence(
MultipleChoice(1, "any", "D", "L", "R", "U"),
Comment("arrows"),
), "skip"),
Optional(Sequence("1", Comment("spacebar")), "skip"),
"-",
)),
"movements",
),
),
)
Display the source blob
Display the rendered blob
Raw
<svg class="railroad-diagram" width="704" height="527" viewBox="0 0 704 527" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g transform="translate(.5 .5)">
<g>
<path d="M20 21v20m10 -20v20m-10 -10h20"></path>
</g>
<path d="M40 31h10"></path>
<g>
<path d="M50 31h0"></path>
<path d="M50 31h10"></path>
<g>
<path d="M60 31h10"></path>
<path d="M634 31h10"></path>
<g class="non-terminal ">
<path d="M70 31h0"></path>
<path d="M138 31h0"></path>
<rect x="70" y="20" width="68" height="22"></rect>
<text x="104" y="35">player</text>
</g>
<path d="M138 31h10"></path>
<path d="M148 31h10"></path>
<g class="terminal ">
<path d="M158 31h0"></path>
<path d="M210 31h0"></path>
<rect x="158" y="20" width="52" height="22" rx="10" ry="10"></rect>
<text x="184" y="35">0xA4</text>
</g>
<path d="M210 31h10"></path>
<path d="M220 31h10"></path>
<g class="non-terminal ">
<path d="M230 31h0"></path>
<path d="M354 31h0"></path>
<rect x="230" y="20" width="124" height="22"></rect>
<text x="292" y="35">levelset file</text>
</g>
<path d="M354 31h10"></path>
<path d="M364 31h10"></path>
<g class="terminal ">
<path d="M374 31h0"></path>
<path d="M426 31h0"></path>
<rect x="374" y="20" width="52" height="22" rx="10" ry="10"></rect>
<text x="400" y="35">0xA4</text>
</g>
<path d="M426 31h10"></path>
<path d="M436 31h10"></path>
<g class="non-terminal ">
<path d="M446 31h0"></path>
<path d="M562 31h0"></path>
<rect x="446" y="20" width="116" height="22"></rect>
<text x="504" y="35">level number</text>
</g>
<path d="M562 31h10"></path>
<path d="M572 31h10"></path>
<g class="terminal ">
<path d="M582 31h0"></path>
<path d="M634 31h0"></path>
<rect x="582" y="20" width="52" height="22" rx="10" ry="10"></rect>
<text x="608" y="35">0xA4</text>
</g>
</g>
<path d="M644 31a10 10 0 0 1 10 10v3a10 10 0 0 1 -10 10h-584a10 10 0 0 0 -10 10v20a10 10 0 0 0 10 10"></path>
<g>
<path d="M60 94h172"></path>
<path d="M472 94h172"></path>
<rect x="232" y="82" width="240" height="70" rx="10" ry="10" class="group-box"></rect>
<g>
<path d="M232 94h0"></path>
<path d="M472 94h0"></path>
<path d="M232 94h20"></path>
<g>
<path d="M252 94h200"></path>
</g>
<path d="M452 94h20"></path>
<path d="M232 94a10 10 0 0 1 10 10v3a10 10 0 0 0 10 10"></path>
<g>
<path d="M252 117h0"></path>
<path d="M452 117h0"></path>
<path d="M252 117h10"></path>
<g>
<path d="M262 117h0"></path>
<path d="M442 117h0"></path>
<g class="non-terminal ">
<path d="M262 117h0"></path>
<path d="M370 117h0"></path>
<rect x="262" y="106" width="108" height="22"></rect>
<text x="316" y="121">frame index</text>
</g>
<path d="M370 117h10"></path>
<path d="M380 117h10"></path>
<g class="terminal ">
<path d="M390 117h0"></path>
<path d="M442 117h0"></path>
<rect x="390" y="106" width="52" height="22" rx="10" ry="10"></rect>
<text x="416" y="121">0xA4</text>
</g>
</g>
<path d="M442 117h10"></path>
<path d="M262 117a10 10 0 0 0 -10 10v3a10 10 0 0 0 10 10"></path>
<g>
<path d="M262 140h180"></path>
</g>
<path d="M442 140a10 10 0 0 0 10 -10v-3a10 10 0 0 0 -10 -10"></path>
</g>
<path d="M452 117a10 10 0 0 0 10 -10v-3a10 10 0 0 1 10 -10"></path>
</g>
<g class="comment ">
<path d="M232 74h0"></path>
<path d="M319 74h0"></path>
<text x="275.5" y="79" class="comment">save frames</text>
</g>
</g>
<path d="M644 94a10 10 0 0 1 10 10v50a10 10 0 0 1 -10 10h-584a10 10 0 0 0 -10 10v20a10 10 0 0 0 10 10"></path>
<g>
<path d="M60 204h84"></path>
<path d="M560 204h84"></path>
<rect x="144" y="192" width="416" height="92" rx="10" ry="10" class="group-box"></rect>
<g>
<path d="M144 204h0"></path>
<path d="M560 204h0"></path>
<path d="M144 204h20"></path>
<g>
<path d="M164 204h376"></path>
</g>
<path d="M540 204h20"></path>
<path d="M144 204a10 10 0 0 1 10 10v3a10 10 0 0 0 10 10"></path>
<g>
<path d="M164 227h0"></path>
<path d="M540 227h0"></path>
<path d="M164 227h10"></path>
<g>
<path d="M174 227h0"></path>
<path d="M530 227h0"></path>
<g class="terminal ">
<path d="M174 227h0"></path>
<path d="M210 227h0"></path>
<rect x="174" y="216" width="36" height="22" rx="10" ry="10"></rect>
<text x="192" y="231">M&#42;</text>
</g>
<path d="M210 227h10"></path>
<path d="M220 227h10"></path>
<g class="non-terminal ">
<path d="M230 227h0"></path>
<path d="M258 227h0"></path>
<rect x="230" y="216" width="28" height="22"></rect>
<text x="244" y="231">x</text>
</g>
<path d="M258 227h10"></path>
<path d="M268 227h10"></path>
<g class="terminal ">
<path d="M278 227h0"></path>
<path d="M306 227h0"></path>
<rect x="278" y="216" width="28" height="22" rx="10" ry="10"></rect>
<text x="292" y="231">&#42;</text>
</g>
<path d="M306 227h10"></path>
<path d="M316 227h10"></path>
<g class="non-terminal ">
<path d="M326 227h0"></path>
<path d="M354 227h0"></path>
<rect x="326" y="216" width="28" height="22"></rect>
<text x="340" y="231">y</text>
</g>
<path d="M354 227h10"></path>
<path d="M364 227h10"></path>
<g class="terminal ">
<path d="M374 227h0"></path>
<path d="M402 227h0"></path>
<rect x="374" y="216" width="28" height="22" rx="10" ry="10"></rect>
<text x="388" y="231">&#42;</text>
</g>
<path d="M402 227h10"></path>
<path d="M412 227h10"></path>
<g class="non-terminal ">
<path d="M422 227h0"></path>
<path d="M530 227h0"></path>
<rect x="422" y="216" width="108" height="22"></rect>
<text x="476" y="231">time offset</text>
</g>
</g>
<path d="M530 227h10"></path>
<path d="M174 227a10 10 0 0 0 -10 10v14a10 10 0 0 0 10 10"></path>
<g class="terminal ">
<path d="M174 261h164"></path>
<path d="M366 261h164"></path>
<rect x="338" y="250" width="28" height="22" rx="10" ry="10"></rect>
<text x="352" y="265">-</text>
</g>
<path d="M530 261a10 10 0 0 0 10 -10v-14a10 10 0 0 0 -10 -10"></path>
</g>
<path d="M540 227a10 10 0 0 0 10 -10v-3a10 10 0 0 1 10 -10"></path>
</g>
<g class="comment ">
<path d="M144 184h0"></path>
<path d="M203 184h0"></path>
<text x="173.5" y="189" class="comment">bugs DB</text>
</g>
</g>
<path d="M644 204a10 10 0 0 1 10 10v72a10 10 0 0 1 -10 10h-584a10 10 0 0 0 -10 10v31a10 10 0 0 0 10 10"></path>
<g>
<path d="M60 347h71"></path>
<path d="M573 347h71"></path>
<rect x="131" y="324" width="442" height="183" rx="10" ry="10" class="group-box"></rect>
<g>
<path d="M131 347h10"></path>
<path d="M563 347h10"></path>
<path d="M141 347h10"></path>
<g>
<path d="M151 347h0"></path>
<path d="M553 347h0"></path>
<g>
<path d="M151 347h0"></path>
<path d="M361 347h0"></path>
<path d="M151 347h20"></path>
<g>
<path d="M171 347h170"></path>
</g>
<path d="M341 347h20"></path>
<path d="M151 347a10 10 0 0 1 10 10v37a10 10 0 0 0 10 10"></path>
<g>
<path d="M171 404h0"></path>
<path d="M341 404h0"></path>
<g>
<path d="M171 404h0"></path>
<path d="M269 404h0"></path>
<path d="M201 404v-24a10 10 0 0 1 10 -10"></path>
<g class="terminal ">
<path d="M211 370h0"></path>
<path d="M239 370h0"></path>
<rect x="211" y="359" width="28" height="22" rx="10" ry="10"></rect>
<text x="225" y="374">D</text>
</g>
<path d="M239 370a10 10 0 0 1 10 10v14"></path>
<path d="M201 404h10"></path>
<g class="terminal ">
<path d="M211 404h0"></path>
<path d="M239 404h0"></path>
<rect x="211" y="393" width="28" height="22" rx="10" ry="10"></rect>
<text x="225" y="408">L</text>
</g>
<path d="M239 404h10"></path>
<path d="M201 404v24a10 10 0 0 0 10 10"></path>
<g class="terminal ">
<path d="M211 438h0"></path>
<path d="M239 438h0"></path>
<rect x="211" y="427" width="28" height="22" rx="10" ry="10"></rect>
<text x="225" y="442">R</text>
</g>
<path d="M239 438a10 10 0 0 0 10 -10v-24"></path>
<path d="M201 404v58a10 10 0 0 0 10 10"></path>
<g class="terminal ">
<path d="M211 472h0"></path>
<path d="M239 472h0"></path>
<rect x="211" y="461" width="28" height="22" rx="10" ry="10"></rect>
<text x="225" y="476">U</text>
</g>
<path d="M239 472a10 10 0 0 0 10 -10v-58"></path>
<g class="diagram-text">
<title>take one or more branches, once each, in any order</title>
<path d="M 201 394 h -26 a 4 4 0 0 0 -4 4 v 12 a 4 4 0 0 0 4 4 h 26 z" class="diagram-text"></path>
<text x="186" y="408" class="diagram-text">1+</text>
<path d="M 249 394 h 16 a 4 4 0 0 1 4 4 v 12 a 4 4 0 0 1 -4 4 h -16 z" class="diagram-text"></path>
<path d="M 256 402 a 4 4 0 1 0 6 -1 m 2.75 -1 h -4 v 4 m 0 -3 h 2" style="stroke-width: 1.75"></path>
</g>
</g>
<path d="M269 404h10"></path>
<path d="M279 404h10"></path>
<g class="comment ">
<path d="M289 404h0"></path>
<path d="M341 404h0"></path>
<text x="315" y="409" class="comment">arrows</text>
</g>
</g>
<path d="M341 404a10 10 0 0 0 10 -10v-37a10 10 0 0 1 10 -10"></path>
</g>
<g>
<path d="M361 347h0"></path>
<path d="M515 347h0"></path>
<path d="M361 347h20"></path>
<g>
<path d="M381 347h114"></path>
</g>
<path d="M495 347h20"></path>
<path d="M361 347a10 10 0 0 1 10 10v3a10 10 0 0 0 10 10"></path>
<g>
<path d="M381 370h0"></path>
<path d="M495 370h0"></path>
<g class="terminal ">
<path d="M381 370h0"></path>
<path d="M409 370h0"></path>
<rect x="381" y="359" width="28" height="22" rx="10" ry="10"></rect>
<text x="395" y="374">1</text>
</g>
<path d="M409 370h10"></path>
<path d="M419 370h10"></path>
<g class="comment ">
<path d="M429 370h0"></path>
<path d="M495 370h0"></path>
<text x="462" y="375" class="comment">spacebar</text>
</g>
</g>
<path d="M495 370a10 10 0 0 0 10 -10v-3a10 10 0 0 1 10 -10"></path>
</g>
<path d="M515 347h10"></path>
<g class="terminal ">
<path d="M525 347h0"></path>
<path d="M553 347h0"></path>
<rect x="525" y="336" width="28" height="22" rx="10" ry="10"></rect>
<text x="539" y="351">-</text>
</g>
</g>
<path d="M553 347h10"></path>
<path d="M151 347a10 10 0 0 0 -10 10v128a10 10 0 0 0 10 10"></path>
<g>
<path d="M151 495h402"></path>
</g>
<path d="M553 495a10 10 0 0 0 10 -10v-128a10 10 0 0 0 -10 -10"></path>
</g>
<g class="comment ">
<path d="M131 316h0"></path>
<path d="M204 316h0"></path>
<text x="167.5" y="321" class="comment">movements</text>
</g>
</g>
<path d="M644 347h10"></path>
<path d="M654 347h0"></path>
</g>
<path d="M654 347h10"></path>
<path d="M 664 347 h 20 m -10 -10 v 20 m 10 -20 v 20"></path>
</g>
<style>
svg {
background-color: hsl(30,20%,95%);
}
path {
stroke-width: 3;
stroke: black;
fill: rgba(0,0,0,0);
}
text {
font: bold 14px monospace;
text-anchor: middle;
white-space: pre;
}
text.diagram-text {
font-size: 12px;
}
text.diagram-arrow {
font-size: 16px;
}
text.label {
text-anchor: start;
}
text.comment {
font: italic 12px monospace;
}
g.non-terminal text {
/&#42;font-style: italic;&#42;/
}
rect {
stroke-width: 3;
stroke: black;
fill: hsl(120,100%,90%);
}
rect.group-box {
stroke: gray;
stroke-dasharray: 10 5;
fill: none;
}
path.diagram-text {
stroke-width: 3;
stroke: black;
fill: white;
cursor: help;
}
g.diagram-text:hover path.diagram-text {
fill: #eee;
}</style>
</svg>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment