Files
EndlessSea/README.md
2026-03-18 22:59:28 -04:00

235 lines
5.5 KiB
Markdown

# Endless Sea
Endless Sea is a small browser survival game built with HTML5 canvas, jQuery, and plain JavaScript. You guide a fish through an underwater bullet-hell style field, avoid incoming hazards, and collect diamonds to trigger temporary power-ups.
## Play
- Live demo: https://zbww.github.io/EndlessSea
- Original source reference: https://github.com/zbww/EndlessSea/blob/master/js/main.js
## How To Play
- Move the mouse to steer the fish.
- Avoid every flying object except diamonds.
- Collect diamonds to gain temporary bonuses.
- Press `Space`, `Enter`, or `P` to pause and resume.
- Use headphones if you want the full audio experience.
## Power-Ups
Diamonds can trigger one of several effects:
- Score bonus
- Speed Down
- 1 UP
- Superfish invincibility
- Big Bomb screen clear
- Small World size reduction
## Running Locally
This project is static and does not require a build step.
1. Clone or download the repository.
2. Open `index.html` in a modern browser.
If your browser blocks autoplay audio, start the game with a click so music playback can begin normally.
## Desktop Builds
This repository includes a Tauri desktop wrapper under `src-tauri/`. The frontend is copied into `dist/` before each desktop build.
### Build Overview
1. Install Bun.
2. Install Rust.
3. Install the platform-specific Tauri dependencies for the OS you are building on.
4. Run `bun install`.
5. Run one of the build commands below.
### Shared Project Setup
Install dependencies once per clone:
```bash
bun install
```
You can also stage the static frontend manually:
```bash
bun run build:web
```
That copies `index.html`, `css/`, `js/`, and `music/` into `dist/`.
### Linux Native Build
The Linux build has been verified on this repository and currently produces `.deb` and `.rpm` bundles.
Install Bun on Linux:
```bash
curl -fsSL https://bun.sh/install | bash
```
Install Rust on Linux:
```bash
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh
```
If Bun or Rust are not on your shell `PATH` yet, restart the terminal before continuing.
Install the Tauri system packages for your distribution.
Debian or Ubuntu:
```bash
sudo apt update
sudo apt install \
libwebkit2gtk-4.1-dev \
build-essential \
curl \
wget \
file \
libxdo-dev \
libssl-dev \
libayatana-appindicator3-dev \
librsvg2-dev \
patchelf \
rpm
```
Fedora:
```bash
sudo dnf check-update
sudo dnf install \
webkit2gtk4.1-devel \
openssl-devel \
curl \
wget \
file \
libappindicator-gtk3-devel \
librsvg2-devel \
libxdo-devel \
patchelf \
rpm-build
sudo dnf group install "c-development"
```
Build the Linux desktop packages:
```bash
bun install
bun run tauri:build:linux
```
Expected outputs:
- `src-tauri/target/release/bundle/deb/Endless Sea_0.1.0_amd64.deb`
- `src-tauri/target/release/bundle/rpm/Endless Sea-0.1.0-1.x86_64.rpm`
### Windows Native Build
For a full Windows installer, build on a Windows machine. This is the most reliable path.
Install Bun in PowerShell:
```powershell
irm bun.sh/install.ps1 | iex
```
Install Rust with the MSVC toolchain:
```powershell
winget install --id Rustlang.Rustup
rustup default stable-msvc
```
Install the required Windows components:
1. Install Microsoft C++ Build Tools.
2. In the installer, enable `Desktop development with C++`.
3. Make sure Microsoft Edge WebView2 Runtime is installed.
Build the Windows installer:
```powershell
bun install
bun run tauri:build
```
Expected output:
- `src-tauri/target/release/bundle/nsis/Endless Sea_0.1.0_x64-setup.exe`
### Windows Cross-Build From Linux
If you are on Linux and only need a Windows `.exe`, you can cross-compile it without packaging an installer.
Install the extra cross-build tools:
```bash
sudo apt update
sudo apt install nsis lld llvm
rustup target add x86_64-pc-windows-msvc
cargo install --locked cargo-xwin
```
Build the Windows executable only:
```bash
bun install
bun run tauri:build:windows:exe
```
Expected output:
- `src-tauri/target/x86_64-pc-windows-msvc/release/endless-sea.exe`
If you want to attempt a full NSIS installer from Linux, use:
```bash
bun install
bun run tauri:build:windows:cross
```
Important note:
- Cross-compiling the Windows installer from Linux is experimental in Tauri.
- On this machine, the executable build worked, but the NSIS installer step failed because `makensis.exe` was not available in the Linux environment.
- If you need a reliable signed installer, use a real Windows build machine.
### Build Outputs
- Browser-ready static build: `dist/`
- Linux desktop binary: `src-tauri/target/release/endless-sea`
- Linux bundles: `src-tauri/target/release/bundle/`
- Windows cross-compiled binary: `src-tauri/target/x86_64-pc-windows-msvc/release/endless-sea.exe`
### Troubleshooting
- If `bun` is not found after installation, restart the shell or add Bun to your `PATH`.
- If `cargo` or `rustup` are not found, restart the shell so Cargo's environment is loaded.
- If Linux packaging fails with missing GTK or WebKit packages, re-check the distro-specific dependency list above.
- If a Windows installer build fails on Linux around NSIS, fall back to the `.exe` cross-build or build natively on Windows.
## Project Notes
- Most visible game elements are generated dynamically in JavaScript.
- All game graphics are drawn in code with canvas rather than external image assets.
- Audio files are included in the repository under `music/`.
## Credits
Developers:
- Bobwei Zhou
- Yangmei Lin
Original development period:
- July 12, 2014 to July 16, 2014