A redesign of 'WordGrid' in Rust & WebAssembly, eventually featuring both single- & multi- player.
Find a file
2023-10-13 21:16:16 -07:00
resources Add dictionary 2023-07-24 19:50:40 -07:00
src Add end game conditions 2023-09-20 18:59:32 -07:00
ui Fix bug whereby arrow ignored ephemeral tiles 2023-10-03 20:32:47 -07:00
.gitignore First steps of WASM support 2023-08-04 11:38:56 -07:00
Cargo.toml Fix Rust dependency issue 2023-08-22 19:02:08 -07:00
LICENSE Add LICENSE and fields to Cargo.toml 2023-08-20 16:28:42 -07:00
Makefile Adjust Makefile so 'make' builds all 2023-10-13 21:16:16 -07:00
README.md Improve documentation 2023-09-24 10:58:33 -07:00

README

This repository contains the code for 'WordGrid', a (currently) single-player browser game where you use letter tiles to form words.

Game logic resides in src/ as Rust code, which gets compiled into WebAssembly.

UI logic resides in ui/src/, which gets bundled by Parcel into the web application.

Setup

  1. Clone this repository.
  2. If not already installed, install the Rust wasm32-unknown-unknown target with rustup target add wasm32-unknown-unknown.
  3. In the base project directory, run make build-all to build both the Rust wasm project (gets stored in pkg/) and the final bundled web files (gets stored in ui/dist/).
  4. Place the files in ui/dist/ onto a web server and access them.

During development, you'll often want to serve the UI component in serve mode that auto-updates when you make a change. In the ui/ directory you can run npm run start. Note that Parcel doesn't always detect changes to the compiled Rust code, so if you recompile the Rust code with changes you should delete ui/.parcel-cache/ and ui/dist/ or else the UI may continue to use older WASM.

Future Plans

I intend on building a multiplayer component to this game, where the Rust code will form a webserver for connecting players and the UI will make server calls instead of calling web assembly.