trusted-editors
545
edits
Please create an account or Login! Have fun!
m (fix formatting of external links) |
(Added field 9 author info) |
||
(10 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" | ||
! | ! | ||
! | !<code>$0_</code> | ||
! | !<code>$1_</code> | ||
! | !<code>$2_</code> | ||
! | !<code>$3_</code> | ||
! | !<code>$4_</code> | ||
! | !<code>$5_</code> | ||
! | !<code>$6_</code> | ||
|- | |- | ||
!<code>$_0</code> | |||
|[[Image:Floor.png]] [[Floor]] | |[[Image:Floor.png]] [[Floor]] | ||
|[[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> | ||
|''unused''< | |||
|[[Image:Thin wall SE.png]] [[Thin wall]] (SE) | |[[Image:Thin wall SE.png]] [[Thin wall]] (SE) | ||
|[[Image:Bug N.png]] [[Bug]] (N) | |[[Image:Bug N.png]] [[Bug]] (N) | ||
|[[Image:Glider N.png]] [[Glider]] (N) | |[[Image:Glider N.png]] [[Glider]] (N) | ||
|[[Image:Paramecium NS.png]] [[Paramecium]] (N) | |[[Image:Paramecium NS.png]] [[Paramecium]] (N) | ||
|- | |- | ||
!<code>$_1</code> | |||
|[[Image:Wall.png]] [[Wall]] | |[[Image:Wall.png]] [[Wall]] | ||
|[[Image:Clone block E.png]] [[Clone block]] (E) <ref name="clone-block"/> | |||
|[[Image:Clone block E.png]] [[Clone block]] (E) | |[[Image:Thief.png]] [[Thief]] | ||
|[[Image:Thief.png]] [[ | |||
|[[Image:Clone machine.png]] [[Cloner]] | |[[Image:Clone machine.png]] [[Cloner]] | ||
|[[Image:Bug W.png]] [[Bug]] (W) | |[[Image:Bug W.png]] [[Bug]] (W) | ||
|[[Image:Glider W.png]] [[Glider]] (W) | |[[Image:Glider W.png]] [[Glider]] (W) | ||
|[[Image:Paramecium WE.png]] [[Paramecium]] (W) | |[[Image:Paramecium WE.png]] [[Paramecium]] (W) | ||
|- | |- | ||
!<code>$_2</code> | |||
|[[Image:Computer chip.png]] [[Computer chip]] | |[[Image:Computer chip.png]] [[Computer chip]] | ||
|[[Image:Force floor N.png]] [[Force floor]] (N) | |[[Image:Force floor N.png]] [[Force floor]] (N) | ||
|[[Image:Socket.png]] [[Chip socket]] | |[[Image:Socket.png]] [[Chip socket]] | ||
|[[Image:Force floor Random.png]] [[Random force floor]] | |[[Image:Force floor Random.png]] [[Random force floor]] | ||
|[[Image:Bug S.png]] [[Bug]] (S) | |[[Image:Bug S.png]] [[Bug]] (S) | ||
|[[Image:Glider S.png]] [[Glider]] (S) | |[[Image:Glider S.png]] [[Glider]] (S) | ||
|[[Image:Paramecium NS.png]] [[Paramecium]] (S) | |[[Image:Paramecium NS.png]] [[Paramecium]] (S) | ||
|- | |- | ||
!<code>$_3</code> | |||
|[[Image:Water.png]] [[Water]] | |[[Image:Water.png]] [[Water]] | ||
|[[Image:Force floor E.png]] [[Force floor]] (E) | |[[Image:Force floor E.png]] [[Force floor]] (E) | ||
|[[Image:Green button.png]] [[Green button]] | |[[Image:Green button.png]] [[Green button]] | ||
|[[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]] | |||
| | |||
|[[Image:Bug E.png]] [[Bug]] (E) | |[[Image:Bug E.png]] [[Bug]] (E) | ||
|[[Image:Glider E.png]] [[Glider]] (E) | |[[Image:Glider E.png]] [[Glider]] (E) | ||
|[[Image:Paramecium WE.png]] [[Paramecium]] (E) | |[[Image:Paramecium WE.png]] [[Paramecium]] (E) | ||
|- | |- | ||
!<code>$_4</code> | |||
|[[Image:Fire.png]] [[Fire]] | |[[Image:Fire.png]] [[Fire]] | ||
|[[Image:Force floor W.png]] [[Force floor]] (W) | |[[Image:Force floor W.png]] [[Force floor]] (W) | ||
|[[Image:Red button.png]] [[Red button]] | |[[Image:Red button.png]] [[Red button]] | ||
|[[Image:Chip in Fire.png]] [[Burned Chip]] <ref name="invalid"/> | |||
|[[Image:Chip in Fire.png]] | |||
|[[Image:Fireball.png]] [[Fireball]] (N) | |[[Image:Fireball.png]] [[Fireball]] (N) | ||
|[[Image:Teeth N.png]] [[Teeth]] (N) | |[[Image:Teeth N.png]] [[Teeth]] (N) | ||
|[[Image:Blue key.png]] [[Blue key]] | |[[Image:Blue key.png]] [[Blue key]] | ||
|- | |- | ||
!<code>$_5</code> | |||
|[[Image:Invisible wall.png]] [[Invisible wall]] | |[[Image:Invisible wall.png]] [[Invisible wall]] | ||
|[[Image:Exit.png]] [[Exit]] | |[[Image:Exit.png]] [[Exit]] | ||
|[[Image:Toggle wall Closed.png]] [[Toggle wall]] | |[[Image:Toggle wall Closed.png]] [[Toggle wall]] | ||
|[[Image:Burned Chip.png]] [[Burned Chip]] <ref name="invalid"/> | |||
|[[Image:Burned Chip.png]] | |||
|[[Image:Fireball.png]] [[Fireball]] (W) | |[[Image:Fireball.png]] [[Fireball]] (W) | ||
|[[Image:Teeth W.png]] [[Teeth]] (W) | |[[Image:Teeth W.png]] [[Teeth]] (W) | ||
|[[Image:Red key.png]] [[Red key]] | |[[Image:Red key.png]] [[Red key]] | ||
|- | |- | ||
!<code>$_6</code> | |||
|[[Image:Thin wall N.png]] [[Thin wall]] (N) | |[[Image:Thin wall N.png]] [[Thin wall]] (N) | ||
|[[Image:Blue lock.png]] [[Blue lock]] | |[[Image:Blue lock.png]] [[Blue lock]] | ||
|[[Image:Toggle wall Open.png]] [[Toggle wall|Toggle floor]] | |[[Image:Toggle wall Open.png]] [[Toggle wall|Toggle floor]] | ||
|''unused'' <ref name="unused">This byte does not correspond to any defined tile, but acts like an invisible wall.</ref> | |||
|''unused''< | |||
|[[Image:Fireball.png]] [[Fireball]] (S) | |[[Image:Fireball.png]] [[Fireball]] (S) | ||
|[[Image:Teeth S.png]] [[Teeth]] (S) | |[[Image:Teeth S.png]] [[Teeth]] (S) | ||
|[[Image:Green key.png]] [[Green key]] | |[[Image:Green key.png]] [[Green key]] | ||
|- | |- | ||
!<code>$_7</code> | |||
|[[Image:Thin wall W.png]] [[Thin wall]] (W) | |[[Image:Thin wall W.png]] [[Thin wall]] (W) | ||
|[[Image:Red lock.png]] [[Red lock]] | |[[Image:Red lock.png]] [[Red lock]] | ||
|[[Image:Brown button.png]] [[Brown button]] | |[[Image:Brown button.png]] [[Brown button]] | ||
|''unused'' <ref name="unused"/> | |||
|''unused''< | |||
|[[Image:Fireball.png]] [[Fireball]] (E) | |[[Image:Fireball.png]] [[Fireball]] (E) | ||
|[[Image:Teeth E.png]] [[Teeth]] (E) | |[[Image:Teeth E.png]] [[Teeth]] (E) | ||
|[[Image:Yellow key.png]] [[Yellow key]] | |[[Image:Yellow key.png]] [[Yellow key]] | ||
|- | |- | ||
!<code>$_8</code> | |||
|[[Image:Thin wall S.png]] [[Thin wall]] (S) | |[[Image:Thin wall S.png]] [[Thin wall]] (S) | ||
|[[Image:Green lock.png]] [[Green lock]] | |[[Image:Green lock.png]] [[Green lock]] | ||
|[[Image:Blue button.png]] [[Blue button]] | |[[Image:Blue button.png]] [[Blue button]] | ||
|''unused'' <ref name="unused"/> <ref>In the pgchip hack, this byte is used to indicate an [[ice block]].</ref> | |||
|''unused''< | |||
|[[Image:Pink ball.png]] [[Ball]] (N) | |[[Image:Pink ball.png]] [[Ball]] (N) | ||
|[[Image:Walker NS.png]] [[Walker]] (N) | |[[Image:Walker NS.png]] [[Walker]] (N) | ||
|[[Image:Flippers.png]] [[Flippers]] | |[[Image:Flippers.png]] [[Flippers]] | ||
|- | |- | ||
!<code>$_9</code> | |||
|[[Image:Thin wall E.png]] [[Thin wall]] (E) | |[[Image:Thin wall E.png]] [[Thin wall]] (E) | ||
|[[Image:Yellow lock.png]] [[Yellow lock]] | |[[Image:Yellow lock.png]] [[Yellow lock]] | ||
|[[Image:Teleport.png]] [[Teleporter]] | |[[Image:Teleport.png]] [[Teleporter]] | ||
|[[Image:Chip in Exit.png]] [[Fake exit]] <ref name="invalid"/> | |||
|[[Image:Chip in Exit.png]] | |||
|[[Image:Pink ball.png]] [[Ball]] (W) | |[[Image:Pink ball.png]] [[Ball]] (W) | ||
|[[Image:Walker WE.png]] [[Walker]] (W) | |[[Image:Walker WE.png]] [[Walker]] (W) | ||
|[[Image:Fire boots.png]] [[Fire boots]] | |[[Image:Fire boots.png]] [[Fire boots]] | ||
|- | |- | ||
!<code>$_a</code> | |||
|[[Image:Block.png]] [[Dirt block]] | |[[Image:Block.png]] [[Dirt block]] | ||
|[[Image:Ice NW.png]] [[Ice corner]] (NW) | |[[Image:Ice NW.png]] [[Ice corner]] (NW) | ||
|[[Image:Bomb.png]] [[Bomb]] | |[[Image:Bomb.png]] [[Bomb]] | ||
|[[Image:Exit2.png]] [[Fake exit]] <ref name="invalid"/> | |||
|[[Image:Exit2.png]] | |||
|[[Image:Pink ball.png]] [[Ball]] (S) | |[[Image:Pink ball.png]] [[Ball]] (S) | ||
|[[Image:Walker NS.png]] [[Walker]] (S) | |[[Image:Walker NS.png]] [[Walker]] (S) | ||
|[[Image:Ice skates.png]] [[Ice skates]] | |[[Image:Ice skates.png]] [[Ice skates]] | ||
|- | |- | ||
!<code>$_b</code> | |||
|[[Image:Dirt.png]] [[Dirt]] | |[[Image:Dirt.png]] [[Dirt]] | ||
|[[Image:Ice NE.png]] [[Ice corner]] (NE) | |[[Image:Ice NE.png]] [[Ice corner]] (NE) | ||
|[[Image:Trap.png]] [[Trap]] | |[[Image:Trap.png]] [[Trap]] | ||
|[[Image:Exit3.png]] [[Fake exit]] <ref name="invalid"/> | |||
|[[Image:Exit3.png]] | |||
|[[Image:Pink ball.png]] [[Ball]] (E) | |[[Image:Pink ball.png]] [[Ball]] (E) | ||
|[[Image:Walker WE.png]] [[Walker]] (E) | |[[Image:Walker WE.png]] [[Walker]] (E) | ||
|[[Image:Suction boots.png]] [[Suction boots]] | |[[Image:Suction boots.png]] [[Suction boots]] | ||
|- | |- | ||
!<code>$_c</code> | |||
|[[Image:Ice.png]] [[Ice]] | |[[Image:Ice.png]] [[Ice]] | ||
|[[Image:Ice SE.png]] [[Ice corner]] (SE) | |[[Image:Ice SE.png]] [[Ice corner]] (SE) | ||
|[[Image:Hidden wall.png]] [[Hidden wall]] | |[[Image:Hidden wall.png]] [[Hidden wall]] | ||
|[[Image:Swimming Chip N.png]] [[Swimming Chip]] (N) <ref name="invalid"/> | |||
|[[Image:Swimming Chip N.png]] | |||
|[[Image:Tank N.png]] [[Tank]] (N) | |[[Image:Tank N.png]] [[Tank]] (N) | ||
|[[Image:Blob.png]] [[Blob]] (N) | |[[Image:Blob.png]] [[Blob]] (N) | ||
|[[Image:Chip N.png]] [[Chip]] (N) | |[[Image:Chip N.png]] [[Chip]] (N) | ||
|- | |- | ||
!<code>$_d</code> | |||
|[[Image:Force floor S.png]] [[Force floor]] (S) | |[[Image:Force floor S.png]] [[Force floor]] (S) | ||
|[[Image:Ice SW.png]] [[Ice corner]] (SW) | |[[Image:Ice SW.png]] [[Ice corner]] (SW) | ||
|[[Image:Gravel.png]] [[Gravel]] | |[[Image:Gravel.png]] [[Gravel]] | ||
|[[Image:Swimming Chip W.png]] [[Swimming Chip]] (W) <ref name="invalid"/> | |||
|[[Image:Swimming Chip W.png]] | |||
|[[Image:Tank W.png]] [[Tank]] (W) | |[[Image:Tank W.png]] [[Tank]] (W) | ||
|[[Image:Blob.png]] [[Blob]] (W) | |[[Image:Blob.png]] [[Blob]] (W) | ||
|[[Image:Chip W.png]] [[Chip]] (W) | |[[Image:Chip W.png]] [[Chip]] (W) | ||
|- | |- | ||
!<code>$_e</code> | |||
|[[Image:Clone block N.png]] [[Clone block]] (N) | |[[Image:Clone block N.png]] [[Clone block]] (N) <ref name="clone-block"/> | ||
|[[Image:Blue wall.png]] Fake [[blue wall]] | |[[Image:Blue wall.png]] Fake [[blue wall]] | ||
|[[Image:Recessed wall.png]] [[Recessed wall]] | |[[Image:Recessed wall.png]] [[Recessed wall]] | ||
|[[Image:Swimming Chip S.png]] [[Swimming Chip]] (S) <ref name="invalid"/> | |||
|[[Image:Swimming Chip S.png]] | |||
|[[Image:Tank S.png]] [[Tank]] (S) | |[[Image:Tank S.png]] [[Tank]] (S) | ||
|[[Image:Blob.png]] [[Blob]] (S) | |[[Image:Blob.png]] [[Blob]] (S) | ||
|[[Image:Chip S.png]] [[Chip]] (S) | |[[Image:Chip S.png]] [[Chip]] (S) | ||
|- | |- | ||
!<code>$_f</code> | |||
|[[Image:Clone block W.png]] [[Clone block]] (W) | |[[Image:Clone block W.png]] [[Clone block]] (W) <ref name="clone-block"/> | ||
|[[Image:Blue wall.png]] Real [[blue wall]] | |[[Image:Blue wall.png]] Real [[blue wall]] | ||
|[[Image:Hint.png]] [[Hint]] | |[[Image:Hint.png]] [[Hint]] | ||
|[[Image:Swimming Chip E.png]] [[Swimming Chip]] (E) <ref name="invalid"/> | |||
|[[Image:Swimming Chip E.png]] | |||
|[[Image:Tank E.png]] [[Tank]] (E) | |[[Image:Tank E.png]] [[Tank]] (E) | ||
|[[Image:Blob.png]] [[Blob]] (E) | |[[Image:Blob.png]] [[Blob]] (E) | ||
|[[Image:Chip E.png]] [[Chip]] (E) | |[[Image:Chip E.png]] [[Chip]] (E) | ||
|} | |} | ||
<references /> | |||
=== Level metadata chunks === | === Level metadata chunks === | ||
Line 409: | Line 309: | ||
|$02 | |$02 | ||
|? | |? | ||
|Map title. Must include a trailing NUL byte, and must not exceed 64 characters (including the NUL). Should generally be ASCII, though | |Map title. Must include a trailing NUL byte, and must not exceed 64 characters (including the NUL). Should generally be ASCII, though some programs interpret this as Latin-1 or Windows-1252. <!-- XXX what does MSCC do with a long title or byte over 128? --> | ||
|} | |} | ||
Line 503: | Line 403: | ||
|$02 | |$02 | ||
|? | |? | ||
|[[Hint]] text. Must include a trailing NUL byte, and must not exceed 128 characters (including the NUL). Should generally be ASCII, though | |[[Hint]] text. Must include a trailing NUL byte, and must not exceed 128 characters (including the NUL). Should generally be ASCII, though some programs interpret this as Latin-1 or Windows-1252. <!-- XXX what does MSCC do with a long title or byte over 128? --> | ||
|} | |} | ||
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 | 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 | ||
| | |1 | ||
|x-coordinate of monster | |x-coordinate of monster | ||
|- | |- | ||
|$02 | |$02 | ||
| | |1 | ||
|y-coordinate of monster | |y-coordinate of monster | ||
|} | |} | ||
Line 531: | Line 431: | ||
Tile World in Lynx mode will ignore this structure and always allow any number of monsters to move as normal. | Tile World in Lynx mode will ignore this structure and always allow any number of monsters to move as normal. | ||
==== 9: Author ==== | |||
{| class="wikitable" border="1" | |||
!Offset | |||
!Bytes | |||
!Content | |||
|- | |||
|$02 | |||
|? | |||
|Author's name. Must include a trailing NUL byte, and must not exceed 128 characters (including the NUL). Typically encoded as Windows-1252 or Latin-1. | |||
|} | |||
This chunk is not present in the original game, and was later created as a community extension to include author info without relying on other files. This chunk is ignored by MSCC and early Tile World versions. | |||
== See also == | == See also == | ||
* [[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>] | ||
[[Category:Terminology]] | [[Category:Terminology]] | ||
[[Category:File formats]] | [[Category:File formats]] |