Tsuki
LÖVE Template For YueScript
Install / Use
/learn @Kaleidosium/TsukiREADME
Tsuki 🈷️
Tsuki is a project template to quickly set up LÖVE to run YueScript instead of Lua,
without precompiling your .yue files to .lua
This repository was forked from novafacing's selene.
Table of Contents
Installing
Tsuki works on Linux, macOS and Windows. It should also work anywhere else that LÖVE runs!
Install LÖVE
Tsuki needs LÖVE to be installed to run your game, and you can get the installer for your platform at the LÖVE website.
Create Your Game
You have two options when using Tsuki to create your game:
First (and most recommended) is to use this repo as a template repo. To do that, click the button at the top right of the github page that says "Use this template". That will create a new repo in your account that is a copy of the Tsuki repo!
Second, is you can directly clone and modify this repo (or a fork of it), or just download the zip file of this repo.
Once you have decided, just clone this repo (replace the link with your own if you forked or used it as a template):
git clone https://github.com/kaleidosium/tsuki.git
Using
First Run
Now that you have the repository set up, you will need a couple dependencies:
lua == 5.1: You can probably install from your package manager i.e.apt install lua5.1luarocks: You can probably also install this from your package manager, or you can get it hereact: For local release builds, you will need to install act
Once you have luarocks installed, you can install the dependencies with:
luarocks make --dev
Don't forget the --dev, it's important! Finally, run love . to start your game! There is
a demo project already configured for you, and you should see something like this:
and you should be able to move around with the arrow keys.
Writing Your Game
Now that you're all set up, write your game! Your source code should go in
the src directory, and you can add as many files as you want.
The main file gives an example of how to require another file (in this
case Game.yue) to make your game's code modular. There is also a Player class
and a Vector2 class to demonstrate how you might make your game even more modular.
Testing
Testing
There is a build/test script build.yue provided that works automatically with the
template repo. You can invoke it to run tests like:
yue -e build.yue src --test
It will run busted tests on all files matching a pattern, which defaults to
Test.+%.yue but you can provide your own once you start writing your own tests like
so:
yue -e build.yue src --test --pattern '.+Test%.yue'
Release Builds
Release builds of projects will contain the bare minimum files to run, so for release
all .yue files will be compiled to .lua, all extra libraries are removed, and a
.love or .exe is produced. You can produce a release build by running:
act --artifact-server-path=release
This will spin up a pipeline, build your release, and output the files to release.
Debugging Release Builds
The release build uses build.yue to compile all your .yue files to .lua.
If you have an issue, you can invoke it locally:
yue -e build.yue src
This will display any build errors encountered.
You can clean up the lua files from the source tree with:
yue -e build.yue src --clean
But be aware this will delete all .lua files in src!
Useful Documentation
Contributions and Bug Fixes
Bug fixes and contributions are welcome! If you find any issues, just open an Issue and I'll take a look at it. I'm not going to formalize the process too much, because this is a tiny repo and I don't expect I'll add too much code to it. Any improvements are likewise appreciated!
Thanks
Thanks for using Tsuki! I hope it helps you create great games, and if you do, please open a PR to add a gif or screenshot of your game and a link to it to this README so you can show it off!
And special thanks to novafacing (The creator of Selene), pigpigyyy (The creator of YueScript), leafo (The creator of MoonScript), and various other people who have contributed to the projects this one relies or built on. Without their contributions, this project would not have existed.
License
MIT
Related Skills
node-connect
350.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
110.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
350.8kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
350.8kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
