Jump to content
Setting up an AI agent? ReverseEngineering.wiki skill (works from the command line, no configuration): https://reverseengineering.wiki/skill/rewiki/SKILL.md · setup for every client, including MCP: https://reverseengineering.wiki/llms.txt · REWiki:Connect

Format:Defold game archive

From ReverseEngineering.wiki
Format
Magic index starts with big-endian uint32 6
Extensions .arci .arcd .dmanifest
Endianness big (index); protobuf manifest
On this wiki Facts · Code · Notes · Topics

Defold's data.arcd / game.arci / game.dmanifest triple: an index (version 6), a concatenated data blob and a protobuf manifest that maps resource hashes to URLs; liveupdate resource packs are ZIP files.

Overview

A Defold (Library:Defold) bundle stores resources in game.arcd (data), game.arci (index) and game.dmanifest (protobuf). Layout read from defold/defold commit 4019b8f249383f281c03463fca74b13afe4828b1 in bob's ArchiveReader.java, ArchiveBuilder.java and engine/resource/proto/resource/liveupdate_ddf.proto.

Index (.arci)

Java DataInput is big endian. Header: int32 version (6), int32 pad, int64 userdata, int32 entry count, int32 entry offset, int32 hash offset, int32 hash length. Hashes are stored linearly at the hash offset in slots of 64 bytes (hash length of them used, the length of the manifest's resource hash: MD5 16, SHA-1 20, SHA-256 32, SHA-512 64). Entries at the entry offset are 16 bytes each: int64 offset-and-flags, int32 size, int32 compressed size. In the int64 the low 60 bits are the offset into the data file and the top 4 bits are flags (shift 60, mask 0x0fffffffffffffff). Flags: 1 encrypted, 2 compressed, 4 liveupdate. Compressed size 0xFFFFFFFF means stored uncompressed. Compression is LZ4 in the engine - Unverified from these files. The manifest maps each hash to its path (ArchiveReader looks entries up by hash). Unverified: entries are sorted by hash.

Manifest (.dmanifest)

A protobuf message ManifestFile (data bytes = serialized ManifestData, signature bytes, archive_identifier deprecated, version uint32, builder writes 5). ManifestData holds a header (resource hash algorithm default SHA256, signature hash algorithm, sign algorithm RSA, project identifier = SHA-1 of the project title), engine version hashes, and ResourceEntry records with hash, url, url_hash (uint64), size, compressed_size, flags (BUNDLED 1, EXCLUDED 2, ENCRYPTED 4, COMPRESSED 8) and dependants. Hash enum: MD5 1, SHA1 2, SHA256 3, SHA512 4. See Format:Protocol Buffers wire format.

Live update

Excluded resources are published as a resource pack ZIP (Format:ZIP) with files named by the resource hash (liveupdate tests use defold.resourcepack.zip). Each such file starts with a 16-byte header written by ArchiveBuilder (int32 size, 1 flag byte, 11 bytes padding) - Unverified about on-disk framing in the zip.

Encryption

The encrypted flag exists; the wiki does not document keys or decryption.

Related

Library:Defold.

Code & repositories

  • https://github.com/defold/defold @ 4019b8f249383f281c03463fca74b13afe4828b1 · license: LicenseRef-Defold-1.0 (declared by the contributor; GitHub's detector did not recognize LICENSE.txt)
    Defold engine and bob build tool; archive reader/builder and liveupdate manifest proto
    Tested on: source read, not run: source only · checked 2026-10-18