Flappy bird style game made with the Kaplay library and Tauri. It features a basic save system where your best score is saved on disk.
Supports multiple inputs (Mouse, Keyboard and Gamepad)
Download for Windows here : https://jslegend.itch.io/kriby
Tutorial on how to build this : https://www.youtube.com/watch?v=mbljv1EkrRQ
- Make sure you have the prerequisites : https://tauri.app/v1/guides/getting-started/prerequisites
- Make sure you have Node.js installed.
- Clone the repo.
- Once in the repo, do
npm installto install the required dependencies. - Run the project in dev by doing
npm run dev.
- Build the project by doing
npm run build. - After the build is complete go to
target > release > bundle > msi. - Distribute the installer on sites like itch.io or on Steam.
Note : It's important to distribute the installer and not the .exe available in target > release > Your Game.exe because Tauri relies on WebView2 to be present on the system.The installer will make sure to download and install it on the user's system if not already there. This is not the case for the .exe.
For this project, I opted to use Tauri instead of Electron for a few reasons :
- Easier to setup than Electron. (You can use Tauri's JS api so no need to learn or use Rust)
- Final executable for the game is lightweight (In this case 6 MB). Electron produces bloated executables.
- By packaging a Chrome browser, Electron can guarantee that the app will render the same way across platforms. This is not the case with Tauri since it uses the Webview of the platform the app is running on. Since the expectation for games is that they run on Windows, this drawback of Tauri doesn't affect this project.
Learn more about Tauri : https://tauri.app/
Kaplay is a very high-level library for making games. It allows you to make games really fast. I use it because it's very productive.
It was previously called Kaboom. I have plenty of tutorials on my YouTube channel : https://www.youtube.com/@jslegenddev
Learn more about Kaplay : https://kaplayjs.com/
