Please create an account or Login! Have fun!

DAT: Difference between revisions

Jump to navigation Jump to search
1,132 bytes removed ,  23 January 2022
→‎5: Cloner linkage: never mind i'm dumb
(→‎Tile encoding: Fixed typo of the thief type)
(→‎5: Cloner linkage: never mind i'm dumb)
(8 intermediate revisions by 4 users not shown)
Line 7: Line 7:
The format is a relatively simple binary structure.  All fields are little-endian.
The format is a relatively simple binary structure.  All fields are little-endian.


=== File header ====
=== File header ===


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 92: Line 92:


{| class="wikitable" border="1"
{| class="wikitable" border="1"
!Byte
!
!Tile
!<code>$0_</code>
!Byte
!<code>$1_</code>
!Tile
!<code>$2_</code>
!Byte
!<code>$3_</code>
!Tile
!<code>$4_</code>
!Byte
!<code>$5_</code>
!Tile
!<code>$6_</code>
!Byte
!Tile
!Byte
!Tile
!Byte
!Tile
|-
|-
|<code>$00</code>
!<code>$_0</code>
|[[Image:Floor.png]] [[Floor]]
|[[Image:Floor.png]] [[Floor]]
|<code>$10</code>
|[[Image:Clone block S.png]] [[Clone block]] (S) <ref name="clone-block">Must be used when creating a block cloner, to indicate the direction of cloning.  A clone block placed on its own won't be pushable.</ref>
|[[Image:Clone block S.png]] [[Clone block]] (S)
|''unused'' <ref>Used internally as the [[overlay buffer|Combination]] tile.</ref>
|<code>$20</code>
|''unused''<br><small>(used internally as [[overlay buffer|Combination]])</small>
|<code>$30</code>
|[[Image:Thin wall SE.png]] [[Thin wall]] (SE)
|[[Image:Thin wall SE.png]] [[Thin wall]] (SE)
|<code>$40</code>
|[[Image:Bug N.png]] [[Bug]] (N)
|[[Image:Bug N.png]] [[Bug]] (N)
|<code>$50</code>
|[[Image:Glider N.png]] [[Glider]] (N)
|[[Image:Glider N.png]] [[Glider]] (N)
|<code>$60</code>
|[[Image:Paramecium NS.png]] [[Paramecium]] (N)
|[[Image:Paramecium NS.png]] [[Paramecium]] (N)
|-
|-
|<code>$01</code>
!<code>$_1</code>
|[[Image:Wall.png]] [[Wall]]
|[[Image:Wall.png]] [[Wall]]
|<code>$11</code>
|[[Image:Clone block E.png]] [[Clone block]] (E) <ref name="clone-block"/>
|[[Image:Clone block E.png]] [[Clone block]] (E)
|<code>$21</code>
|[[Image:Thief.png]] [[Thief]]
|[[Image:Thief.png]] [[Thief]]
|<code>$31</code>
|[[Image:Clone machine.png]] [[Cloner]]
|[[Image:Clone machine.png]] [[Cloner]]
|<code>$41</code>
|[[Image:Bug W.png]] [[Bug]] (W)
|[[Image:Bug W.png]] [[Bug]] (W)
|<code>$51</code>
|[[Image:Glider W.png]] [[Glider]] (W)
|[[Image:Glider W.png]] [[Glider]] (W)
|<code>$61</code>
|[[Image:Paramecium WE.png]] [[Paramecium]] (W)
|[[Image:Paramecium WE.png]] [[Paramecium]] (W)
|-
|-
|<code>$02</code>
!<code>$_2</code>
|[[Image:Computer chip.png]] [[Computer chip]]
|[[Image:Computer chip.png]] [[Computer chip]]
|<code>$12</code>
|[[Image:Force floor N.png]] [[Force floor]] (N)
|[[Image:Force floor N.png]] [[Force floor]] (N)
|<code>$22</code>
|[[Image:Socket.png]] [[Chip socket]]
|[[Image:Socket.png]] [[Chip socket]]
|<code>$32</code>
|[[Image:Force floor Random.png]] [[Random force floor]]
|[[Image:Force floor Random.png]] [[Random force floor]]
|<code>$42</code>
|[[Image:Bug S.png]] [[Bug]] (S)
|[[Image:Bug S.png]] [[Bug]] (S)
|<code>$52</code>
|[[Image:Glider S.png]] [[Glider]] (S)
|[[Image:Glider S.png]] [[Glider]] (S)
|<code>$62</code>
|[[Image:Paramecium NS.png]] [[Paramecium]] (S)
|[[Image:Paramecium NS.png]] [[Paramecium]] (S)
|-
|-
|<code>$03</code>
!<code>$_3</code>
|[[Image:Water.png]] [[Water]]
|[[Image:Water.png]] [[Water]]
|<code>$13</code>
|[[Image:Force floor E.png]] [[Force floor]] (E)
|[[Image:Force floor E.png]] [[Force floor]] (E)
|<code>$23</code>
|[[Image:Green button.png]] [[Green button]]
|[[Image:Green button.png]] [[Green button]]
|<code>$33</code>
|[[Image:Drowned Chip.png]] [[Drowned Chip]] <ref name="invalid">This tile is an [[invalid tile|implementation detail]], not an intended game element.</ref>
|[[Image:Drowned Chip.png]] <s>[[Drowned Chip]]</s>
|<code>$43</code>
|[[Image:Bug E.png]] [[Bug]] (E)
|[[Image:Bug E.png]] [[Bug]] (E)
|<code>$53</code>
|[[Image:Glider E.png]] [[Glider]] (E)
|[[Image:Glider E.png]] [[Glider]] (E)
|<code>$63</code>
|[[Image:Paramecium WE.png]] [[Paramecium]] (E)
|[[Image:Paramecium WE.png]] [[Paramecium]] (E)
|-
|-
|<code>$04</code>
!<code>$_4</code>
|[[Image:Fire.png]] [[Fire]]
|[[Image:Fire.png]] [[Fire]]
|<code>$14</code>
|[[Image:Force floor W.png]] [[Force floor]] (W)
|[[Image:Force floor W.png]] [[Force floor]] (W)
|<code>$24</code>
|[[Image:Red button.png]] [[Red button]]
|[[Image:Red button.png]] [[Red button]]
|<code>$34</code>
|[[Image:Chip in Fire.png]] [[Burned Chip]] <ref name="invalid"/>
|[[Image:Chip in Fire.png]] <s>[[Burned Chip]]</s>
|<code>$44</code>
|[[Image:Fireball.png]] [[Fireball]] (N)
|[[Image:Fireball.png]] [[Fireball]] (N)
|<code>$54</code>
|[[Image:Teeth N.png]] [[Teeth]] (N)
|[[Image:Teeth N.png]] [[Teeth]] (N)
|<code>$64</code>
|[[Image:Blue key.png]] [[Blue key]]
|[[Image:Blue key.png]] [[Blue key]]
|-
|-
|<code>$05</code>
!<code>$_5</code>
|[[Image:Invisible wall.png]] [[Invisible wall]]
|[[Image:Invisible wall.png]] [[Invisible wall]]
|<code>$15</code>
|[[Image:Exit.png]] [[Exit]]
|[[Image:Exit.png]] [[Exit]]
|<code>$25</code>
|[[Image:Toggle wall Closed.png]] [[Toggle wall]]
|[[Image:Toggle wall Closed.png]] [[Toggle wall]]
|<code>$35</code>
|[[Image:Burned Chip.png]] [[Burned Chip]] <ref name="invalid"/>
|[[Image:Burned Chip.png]] <s>[[Burned Chip]]</s>
|<code>$45</code>
|[[Image:Fireball.png]] [[Fireball]] (W)
|[[Image:Fireball.png]] [[Fireball]] (W)
|<code>$55</code>
|[[Image:Teeth W.png]] [[Teeth]] (W)
|[[Image:Teeth W.png]] [[Teeth]] (W)
|<code>$65</code>
|[[Image:Red key.png]] [[Red key]]
|[[Image:Red key.png]] [[Red key]]
|-
|-
|<code>$06</code>
!<code>$_6</code>
|[[Image:Thin wall N.png]] [[Thin wall]] (N)
|[[Image:Thin wall N.png]] [[Thin wall]] (N)
|<code>$16</code>
|[[Image:Blue lock.png]] [[Blue lock]]
|[[Image:Blue lock.png]] [[Blue lock]]
|<code>$26</code>
|[[Image:Toggle wall Open.png]] [[Toggle wall|Toggle floor]]
|[[Image:Toggle wall Open.png]] [[Toggle wall|Toggle floor]]
|<code>$36</code>
|''unused'' <ref name="unused">This byte does not correspond to any defined tile, but acts like an invisible wall.</ref>
|''unused''<br><small>(acts as invisible wall)</small>
|<code>$46</code>
|[[Image:Fireball.png]] [[Fireball]] (S)
|[[Image:Fireball.png]] [[Fireball]] (S)
|<code>$56</code>
|[[Image:Teeth S.png]] [[Teeth]] (S)
|[[Image:Teeth S.png]] [[Teeth]] (S)
|<code>$66</code>
|[[Image:Green key.png]] [[Green key]]
|[[Image:Green key.png]] [[Green key]]
|-
|-
|<code>$07</code>
!<code>$_7</code>
|[[Image:Thin wall W.png]] [[Thin wall]] (W)
|[[Image:Thin wall W.png]] [[Thin wall]] (W)
|<code>$17</code>
|[[Image:Red lock.png]] [[Red lock]]
|[[Image:Red lock.png]] [[Red lock]]
|<code>$27</code>
|[[Image:Brown button.png]] [[Brown button]]
|[[Image:Brown button.png]] [[Brown button]]
|<code>$37</code>
|''unused'' <ref name="unused"/>
|''unused''<br><small>(acts as invisible wall)</small>
|<code>$47</code>
|[[Image:Fireball.png]] [[Fireball]] (E)
|[[Image:Fireball.png]] [[Fireball]] (E)
|<code>$57</code>
|[[Image:Teeth E.png]] [[Teeth]] (E)
|[[Image:Teeth E.png]] [[Teeth]] (E)
|<code>$67</code>
|[[Image:Yellow key.png]] [[Yellow key]]
|[[Image:Yellow key.png]] [[Yellow key]]
|-
|-
|<code>$08</code>
!<code>$_8</code>
|[[Image:Thin wall S.png]] [[Thin wall]] (S)
|[[Image:Thin wall S.png]] [[Thin wall]] (S)
|<code>$18</code>
|[[Image:Green lock.png]] [[Green lock]]
|[[Image:Green lock.png]] [[Green lock]]
|<code>$28</code>
|[[Image:Blue button.png]] [[Blue button]]
|[[Image:Blue button.png]] [[Blue button]]
|<code>$38</code>
|''unused'' <ref name="unused"/> <ref>In the pgchip hack, this byte is used to indicate an [[ice block]].</ref>
|''unused''<br><small>(acts as invisible wall)</small><br><small>([[Ice block]] in [[pgchip]])</small>
|<code>$48</code>
|[[Image:Pink ball.png]] [[Ball]] (N)
|[[Image:Pink ball.png]] [[Ball]] (N)
|<code>$58</code>
|[[Image:Walker NS.png]] [[Walker]] (N)
|[[Image:Walker NS.png]] [[Walker]] (N)
|<code>$68</code>
|[[Image:Flippers.png]] [[Flippers]]
|[[Image:Flippers.png]] [[Flippers]]
|-
|-
|<code>$09</code>
!<code>$_9</code>
|[[Image:Thin wall E.png]] [[Thin wall]] (E)
|[[Image:Thin wall E.png]] [[Thin wall]] (E)
|<code>$19</code>
|[[Image:Yellow lock.png]] [[Yellow lock]]
|[[Image:Yellow lock.png]] [[Yellow lock]]
|<code>$29</code>
|[[Image:Teleport.png]] [[Teleporter]]
|[[Image:Teleport.png]] [[Teleporter]]
|<code>$39</code>
|[[Image:Chip in Exit.png]] [[Fake exit]] <ref name="invalid"/>
|[[Image:Chip in Exit.png]] <s>[[Fake exit]]</s>
|<code>$49</code>
|[[Image:Pink ball.png]] [[Ball]] (W)
|[[Image:Pink ball.png]] [[Ball]] (W)
|<code>$59</code>
|[[Image:Walker WE.png]] [[Walker]] (W)
|[[Image:Walker WE.png]] [[Walker]] (W)
|<code>$69</code>
|[[Image:Fire boots.png]] [[Fire boots]]
|[[Image:Fire boots.png]] [[Fire boots]]
|-
|-
|<code>$0a</code>
!<code>$_a</code>
|[[Image:Block.png]] [[Dirt block]]
|[[Image:Block.png]] [[Dirt block]]
|<code>$1a</code>
|[[Image:Ice NW.png]] [[Ice corner]] (NW)
|[[Image:Ice NW.png]] [[Ice corner]] (NW)
|<code>$2a</code>
|[[Image:Bomb.png]] [[Bomb]]
|[[Image:Bomb.png]] [[Bomb]]
|<code>$3a</code>
|[[Image:Exit2.png]] [[Fake exit]] <ref name="invalid"/>
|[[Image:Exit2.png]] <s>[[Fake exit]]</s>
|<code>$4a</code>
|[[Image:Pink ball.png]] [[Ball]] (S)
|[[Image:Pink ball.png]] [[Ball]] (S)
|<code>$5a</code>
|[[Image:Walker NS.png]] [[Walker]] (S)
|[[Image:Walker NS.png]] [[Walker]] (S)
|<code>$6a</code>
|[[Image:Ice skates.png]] [[Ice skates]]
|[[Image:Ice skates.png]] [[Ice skates]]
|-
|-
|<code>$0b</code>
!<code>$_b</code>
|[[Image:Dirt.png]] [[Dirt]]
|[[Image:Dirt.png]] [[Dirt]]
|<code>$1b</code>
|[[Image:Ice NE.png]] [[Ice corner]] (NE)
|[[Image:Ice NE.png]] [[Ice corner]] (NE)
|<code>$2b</code>
|[[Image:Trap.png]] [[Trap]]
|[[Image:Trap.png]] [[Trap]]
|<code>$3b</code>
|[[Image:Exit3.png]] [[Fake exit]] <ref name="invalid"/>
|[[Image:Exit3.png]] <s>[[Fake exit]]</s>
|<code>$4b</code>
|[[Image:Pink ball.png]] [[Ball]] (E)
|[[Image:Pink ball.png]] [[Ball]] (E)
|<code>$5b</code>
|[[Image:Walker WE.png]] [[Walker]] (E)
|[[Image:Walker WE.png]] [[Walker]] (E)
|<code>$6b</code>
|[[Image:Suction boots.png]] [[Suction boots]]
|[[Image:Suction boots.png]] [[Suction boots]]
|-
|-
|<code>$0c</code>
!<code>$_c</code>
|[[Image:Ice.png]] [[Ice]]
|[[Image:Ice.png]] [[Ice]]
|<code>$1c</code>
|[[Image:Ice SE.png]] [[Ice corner]] (SE)
|[[Image:Ice SE.png]] [[Ice corner]] (SE)
|<code>$2c</code>
|[[Image:Hidden wall.png]] [[Hidden wall]]
|[[Image:Hidden wall.png]] [[Hidden wall]]
|<code>$3c</code>
|[[Image:Swimming Chip N.png]] [[Swimming Chip]] (N) <ref name="invalid"/>
|[[Image:Swimming Chip N.png]] <s>[[Swimming Chip]] (N)</s>
|<code>$4c</code>
|[[Image:Tank N.png]] [[Tank]] (N)
|[[Image:Tank N.png]] [[Tank]] (N)
|<code>$5c</code>
|[[Image:Blob.png]] [[Blob]] (N)
|[[Image:Blob.png]] [[Blob]] (N)
|<code>$6c</code>
|[[Image:Chip N.png]] [[Chip]] (N)
|[[Image:Chip N.png]] [[Chip]] (N)
|-
|-
|<code>$0d</code>
!<code>$_d</code>
|[[Image:Force floor S.png]] [[Force floor]] (S)
|[[Image:Force floor S.png]] [[Force floor]] (S)
|<code>$1d</code>
|[[Image:Ice SW.png]] [[Ice corner]] (SW)
|[[Image:Ice SW.png]] [[Ice corner]] (SW)
|<code>$2d</code>
|[[Image:Gravel.png]] [[Gravel]]
|[[Image:Gravel.png]] [[Gravel]]
|<code>$3d</code>
|[[Image:Swimming Chip W.png]] [[Swimming Chip]] (W) <ref name="invalid"/>
|[[Image:Swimming Chip W.png]] <s>[[Swimming Chip]] (W)</s>
|<code>$4d</code>
|[[Image:Tank W.png]] [[Tank]] (W)
|[[Image:Tank W.png]] [[Tank]] (W)
|<code>$5d</code>
|[[Image:Blob.png]] [[Blob]] (W)
|[[Image:Blob.png]] [[Blob]] (W)
|<code>$6d</code>
|[[Image:Chip W.png]] [[Chip]] (W)
|[[Image:Chip W.png]] [[Chip]] (W)
|-
|-
|<code>$0e</code>
!<code>$_e</code>
|[[Image:Clone block N.png]] [[Clone block]] (N)
|[[Image:Clone block N.png]] [[Clone block]] (N) <ref name="clone-block"/>
|<code>$1e</code>
|[[Image:Blue wall.png]] Fake [[blue wall]]
|[[Image:Blue wall.png]] Fake [[blue wall]]
|<code>$2e</code>
|[[Image:Recessed wall.png]] [[Recessed wall]]
|[[Image:Recessed wall.png]] [[Recessed wall]]
|<code>$3e</code>
|[[Image:Swimming Chip S.png]] [[Swimming Chip]] (S) <ref name="invalid"/>
|[[Image:Swimming Chip S.png]] <s>[[Swimming Chip]] (S)</s>
|<code>$4e</code>
|[[Image:Tank S.png]] [[Tank]] (S)
|[[Image:Tank S.png]] [[Tank]] (S)
|<code>$5e</code>
|[[Image:Blob.png]] [[Blob]] (S)
|[[Image:Blob.png]] [[Blob]] (S)
|<code>$6e</code>
|[[Image:Chip S.png]] [[Chip]] (S)
|[[Image:Chip S.png]] [[Chip]] (S)
|-
|-
|<code>$0f</code>
!<code>$_f</code>
|[[Image:Clone block W.png]] [[Clone block]] (W)
|[[Image:Clone block W.png]] [[Clone block]] (W) <ref name="clone-block"/>
|<code>$1f</code>
|[[Image:Blue wall.png]] Real [[blue wall]]
|[[Image:Blue wall.png]] Real [[blue wall]]
|<code>$2f</code>
|[[Image:Hint.png]] [[Hint]]
|[[Image:Hint.png]] [[Hint]]
|<code>$3f</code>
|[[Image:Swimming Chip E.png]] [[Swimming Chip]] (E) <ref name="invalid"/>
|[[Image:Swimming Chip E.png]] <s>[[Swimming Chip]] (E)</s>
|<code>$4f</code>
|[[Image:Tank E.png]] [[Tank]] (E)
|[[Image:Tank E.png]] [[Tank]] (E)
|<code>$5f</code>
|[[Image:Blob.png]] [[Blob]] (E)
|[[Image:Blob.png]] [[Blob]] (E)
|<code>$6f</code>
|[[Image:Chip E.png]] [[Chip]] (E)
|[[Image:Chip E.png]] [[Chip]] (E)
|}
|}
<references />


=== Level metadata chunks ===
=== Level metadata chunks ===
Line 512: Line 412:
==== 10: Monster list ====
==== 10: Monster list ====


Contains zero or more of the following structure.  As this structure is 2 bytes in size, the chunk size should be a multiple of 2, and there cannot be more than 128 moving monsters in a level.
Contains zero or more of the following structure.  As this structure is 2 bytes in size, the chunk size should be a multiple of 2, and there cannot be more than 127 moving monsters in a level.


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 520: Line 420:
|-
|-
|$00
|$00
|2
|1
|x-coordinate of monster
|x-coordinate of monster
|-
|-
|$02
|$02
|2
|1
|y-coordinate of monster
|y-coordinate of monster
|}
|}
Line 535: Line 435:


