ChainLink is an open-source custom programming language and implementation I created, primarily for usage in games with high levels of community content or map/level development. ChainLink has excellent conceptual and technical documentation that helps developers implement and use ChainLink.
Motivation
Starting out as a project developed for In Plain Sight 2, ChainLink was created as a way to have simplified scripts in maps that are tied to the assets, instead of to the codebase. This makes it easy for level designers to add rich features to maps without being knowledgable about the backend of the game.
The scope expanded when put in the light of community contributions. Inserting arbitrary community content into the game can be a risk for game/player security, in the case there are malicious maps. This risk is especially higher for games wishing to implement automatic community contributions.
Naturally, a great solution to keep both rich, easy features and security was to make a sandboxed environment for it.
Details
To accomplish the design goals of ChainLink, the backbone of the project is a simplistic scripting language called Chain which is then implemented by a runtime called ChainLink. Chain is purely the functionality of the language, and ChainLink is responsible for wrapping it up into a nice package for usage in games with sandboxing.
Within Chain is a custom built lexer, parser, and interpreter that are runtime agnostic. Chain supports 4 basic datatypes based on Luau (the implementation language), if-statements, variables, binary expressions, and a binding API for runtimes.
I use ChainLink to provide more power to my level designers, so that they can enhance the creativity in maps and speed up development. Of my projects, ChainLink is currently used for In Plain Sight 2 and In Plain Sight 3.
Tools:
- Rojo
- Git
- Selene
- StyLua
- Wally
Languages:
- Luau