Template for the web game library KAPLAY, which helps you to make games fast and fun!
kaplay v3001.0.0-alpha.10
It works with vite and tauri for desktop builds
/src
is code/src-tauri/
contains:
tauri.conf.json
)/assets
has all the assets, to load one you'd do loadSprite("osaka", "sprites/osaka.png")
no need for loadRoot()
pnpm dev
runs the game in a window
pnpm build
builds the game and puts it in /src-tauri/target/release
web:
can be put before both for web developmentIf you use vscode tasks they will be put in builds
folder
^ Also has support for butler and sending builds to itch.io
git clone https://github.com/amyspark-ng/kaplay-template
, remember to update the remote if you're planning to use github!pnpm install
on the root of the project on a cmd (command prompt) to install all the dependencies needed for it to workpnpm dev
or pnpm web:dev
pnpm dev
for desktop might take a bit the first timepnpm build
or pnpm web:build
to build the project
/dist/
, you can zip it (having the index.html on the root) and upload it to itch.io or newgrounds if you wishsrc-tauri/target/release/
, only the .exe file is needed to run the game.msi
or nsis
they're on src-tauri/target/release/bundle/
^ You can use the vscode tasks i've set up to zip them and send them to /builds/
, there's also one for zipping and sending directly to itch.io!
Desktop builds are 100% safe, don't believe me? You're looking the repository with the source code for the template, and also:
If you want windows defender to not bother you, you'll have to pay a very very expensive fine!!
src/tauri/tauri.conf.json
https://tauri.app/v1/api/config/ Recommend searching for "name_here" or "your name here" or similar things
pnpm tauri icon
or cargo tauri icon
and it should generate them for you, tauri.conf.json is configured for them to work%localappdata%/${bundle.identifier}/EBWebView/Default/Local Storage/leveldb
'__TAURI__' in window
vite.config.mts
in server.port