Cellbound is a fully-functional spreadsheet engine with a logic puzzle game built on top.
Spreadsheet cells support standard mathematical expressions and function calls, as well as references to individual cells and ranges of cells. Cell references use R1C1 reference style notation.
Cellbound was built for the Langjam Gamejam in late 2025.
Warning
This is alpha-quality code. It is likely to have bugs. It was built in a week for a game jam.
Cellbound was inspired by Code Grid, and was used as an opportunity to experiment with possible architectural and syntactic changes to Code Grid before committing them to the main repository. Cellbound was built from scratch without referring to the Code Grid codebase, but lessons learned from Code Grid influenced the development of Cellbound.
The links below are listed in the order the code should be read to understand the application from the highest to lowest level.
Makefile– build and run the application locallyindex.htmlandsrc/App.svelte– entrypoint to the main, high-level application (the index page mounts the App)src/Table.svelteandsrc/Cell.svelte– interactive spreadsheet UI codesrc/formula.js– formula parsing logic (start at the bottom of the file and go up)src/lib/store.js– implementation of "rederivable" stores that can change their derived dependencies without invalidating their object reference- Every cell's value is a rederivable store that is rederived when its formula changes, and updated whenever any of its dependencies' values changes
src/levels.js– game level data- THERE ARE SPOILERS AND LEVEL SOLUTIONS IN THIS FILE
src/parsers.js– parser combinator library used for formula parsingsrc/formula-functions.js– "standard library" formula functions available in every spreadsheetsrc/global.cssandpublic/*– global stylesheet, favicons, etc.
- Spreadsheet formulas are built on a custom Svelte store that is "rederivable." It functions like a Svelte derived store, except it can add or remove dependencies it is derived from without changing its object reference.
- Formulas are parsed using a custom parser combinator implementation.
The Makefile contains all of the steps to build, test, and
distribute the code.
If you have NodeJS installed, the following will compile the code and package it into a ZIP file for distribution:
makeTo run a local version for live testing and debugging, run:
make devThis code repository is entirely human-written. All bugs, errors, and omissions are my own.
Cellbound is not under active development.
It was built for a game jam, and though I may add code here and there, I am not expecting to maintain it long-term.
Thanks to Logan Snow and Amy Liu for help with ideation and feedback on early prototypes.