A Node.js library for working with Barfy's Adventure level files.
Also, some scripts I made that use it.
-
lib/libBA.mjs: The library itself. -
lib/*.mjs: Other files of the library. -
lib/external/tileinfo.json:res://assets/tileinfo.jsonripped right from BA's game.pck. Used by libBA. -
lib/external/global.gd:res://global.gdripped right from BA's game.pck. Used by libBA. -
lib/external/json5.mjs: A copy ofhttps://unpkg.com/json5@2.2.3/dist/index.min.mjs, because tileinfo.json uses trailing commas. -
everyTileVariantRotationLayer.mjs: Generated the Every Tile level on the BA test zone (puttestzone.txtin BA appdata). -
flipLevel.mjs: Flips a level horizontally and vertically. Used for What Boulder Chamber 1. -
makePaint.mjs: Generates the pixel grid used in Paint. (Some alterations were made after generation.) -
barfuck/*: Really old (August 2025) brainfuck compiler for BA. -
template_levels/*: Level files used by scripts. (exceptpaint.json, that's the finished Paint level)
- Load and save level files, both from file paths and from the game's local levels/structures lists
- Create empty levels
- Parses
tileinfo.jsonfor getting tiles and variants by name - JS object representation of tiles and layers. A rather nice object-oriented way of working with them
- "Effective tiles"; an abstraction primarily for making working with diagonal rotations and inconsistent rotation IDs easier, but also optionally abstracts away tile groups (e.g classic ground is one ID with different variants when using effective tiles, like in the editor) as well
- Structure support (Level.placeStructure, Level.makeStructure)
- Fully typed! (via JSDoc)
As of now, there isn't much documentation other than the JSDoc and code, and the scripts I made with it.