* [[C2M]], the more flexible format used in [[Chip's Challenge 2]]
* [[C2M]], the more flexible format used in [[Chip's Challenge 2]]
== External Links ==
* [http://www.seasip.info/ccfile.html Explanation of the CHIPS.DAT format]
* Implementation in [[Tile World]]: [https://github.com/zrax/tworld/blob/master/series.c <code>series.c</code>] (whole file) and [https://github.com/zrax/tworld/blob/master/encoding.c <code>encoding.c</code>] (individual level)
* Implementation in [[Tile World]]: [https://github.com/zrax/tworld/blob/master/series.c <code>series.c</code>] (whole file) and [https://github.com/zrax/tworld/blob/master/encoding.c <code>encoding.c</code>] (individual level)
* Implementation in [[Lexy's Labyrinth]]: [https://github.com/eevee/lexys-labyrinth/blob/master/js/format-dat.js <code>js/format-dat.js</code>]
* Implementation in [[Lexy's Labyrinth]]: [https://github.com/eevee/lexys-labyrinth/blob/master/js/format-dat.js <code>js/format-dat.js</code>]
== External Links ==
[http://www.seasip.info/ccfile.html Explanation of the CHIPS.DAT format]


[[Category:Terminology]]
[[Category:Terminology]]
[[Category:File formats]]
[[Category:File formats]]
Anonymous user

Navigation menu