A pre-configured Visual Studio Code template for LΓVE including GitHub Actions for automated builds. Inspired by and adapted from LOVE VSCode Game Template and LΓVE Actions.
- π Rich Lua language features with Lua Language Server
- π Debugging with Local Lua Debugger
- π©· Intellisense for the LΓVE API via Love2D Support
- π¨βπ» Consistent coding styles with Editorconfig
- οΈβ±οΈ Shader languages support
- π GitHub Local Actions
- π¦ GitHub Actions for automated builds
- Compatible with act
- οΈπ· Automated builds of the
.love
file from within Visual Studio Code - ποΈ Organized with Workspaces
- οΈβοΈ Shared product configuration between the game and the GitHub Actions
- οΈβοΈ Nix flake to provision a dev shell
- Visual Studio Code
- LΓVE 11.5 (currently only 11.5 is supported)
love
should be in yourPATH
bash
7z
- Use this template to create a new repository for your game, then clone that repository locally.
- Open the
Workspace.code-workspace
file with Visual Studio Code.- You will be prompted that there are recommended extensions.
- Click 'Install'
- If this does not happen, install:
- Lua
- Local Lua Debugger
- Love2D Support
- Editorconfig
- GitHub Local Actions (optional)
- Shader languages support (optional)
- You will be prompted that there are recommended extensions.
- Configure
.game/product.env
andgame/conf.lua
with the settings specific to your game.- Make sure that
PRODUCT_UUID
is changed usinguuidgen
.
- Make sure that
- Replace
resources/icon.png
with your game's high-resolution icon.
- Press Alt + L or Ctrl + F5 to Run the game.
- Press F5 to Debug the game.
- In debug mode you can use breakpoints and inspect variables.
- This does have some performance impact though.
- You can switch to Release mode in the
Run and Debug
tab (Ctrl + Shift + D)
Builds a date stamped .love
file and puts it in the builds
folder.
Doubles up as a poor man's backup system.
- Press Ctrl + Shift + B to Build the game.
Make a new release by creating a version number git tag without the v
prefix.
- Create a new tag: Use the following command to create a new tag.
- Replace
1.0.0
with your desired version number.
- Replace
git tag 1.0.0
- Push the tag to GitHub: Push the tag to the remote repository.
git push origin 1.0.0
- GitHub Actions: The GitHub workflow will automatically create a release and upload packages for all the supported platforms as an assets.
.
βββ .github GitHub Actions configuration
βββ .editorconfig EditorConfig file
βββ .vscode Visual Studio Code configuration
β βββ extensions.json
β βββ launch.json
β βββ settings.json
β βββ tasks.json
βββ builds Game builds
βββ game
β βββ conf.lua LΓVE configuration file
β βββ main.lua The main entry point of the game
β βββ product.env Settings shared between the game and GitHub Actions
β βββ assets Game assets
β βββ lib 3rd party libraries
β βββ src Source code
βββ resources Resources use when building the game. Icons, shared libraries, etc.
βββ tools Tools for building and packaging the game
The .vscode
folder contains project specific configuration.
extensions.json
: Contains the list of recommended extensionslaunch.json
: Contains the settings for running the game or launching the debuggersettings.json
: Contains the settings for the Lua extensiontasks.json
: Contains the settings for building the game
The GitHub Actions workflow will automatically build and package the game for all the supported platforms.
- Android
.apk
debug and release builds for testing.aab
release build for the Play Store
- iOS (π§)
- Linux
- AppImage
- Tarball
- macOS (π§)
- portable .dmg
- App Store
- Web (οΈπ§)
- Windows
- win32
- win64
- Self-extracting archive (64-bit only)
In order to sign the APKs and AABs, the zipalign & Sign Android Release Action is used. You'll need to create Debug and Release keystores and set the appropriate secrets in the GitHub repository settings.
This creates a standard debug keystore matching Android Studio's defaults, except it is valid for 50 years.
keytool -genkey -v \
-keystore debug.keystore \
-alias androiddebugkey \
-keyalg RSA -keysize 2048 -validity 18250 \
-storepass android \
-keypass android \
-dname "CN=Android Debug,O=Android,C=US"
Create base64 encoded signing key to sign apps in GitHub CI.
openssl base64 < debug.keystore | tr -d '\n' | tee debug.keystore.base64.txt
Add these secrets to the GitHub repository settings:
ANDROID_DEBUG_SIGNINGKEY_BASE64
ANDROID_DEBUG_ALIAS
ANDROID_DEBUG_KEYSTORE_PASSWORD
ANDROID_DEBUG_KEY_PASSWORD
This creates a release keystore with a validity of 25 years.
keytool -genkey -v \
-keystore release-key.jks \
-alias release-key \
-keyalg RSA -keysize 2048 -validity 9125 \
-storepass [secure-password] \
-keypass [secure-password] \
-dname "CN=[your name],O=[your organisation],L=[your town/city],S=[your state/region/county],C=[your country code]"
Create base64 encoded signing key to sign apps in GitHub CI.
openssl base64 < release-key.jks | tr -d '\n' | tee release-key.jks.base64.txt
Add these secrets to the GitHub repository settings:
ANDROID_RELEASE_SIGNINGKEY_BASE64
ANDROID_RELEASE_ALIAS
ANDROID_RELEASE_KEYSTORE_PASSWORD
ANDROID_RELEASE_KEY_PASSWORD