Skip to content

A template for running an easy web-based game engine KaPlay on every desktop: Windows, Linux, maxOS, iOS/iPadOS and Android. Use Tauri Engine.

License

Notifications You must be signed in to change notification settings

SuperKevinZhou/tauri-kaplay-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Tauri Kaplay Template

Tauri logo KaPlay logo

(Click the image to go to each product's official website)

Tauri Kaplay Template is not affiliated with Tauri or KaPlay

Write once, deploy anywhere

The easiest way to build a game ever: Tauri + KaPlay.

Use the unlimited features powered by KaPlay to build your game in 30 seconds.

Quick Start

Everything has been prepared for you.

To start editing, open mygame/src/main.js

The script is really easy to write, like this:

import startGame from "kaplay"

const k = startGame()

k.loadSprite("bean", "sprites/bean.png")

k.add([
	k.pos(120, 80),
	k.sprite("bean"),
])

k.onClick(() => k.addKaboom(k.mousePos()))

Testing

Testing is really easy, just run this command in the mygame folder:

npm run tauri dev

Building

To build without any diffuculties, you need to type these commands:

sudo apt install libgtkd-3-dev
sudo apt install libsoup2.4-dev
sudo apt install libjavascriptcoregtk-4.0-dev
sudo apt install libwebkit2gtk-4.0-dev

P.S. You can copy these above at once (including line feeds) and paste them at once in your terminal (for most terminal, you should use right click), the shell will automatically run each command.

And then you can build it by using:

npm run tauri build --verbose

Then, everything is done!

The binary file is at mygame/src-tauri/target/release/bundle/appimage_deb/date/usr/bin/!

The .deb package is at mygame/src-tauri/target/release/bundle/deb/!

P.S. Due to unknown error, I can't build the appimage.

The error message is like this:

Error failed to bundle project: error running appimage.sh

If anyone knows how to solve it, please tell me vis Issue or Pull Request or My Email (zzh__2020@outlook.com)

Click me to connect me by email!

If sending email, please use Tauri Kaplay Template Issue Solving! as title, for there are too many academic rubbish in my inbox😂!

About

A template for running an easy web-based game engine KaPlay on every desktop: Windows, Linux, maxOS, iOS/iPadOS and Android. Use Tauri Engine.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published